Add test case for Lua __getitem + inheritance

This commit is contained in:
Alexander Warg 2015-04-30 08:59:59 +02:00
commit be907f96e0
3 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,12 @@
require("import") -- the import fn
import("lua_inherit_getitem") -- import lib
local t = lua_inherit_getitem;
local base = t.CBase()
local derived = t.CDerived()
assert(base.Foo ~= nil)
assert(base:Foo() == "CBase::Foo")
assert(derived.Foo == base.Foo)
assert(derived:Foo() == "CBase::Foo")