aboutsummaryrefslogtreecommitdiff
path: root/testes/api.lua
diff options
context:
space:
mode:
Diffstat (limited to 'testes/api.lua')
-rw-r--r--testes/api.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/testes/api.lua b/testes/api.lua
index 8f4e89ac..5da03641 100644
--- a/testes/api.lua
+++ b/testes/api.lua
@@ -354,8 +354,11 @@ assert(to("topointer", nil) == null)
354assert(to("topointer", "abc") ~= null) 354assert(to("topointer", "abc") ~= null)
355assert(to("topointer", string.rep("x", 10)) == 355assert(to("topointer", string.rep("x", 10)) ==
356 to("topointer", string.rep("x", 10))) -- short strings 356 to("topointer", string.rep("x", 10))) -- short strings
357assert(to("topointer", string.rep("x", 300)) ~= 357do -- long strings
358 to("topointer", string.rep("x", 300))) -- long strings 358 local s1 = string.rep("x", 300)
359 local s2 = string.rep("x", 300)
360 assert(to("topointer", s1) ~= to("topointer", s2))
361end
359assert(to("topointer", T.pushuserdata(20)) ~= null) 362assert(to("topointer", T.pushuserdata(20)) ~= null)
360assert(to("topointer", io.read) ~= null) -- light C function 363assert(to("topointer", io.read) ~= null) -- light C function
361assert(to("topointer", hfunc) ~= null) -- "heavy" C function 364assert(to("topointer", hfunc) ~= null) -- "heavy" C function