Revert "lua: TDD of enabling base lib"

This reverts commit d8b3712817.
This commit is contained in:
rusefillc 2022-02-22 20:43:01 -05:00
parent d80f3e0b80
commit 970d63568f
2 changed files with 2 additions and 20 deletions

View File

@ -140,7 +140,8 @@ static int lua_setTickRate(lua_State* l) {
static void loadLibraries(LuaHandle& ls) {
constexpr luaL_Reg libs[] = {
{ LUA_GNAME, luaopen_base },
// TODO: do we even need the base lib?
//{ LUA_GNAME, luaopen_base },
{ LUA_MATHLIBNAME, luaopen_math },
};

View File

@ -25,25 +25,6 @@ TEST(LuaBasic, MathLib) {
EXPECT_FLOAT_EQ(result, 1.0f);
}
TEST(LuaBasic, iPairs) {
auto script = R"(
function testFunc()
counter = 0
data = {0x5F, 0x59, 0xFF, 0x00, 0x34, 0x0D, 0x80, 0x99}
for i, v in ipairs(data) do
counter = counter + 1
end
return counter
end
)";
float result = testLuaReturnsNumber(script);
EXPECT_FLOAT_EQ(result, 8);
}
TEST(LuaBasic, MathLibFloor) {
auto script = R"(
function testFunc()