Lua improvements - Mark Gossage patch #1295168
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7472 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d0381c8141
commit
76d58c55cb
9 changed files with 72 additions and 57 deletions
|
|
@ -1,31 +1,32 @@
|
|||
require("import") -- the import fn
|
||||
import("primitive_ref",true) -- import code into global namespace
|
||||
import("primitive_ref") -- import code
|
||||
pr=primitive_ref --alias
|
||||
|
||||
assert(ref_int(3)==3)
|
||||
assert(pr.ref_int(3)==3)
|
||||
|
||||
assert(ref_uint(3) == 3)
|
||||
assert(pr.ref_uint(3) == 3)
|
||||
|
||||
assert(ref_short(3) == 3)
|
||||
assert(pr.ref_short(3) == 3)
|
||||
|
||||
assert(ref_ushort(3) == 3)
|
||||
assert(pr.ref_ushort(3) == 3)
|
||||
|
||||
assert(ref_long(3) == 3)
|
||||
assert(pr.ref_long(3) == 3)
|
||||
|
||||
assert(ref_ulong(3) == 3)
|
||||
assert(pr.ref_ulong(3) == 3)
|
||||
|
||||
assert(ref_schar(3) == 3)
|
||||
assert(pr.ref_schar(3) == 3)
|
||||
|
||||
assert(ref_uchar(3) == 3)
|
||||
assert(pr.ref_uchar(3) == 3)
|
||||
|
||||
assert(ref_float(3.5) == 3.5)
|
||||
assert(pr.ref_float(3.5) == 3.5)
|
||||
|
||||
assert(ref_double(3.5) == 3.5)
|
||||
assert(pr.ref_double(3.5) == 3.5)
|
||||
|
||||
assert(ref_bool(true) == true)
|
||||
assert(pr.ref_bool(true) == true)
|
||||
|
||||
assert(ref_char('x') == 'x')
|
||||
assert(pr.ref_char('x') == 'x')
|
||||
|
||||
assert(ref_over(0) == 0)
|
||||
assert(pr.ref_over(0) == 0)
|
||||
|
||||
a=A(12)
|
||||
assert(ref_over(a)==12)
|
||||
a=pr.A(12)
|
||||
assert(pr.ref_over(a)==12)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue