summaryrefslogtreecommitdiff
path: root/tests/ltm.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-04-26 21:47:54 +1000
committerBenoit Giannangeli <giann008@gmail.com>2017-04-26 14:00:02 +0200
commit6fdfa3b88c043b124eca4f91c4d1e7e3cc7046b2 (patch)
treed60c55ad8a4621f1a339e6f240675bd32059b347 /tests/ltm.js
parentf93607f954c002b251fba4e0b85493e0b2b619b4 (diff)
downloadfengari-6fdfa3b88c043b124eca4f91c4d1e7e3cc7046b2.tar.gz
fengari-6fdfa3b88c043b124eca4f91c4d1e7e3cc7046b2.tar.bz2
fengari-6fdfa3b88c043b124eca4f91c4d1e7e3cc7046b2.zip
Export luaL_openlibs from lauxlib.js
Diffstat (limited to 'tests/ltm.js')
-rw-r--r--tests/ltm.js35
1 files changed, 17 insertions, 18 deletions
diff --git a/tests/ltm.js b/tests/ltm.js
index ab68e5e..358e396 100644
--- a/tests/ltm.js
+++ b/tests/ltm.js
@@ -5,7 +5,6 @@ const beautify = require('js-beautify').js_beautify;
const lua = require("../src/lua.js");
const VM = require("../src/lvm.js");
-const linit = require("../src/linit.js");
const lauxlib = require("../src/lauxlib.js");
const OC = require('../src/lopcodes.js');
@@ -27,7 +26,7 @@ test('__index, __newindex: with actual table', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
lua.lua_call(L, 0, -1);
@@ -59,7 +58,7 @@ test('__newindex: with non table', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -92,7 +91,7 @@ test('__index function in metatable', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -134,7 +133,7 @@ test('__newindex function in metatable', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -174,7 +173,7 @@ test('__index table in metatable', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -217,7 +216,7 @@ test('__newindex table in metatable', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -271,7 +270,7 @@ test('__index table with own metatable', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -324,7 +323,7 @@ test('__newindex table with own metatable', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -425,7 +424,7 @@ test('binary __xxx functions in metatable', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -477,7 +476,7 @@ test('__eq', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -515,7 +514,7 @@ test('__lt', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -553,7 +552,7 @@ test('__le', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -591,7 +590,7 @@ test('__le that uses __lt', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -633,7 +632,7 @@ test('__unm, __bnot', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -678,7 +677,7 @@ test('__len', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -717,7 +716,7 @@ test('__concat', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");
@@ -756,7 +755,7 @@ test('__call', function (t) {
L = lauxlib.luaL_newstate();
- linit.luaL_openlibs(L);
+ lauxlib.luaL_openlibs(L);
lua.lua_load(L, null, bc, lua.to_luastring("test"), lua.to_luastring("binary"));
}, "Bytecode parsed without errors");