diff options
Diffstat (limited to 'ThirdParty/toluapp/src/tests/tnamespace.lua')
-rw-r--r-- | ThirdParty/toluapp/src/tests/tnamespace.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ThirdParty/toluapp/src/tests/tnamespace.lua b/ThirdParty/toluapp/src/tests/tnamespace.lua new file mode 100644 index 0000000..3a51dfb --- /dev/null +++ b/ThirdParty/toluapp/src/tests/tnamespace.lua @@ -0,0 +1,14 @@ +-- test valid access +assert(A.a==1) +assert(A.B.b==2) +assert(A.B.C.c==3) + +-- test invalid access +assert(A.B.a==nil) -- no inheritance +assert(A.B.C.a==nil) + +assert(A.b==nil) -- no access the inner module +assert(A.c==nil) +assert(A.B.c==nil) + +print("Namespace test OK") |