PageRenderTime 23ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/lua/pointer_reference_runme.lua

#
Lua | 13 lines | 9 code | 4 blank | 0 comment | 4 complexity | 188582d8505cf40e959fd9b9c72fd8d1 MD5 | raw file
 1require("import")	-- the import fn
 2import("pointer_reference",true)	-- import code
 3
 4
 5s=pointer_reference.get()
 6assert(s.value == 10)
 7
 8ss = pointer_reference.Struct(20);
 9pointer_reference.set(ss);
10assert(pointer_reference.Struct_instance.value == 20)
11
12assert(pointer_reference.overloading(1) == 111)
13assert(pointer_reference.overloading(ss) == 222)