aboutsummaryrefslogtreecommitdiff
path: root/tests/test-suite
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-28 14:11:48 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-28 14:11:48 +0200
commit4e2f90985cbffa5b3e6e7840543d684a6dd18aed (patch)
tree9138e83943e0df1fd73d81cda06fe360c97486ad /tests/test-suite
parentb667e7b8ec3f63a05172a40491c4f4ca9ec9cad0 (diff)
downloadfengari-4e2f90985cbffa5b3e6e7840543d684a6dd18aed.tar.gz
fengari-4e2f90985cbffa5b3e6e7840543d684a6dd18aed.tar.bz2
fengari-4e2f90985cbffa5b3e6e7840543d684a6dd18aed.zip
ltests.js: fixed upvalue, removed collectgarbage calls
Diffstat (limited to 'tests/test-suite')
-rw-r--r--tests/test-suite/inprogress/api.js8
-rw-r--r--tests/test-suite/ltests.js4
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/test-suite/inprogress/api.js b/tests/test-suite/inprogress/api.js
index c237a9c..914c28a 100644
--- a/tests/test-suite/inprogress/api.js
+++ b/tests/test-suite/inprogress/api.js
@@ -1219,11 +1219,11 @@ test("[test-suite] api: testing get/setuservalue", function (t) {
assert(debug.getuservalue(4) == nil)
debug.setuservalue(b, function () return 10 end)
- collectgarbage() -- function should not be collected
+ -- collectgarbage() -- function should not be collected
assert(debug.getuservalue(b)() == 10)
debug.setuservalue(b, 134)
- collectgarbage() -- number should not be a problem for collector
+ -- collectgarbage() -- number should not be a problem for collector
assert(debug.getuservalue(b) == 134)
`, L;
@@ -1287,7 +1287,7 @@ test("[test-suite] api: long chain of userdata", { skip: true }, function (t) {
debug.setuservalue(bb, b)
b = bb
end
- collectgarbage() -- nothing should not be collected
+ -- collectgarbage() -- nothing should not be collected
for i = 1, 1000 do
b = debug.getuservalue(b)
end
@@ -1362,7 +1362,7 @@ test("[test-suite] api: reuse of references", { skip: true }, function (t) {
a = T.ref({})
- collectgarbage()
+ -- collectgarbage()
assert(type(T.getref(a)) == 'table')
`, L;
diff --git a/tests/test-suite/ltests.js b/tests/test-suite/ltests.js
index 13b4774..4f874d5 100644
--- a/tests/test-suite/ltests.js
+++ b/tests/test-suite/ltests.js
@@ -501,8 +501,8 @@ const testJS = function(L) {
};
const upvalue = function(L) {
- let n = lauxlib.checkinteger(L, 2);
- lauxlib.checktype(L, 1, lua.LUA_TFUNCTION);
+ let n = lauxlib.luaL_checkinteger(L, 2);
+ lauxlib.luaL_checktype(L, 1, lua.LUA_TFUNCTION);
if (lua.lua_isnone(L, 3)) {
let name = lua.lua_getupvalue(L, 1, n);
if (name === null) return 0;