From 5f46b4102c179680d613b6b9e0e6d392318030d2 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 8 Nov 2021 10:53:42 +0800 Subject: + tolua --- ThirdParty/tolua-5.2.4/src/tests/tinheritance.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ThirdParty/tolua-5.2.4/src/tests/tinheritance.lua (limited to 'ThirdParty/tolua-5.2.4/src/tests/tinheritance.lua') 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") -- cgit v1.1-26-g67d0