Skip to content

Commit 2b6a122

Browse files
committed
Add bit32 translation tests for Luau
1 parent d96fbee commit 2b6a122

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

test/translation/__snapshots__/transformation.spec.ts.snap

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ repeat
99
do
1010
continue
1111
end
12-
until not false"
12+
until not false
13+
a = bit32.rshift(34193128, 23)
14+
b = bit32.lshift(34193128, 23)
15+
c = bit32.bxor(34193128, 23)
16+
d = bit32.band(34193128, 23)
17+
e = bit32.bnot(d)
18+
f = bit32.bor(34193128, 23)"
1319
`;
1420

1521
exports[`Transformation (blockScopeVariables) 1`] = `

test/translation/transformation/luau/luauSpecificTransformations.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ while (false) {
77
do {
88
continue;
99
} while (false);
10+
11+
const a = 34193128 >>> 23;
12+
const b = 34193128 << 23;
13+
const c = 34193128 ^ 23;
14+
const d = 34193128 & 23;
15+
const e = ~d;
16+
const f = 34193128 | 23;

0 commit comments

Comments
 (0)