summaryrefslogtreecommitdiff
path: root/ThirdParty/toluapp/src/tests/tmodule.lua
blob: 96ddf43994539fd1990de4e4183129e054ca309e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- 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)

-- test variables appended to existing modules
assert(A.d==4)

print("Module test OK")