Skip to content

Precompile lualib and jsonlib for tests#983

Merged
Perryvw merged 1 commit into
TypeScriptToLua:masterfrom
lolleko:test-optimizations
Feb 19, 2021
Merged

Precompile lualib and jsonlib for tests#983
Perryvw merged 1 commit into
TypeScriptToLua:masterfrom
lolleko:test-optimizations

Conversation

@lolleko

@lolleko lolleko commented Feb 12, 2021

Copy link
Copy Markdown
Member

No description provided.

Comment thread test/util.ts
if (lauxlib.luaL_loadstring(L, to_luastring(luaCode)) !== lua.LUA_OK) throw Error(lua.lua_tojsstring(L, -1));

const writer = (_: any, newBytes: Uint8Array, size: number, data: number[]) => {
data.push(...newBytes.slice(0, size));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the same as just data.push(...newBytes);?

Comment thread test/util.ts
return 0;
};

const data: number[] = [];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move this up since you already used it in the definition of writer

@Perryvw Perryvw merged commit d075097 into TypeScriptToLua:master Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants