summaryrefslogtreecommitdiff
path: root/tests/lcorolib.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lcorolib.js')
-rw-r--r--tests/lcorolib.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lcorolib.js b/tests/lcorolib.js
index e1868b2..42f9677 100644
--- a/tests/lcorolib.js
+++ b/tests/lcorolib.js
@@ -6,7 +6,7 @@ const lua = require('../src/lua.js');
const lauxlib = require('../src/lauxlib.js');
const lualib = require('../src/lualib.js');
const lstate = require('../src/lstate.js');
-
+const {to_luastring} = require("../src/fengaricore.js");
test('coroutine.create, coroutine.yield, coroutine.resume', function (t) {
let luaCode = `
@@ -29,7 +29,7 @@ test('coroutine.create, coroutine.yield, coroutine.resume', function (t) {
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(luaCode));
lua.lua_call(L, 0, -1);
@@ -70,7 +70,7 @@ test('coroutine.status', function (t) {
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(luaCode));
lua.lua_call(L, 0, -1);
@@ -109,7 +109,7 @@ test('coroutine.isyieldable', function (t) {
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(luaCode));
lua.lua_call(L, 0, -1);
@@ -148,7 +148,7 @@ test('coroutine.running', function (t) {
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(luaCode));
lua.lua_call(L, 0, -1);
@@ -187,7 +187,7 @@ test('coroutine.wrap', function (t) {
lualib.luaL_openlibs(L);
- lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
+ lauxlib.luaL_loadstring(L, to_luastring(luaCode));
lua.lua_call(L, 0, -1);