[lua] fixed bug in template classes which cases template_default2 and template_specialization_defarg to fail.
Added several warning filters into the overload's test cases. Added runtime tests for several codes. You can now make check-lua-test-suite with no errors and only a few warnings. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10076 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
70759b3e16
commit
0c2bbb25a3
19 changed files with 368 additions and 15 deletions
14
Examples/test-suite/lua/smart_pointer_overload_runme.lua
Normal file
14
Examples/test-suite/lua/smart_pointer_overload_runme.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
require("import") -- the import fn
|
||||
import("smart_pointer_overload") -- import code
|
||||
for k,v in pairs(smart_pointer_overload) do _G[k]=v end -- move to global
|
||||
|
||||
f = Foo()
|
||||
b = Bar(f)
|
||||
|
||||
assert(f:test(3) == 1)
|
||||
--assert(f:test(3.5) == 2) -- won't work due to being unable to overloads
|
||||
assert(f:test("hello") == 3)
|
||||
|
||||
assert(b:test(3) == 1)
|
||||
--assert(b:test(3.5) == 2) -- won't work due to being unable to overloads
|
||||
assert(b:test("hello") == 3)
|
||||
Loading…
Add table
Add a link
Reference in a new issue