diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-15 17:20:06 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-15 17:20:06 +1000 |
commit | f7e5203a20ef41cf9bc59d339b4f85007a7f3764 (patch) | |
tree | 3c6f0907231588f528902eec3b2b1d09d19a53e1 /tests/ldebug.js | |
parent | 3947c2cb2fa6193645ac30898064e3d335a63545 (diff) | |
download | fengari-f7e5203a20ef41cf9bc59d339b4f85007a7f3764.tar.gz fengari-f7e5203a20ef41cf9bc59d339b4f85007a7f3764.tar.bz2 fengari-f7e5203a20ef41cf9bc59d339b4f85007a7f3764.zip |
Separate ZIO and MBuffer data structures
- lua_load no longer takes a null reader function
Diffstat (limited to 'tests/ldebug.js')
-rw-r--r-- | tests/ldebug.js | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/tests/ldebug.js b/tests/ldebug.js index 99e37d9..8809bde 100644 --- a/tests/ldebug.js +++ b/tests/ldebug.js @@ -2,9 +2,6 @@ const test = require('tape'); -const tests = require("./tests.js"); -const toByteCode = tests.toByteCode; - const lua = require('../src/lua.js'); const lauxlib = require('../src/lauxlib.js'); const lualib = require('../src/lualib.js'); @@ -19,13 +16,11 @@ test('luaG_typeerror', function (t) { t.doesNotThrow(function () { - let bc = toByteCode(luaCode); - L = lauxlib.luaL_newstate(); lualib.luaL_openlibs(L); - lua.lua_load(L, null, bc, lua.to_luastring("test-typeerror"), lua.to_luastring("binary")); + lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); lua.lua_pcall(L, 0, -1, 0); @@ -49,13 +44,11 @@ test('luaG_typeerror', function (t) { t.doesNotThrow(function () { - let bc = toByteCode(luaCode); - L = lauxlib.luaL_newstate(); lualib.luaL_openlibs(L); - lua.lua_load(L, null, bc, lua.to_luastring("test-typeerror"), lua.to_luastring("binary")); + lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); lua.lua_pcall(L, 0, -1, 0); @@ -78,13 +71,11 @@ test('luaG_typeerror', function (t) { t.doesNotThrow(function () { - let bc = toByteCode(luaCode); - L = lauxlib.luaL_newstate(); lualib.luaL_openlibs(L); - lua.lua_load(L, null, bc, lua.to_luastring("test-typeerror"), lua.to_luastring("binary")); + lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); lua.lua_pcall(L, 0, -1, 0); @@ -107,13 +98,11 @@ test('luaG_typeerror', function (t) { t.doesNotThrow(function () { - let bc = toByteCode(luaCode); - L = lauxlib.luaL_newstate(); lualib.luaL_openlibs(L); - lua.lua_load(L, null, bc, lua.to_luastring("test-typeerror"), lua.to_luastring("binary")); + lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); lua.lua_pcall(L, 0, -1, 0); @@ -135,13 +124,11 @@ test('luaG_concaterror', function (t) { t.doesNotThrow(function () { - let bc = toByteCode(luaCode); - L = lauxlib.luaL_newstate(); lualib.luaL_openlibs(L); - lua.lua_load(L, null, bc, lua.to_luastring("test-typeerror"), lua.to_luastring("binary")); + lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); lua.lua_pcall(L, 0, -1, 0); @@ -163,13 +150,11 @@ test('luaG_opinterror', function (t) { t.doesNotThrow(function () { - let bc = toByteCode(luaCode); - L = lauxlib.luaL_newstate(); lualib.luaL_openlibs(L); - lua.lua_load(L, null, bc, lua.to_luastring("test-typeerror"), lua.to_luastring("binary")); + lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); lua.lua_pcall(L, 0, -1, 0); @@ -191,13 +176,11 @@ test('luaG_tointerror', function (t) { t.doesNotThrow(function () { - let bc = toByteCode(luaCode); - L = lauxlib.luaL_newstate(); lualib.luaL_openlibs(L); - lua.lua_load(L, null, bc, lua.to_luastring("test-typeerror"), lua.to_luastring("binary")); + lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode)); lua.lua_pcall(L, 0, -1, 0); |