Skip to content

Commit 83ba540

Browse files
committed
lint
1 parent 6de84d3 commit 83ba540

File tree

1 file changed

+23
-34
lines changed

1 file changed

+23
-34
lines changed

test/unit/expressions.spec.ts

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -119,42 +119,31 @@ test.each(unsupportedIn53And54)("Unsupported bitop 5.4 (%p)", input => {
119119

120120
// Execution tests: verify >>> produces correct results matching JS semantics
121121
for (const expression of ["-5 >>> 0", "-1 >>> 0", "1 >>> 0", "-1 >>> 16", "255 >>> 4"]) {
122-
util.testEachVersion(
123-
`Unsigned right shift execution (${expression})`,
124-
() => util.testExpression(expression),
125-
{
126-
[tstl.LuaTarget.Universal]: false,
127-
[tstl.LuaTarget.Lua50]: false, // No bit library in WASM runtime
128-
[tstl.LuaTarget.Lua51]: false, // No bit library in WASM runtime
129-
[tstl.LuaTarget.Lua52]: builder => builder.expectToMatchJsResult(),
130-
[tstl.LuaTarget.Lua53]: builder => builder.expectToMatchJsResult(),
131-
[tstl.LuaTarget.Lua54]: builder => builder.expectToMatchJsResult(),
132-
[tstl.LuaTarget.Lua55]: builder => builder.expectToMatchJsResult(),
133-
[tstl.LuaTarget.LuaJIT]: false, // Can't execute LuaJIT in tests
134-
[tstl.LuaTarget.Luau]: false,
135-
}
136-
);
122+
util.testEachVersion(`Unsigned right shift execution (${expression})`, () => util.testExpression(expression), {
123+
[tstl.LuaTarget.Universal]: false,
124+
[tstl.LuaTarget.Lua50]: false, // No bit library in WASM runtime
125+
[tstl.LuaTarget.Lua51]: false, // No bit library in WASM runtime
126+
[tstl.LuaTarget.Lua52]: builder => builder.expectToMatchJsResult(),
127+
[tstl.LuaTarget.Lua53]: builder => builder.expectToMatchJsResult(),
128+
[tstl.LuaTarget.Lua54]: builder => builder.expectToMatchJsResult(),
129+
[tstl.LuaTarget.Lua55]: builder => builder.expectToMatchJsResult(),
130+
[tstl.LuaTarget.LuaJIT]: false, // Can't execute LuaJIT in tests
131+
[tstl.LuaTarget.Luau]: false,
132+
});
137133
}
138134

139-
for (const code of [
140-
"let a = -5; a >>>= 0; return a;",
141-
"let a = -1; a >>>= 16; return a;",
142-
]) {
143-
util.testEachVersion(
144-
`Unsigned right shift assignment execution (${code})`,
145-
() => util.testFunction(code),
146-
{
147-
[tstl.LuaTarget.Universal]: false,
148-
[tstl.LuaTarget.Lua50]: false, // No bit library in WASM runtime
149-
[tstl.LuaTarget.Lua51]: false, // No bit library in WASM runtime
150-
[tstl.LuaTarget.Lua52]: builder => builder.expectToMatchJsResult(),
151-
[tstl.LuaTarget.Lua53]: builder => builder.expectToMatchJsResult(),
152-
[tstl.LuaTarget.Lua54]: builder => builder.expectToMatchJsResult(),
153-
[tstl.LuaTarget.Lua55]: builder => builder.expectToMatchJsResult(),
154-
[tstl.LuaTarget.LuaJIT]: false, // Can't execute LuaJIT in tests
155-
[tstl.LuaTarget.Luau]: false,
156-
}
157-
);
135+
for (const code of ["let a = -5; a >>>= 0; return a;", "let a = -1; a >>>= 16; return a;"]) {
136+
util.testEachVersion(`Unsigned right shift assignment execution (${code})`, () => util.testFunction(code), {
137+
[tstl.LuaTarget.Universal]: false,
138+
[tstl.LuaTarget.Lua50]: false, // No bit library in WASM runtime
139+
[tstl.LuaTarget.Lua51]: false, // No bit library in WASM runtime
140+
[tstl.LuaTarget.Lua52]: builder => builder.expectToMatchJsResult(),
141+
[tstl.LuaTarget.Lua53]: builder => builder.expectToMatchJsResult(),
142+
[tstl.LuaTarget.Lua54]: builder => builder.expectToMatchJsResult(),
143+
[tstl.LuaTarget.Lua55]: builder => builder.expectToMatchJsResult(),
144+
[tstl.LuaTarget.LuaJIT]: false, // Can't execute LuaJIT in tests
145+
[tstl.LuaTarget.Luau]: false,
146+
});
158147
}
159148

160149
test.each(["1+1", "-1+1", "1*30+4", "1*(3+4)", "1*(3+4*2)", "10-(4+5)"])(

0 commit comments

Comments
 (0)