summaryrefslogtreecommitdiff
path: root/tests/lcorolib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-29 14:39:57 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-03-30 09:57:53 +0200
commit456ab7b69f88859683c60cc2261e70d6dbadd8e8 (patch)
tree12baf4ae489e7afd4819ec94bc413c1c2a1db05d /tests/lcorolib.js
parent2e5b595a2e04fe72555a565af4aae43560946473 (diff)
downloadfengari-456ab7b69f88859683c60cc2261e70d6dbadd8e8.tar.gz
fengari-456ab7b69f88859683c60cc2261e70d6dbadd8e8.tar.bz2
fengari-456ab7b69f88859683c60cc2261e70d6dbadd8e8.zip
8-bit string internally tests
Lexing/Parsing is done on byte rather than js strings
Diffstat (limited to 'tests/lcorolib.js')
-rw-r--r--tests/lcorolib.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/lcorolib.js b/tests/lcorolib.js
index 9c1d9b1..f709fa5 100644
--- a/tests/lcorolib.js
+++ b/tests/lcorolib.js
@@ -40,7 +40,7 @@ test('coroutine.create, coroutine.yield, coroutine.resume', function (t) {
linit.luaL_openlibs(L);
- lapi.lua_load(L, null, bc, "test-coroutine", "binary");
+ lapi.lua_load(L, null, bc, lua.to_luastring("test-coroutine"), lua.to_luastring("binary"));
lapi.lua_call(L, 0, -1);
@@ -83,20 +83,20 @@ test('coroutine.status', function (t) {
linit.luaL_openlibs(L);
- lapi.lua_load(L, null, bc, "test-coroutine.status", "binary");
+ lapi.lua_load(L, null, bc, lua.to_luastring("test-coroutine.status"), lua.to_luastring("binary"));
lapi.lua_call(L, 0, -1);
}, "JS Lua program ran without error");
t.strictEqual(
- lapi.lua_tostring(L, -2),
+ lapi.lua_tojsstring(L, -2),
"suspended",
"Correct element(s) on the stack"
);
t.strictEqual(
- lapi.lua_tostring(L, -1),
+ lapi.lua_tojsstring(L, -1),
"dead",
"Correct element(s) on the stack"
);
@@ -124,7 +124,7 @@ test('coroutine.isyieldable', function (t) {
linit.luaL_openlibs(L);
- lapi.lua_load(L, null, bc, "test-coroutine.isyieldable", "binary");
+ lapi.lua_load(L, null, bc, lua.to_luastring("test-coroutine.isyieldable"), lua.to_luastring("binary"));
lapi.lua_call(L, 0, -1);
@@ -165,7 +165,7 @@ test('coroutine.running', function (t) {
linit.luaL_openlibs(L);
- lapi.lua_load(L, null, bc, "test-coroutine.running", "binary");
+ lapi.lua_load(L, null, bc, lua.to_luastring("test-coroutine.running"), lua.to_luastring("binary"));
lapi.lua_call(L, 0, -1);
@@ -206,7 +206,7 @@ test('coroutine.wrap', function (t) {
linit.luaL_openlibs(L);
- lapi.lua_load(L, null, bc, "test-coroutine.wrap", "binary");
+ lapi.lua_load(L, null, bc, lua.to_luastring("test-coroutine.wrap"), lua.to_luastring("binary"));
lapi.lua_call(L, 0, -1);
@@ -217,4 +217,4 @@ test('coroutine.wrap', function (t) {
625,
"Correct element(s) on the stack"
);
-}); \ No newline at end of file
+});