Fixed issues with C++ classes and hierachies across multiple source files.
Fixed imports test case & added run test. Added Examples/imports. Added typename for raw lua_State* Added documentation on native functions. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9748 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cea5ba04fa
commit
61fdde65cc
19 changed files with 820 additions and 481 deletions
28
Examples/test-suite/lua/imports_runme.lua
Normal file
28
Examples/test-suite/lua/imports_runme.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
require("import") -- the import fn
|
||||
-- need to load two modules
|
||||
import("imports_a") -- import code
|
||||
import("imports_b") -- import code
|
||||
|
||||
b=imports_b.B()
|
||||
b:hello() -- call member function in A which is in a different SWIG generated library.
|
||||
b:bye()
|
||||
|
||||
assert (b:member_virtual_test(imports_a.A_memberenum1) == imports_a.A_memberenum2)
|
||||
assert (b:global_virtual_test(imports_a.globalenum1) == imports_a.globalenum2)
|
||||
|
||||
imports_b.global_test(imports_a.A_memberenum1)
|
||||
|
||||
--[[ B b = new B();
|
||||
b.hello(); //call member function in A which is in a different SWIG generated library.
|
||||
|
||||
B b = new B();
|
||||
b.hello(); //call member function in A which is in a different SWIG generated library.
|
||||
b.bye();
|
||||
|
||||
if (b.member_virtual_test(A.MemberEnum.memberenum1) != A.MemberEnum.memberenum2)
|
||||
throw new Exception("Test 1 failed");
|
||||
if (b.global_virtual_test(GlobalEnum.globalenum1) != GlobalEnum.globalenum2)
|
||||
throw new Exception("Test 2 failed");
|
||||
|
||||
imports_b.global_test(A.MemberEnum.memberenum1);
|
||||
]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue