diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-11 14:02:23 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-11 15:19:18 +1000 |
commit | e7cf17565e26dc5c4a100688526b0dfed1220e44 (patch) | |
tree | ee4606b23f9c62ecf0e6da20dcbf0472d5339fd9 /tests/lmathlib.js | |
parent | be3f9810115cbaded69be37ebc3d088ee252a225 (diff) | |
download | fengari-e7cf17565e26dc5c4a100688526b0dfed1220e44.tar.gz fengari-e7cf17565e26dc5c4a100688526b0dfed1220e44.tar.bz2 fengari-e7cf17565e26dc5c4a100688526b0dfed1220e44.zip |
Move luaL_openlibs from lauxlib to lualib
Diffstat (limited to 'tests/lmathlib.js')
-rw-r--r-- | tests/lmathlib.js | 31 |
1 files changed, 16 insertions, 15 deletions
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")); |