summaryrefslogtreecommitdiff
path: root/tests/lmathlib.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lmathlib.js')
-rw-r--r--tests/lmathlib.js31
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"));