From e7cf17565e26dc5c4a100688526b0dfed1220e44 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 11 May 2017 14:02:23 +1000 Subject: Move luaL_openlibs from lauxlib to lualib --- tests/lmathlib.js | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'tests/lmathlib.js') diff --git a/tests/lmathlib.js b/tests/lmathlib.js index f894348..8fcd9a8 100644 --- a/tests/lmathlib.js +++ b/tests/lmathlib.js @@ -5,8 +5,9 @@ const test = require('tape'); const tests = require("./tests.js"); const toByteCode = tests.toByteCode; -const lauxlib = require("../src/lauxlib.js"); -const lua = require('../src/lua.js'); +const lua = require('../src/lua.js'); +const lauxlib = require('../src/lauxlib.js'); +const lualib = require('../src/lualib.js'); test('math.abs, math.sin, math.cos, math.tan, math.asin, math.acos, math.atan', function (t) { @@ -23,7 +24,7 @@ test('math.abs, math.sin, math.cos, math.tan, math.asin, math.acos, math.atan', L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -88,7 +89,7 @@ test('math.ceil, math.floor', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -124,7 +125,7 @@ test('math.deg, math.rad', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -160,7 +161,7 @@ test('math.log', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -202,7 +203,7 @@ test('math.exp', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -232,7 +233,7 @@ test('math.min, math.max', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -268,7 +269,7 @@ test('math.random', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -302,7 +303,7 @@ test('math.sqrt', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -332,7 +333,7 @@ test('math.tointeger', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -362,7 +363,7 @@ test('math.type', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -404,7 +405,7 @@ test('math.ult', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -434,7 +435,7 @@ test('math.fmod', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); @@ -464,7 +465,7 @@ test('math.modf', function (t) { L = lauxlib.luaL_newstate(); - lauxlib.luaL_openlibs(L); + lualib.luaL_openlibs(L); lua.lua_load(L, null, bc, lua.to_luastring("test-math"), lua.to_luastring("binary")); -- cgit v1.2.3-54-g00ecf