diff options
Diffstat (limited to 'ThirdParty/tolua-5.2.4/src/tests/tinheritance.lua')
-rw-r--r-- | ThirdParty/tolua-5.2.4/src/tests/tinheritance.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ThirdParty/tolua-5.2.4/src/tests/tinheritance.lua b/ThirdParty/tolua-5.2.4/src/tests/tinheritance.lua new file mode 100644 index 0000000..2df1f38 --- /dev/null +++ b/ThirdParty/tolua-5.2.4/src/tests/tinheritance.lua @@ -0,0 +1,16 @@ +dofile("myassert.lua") + +-- type convertion tests +local a = A:new() +local b = B:new() +local c = C:new() +local d = D:new() + +assert(b:name()=="B") +assert(b:aname()=="A") +assert(c:name()=="C") +assert(c:aname()=="A") +assert(d:name()=="D") +assert(d:aname()=="A") + +print("Inheritance test OK") |