Skip to content

Commit

Permalink
chore: update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
magic-akari committed Sep 10, 2024
1 parent 2c47ee4 commit e11230c
Show file tree
Hide file tree
Showing 14 changed files with 119 additions and 97 deletions.
19 changes: 19 additions & 0 deletions crates/swc/tests/fixture/issues-9xxx/9540/input/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": false
},
"target": "es2022",
"loose": false,
"minify": {
"compress": false,
"mangle": false
}
},
"module": {
"type": "es6"
},
"minify": true,
"isModule": true
}
2 changes: 2 additions & 0 deletions crates/swc/tests/fixture/issues-9xxx/9540/input/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
219994525426954..toString();
219994525420000..toString();
1 change: 1 addition & 0 deletions crates/swc/tests/fixture/issues-9xxx/9540/output/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0xc815778a650a.toString();21999452542e4.toString();

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/swc_ecma_codegen/tests/fixture/number/output.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default function(r, t, e) {
var d = c[_ - 15], v = (d << 25 | d >>> 7) ^ (d << 14 | d >>> 18) ^ d >>> 3, H = c[_ - 2], p = (H << 15 | H >>> 17) ^ (H << 13 | H >>> 19) ^ H >>> 10;
c[_] = v + c[_ - 7] + p + c[_ - 16];
}
var w = h & u ^ ~h & f, A = n & o ^ n & s ^ o & s, g = (n << 30 | n >>> 2) ^ (n << 19 | n >>> 13) ^ (n << 10 | n >>> 22), y = l + ((h << 26 | h >>> 6) ^ (h << 21 | h >>> 11) ^ (h << 7 | h >>> 25)) + w + i[_] + c[_], B = g + A;
l = f, f = u, u = h, h = a + y | 0, a = s, s = o, o = n, n = y + B | 0;
var w = h & u ^ ~h & f, x = n & o ^ n & s ^ o & s, A = (n << 30 | n >>> 2) ^ (n << 19 | n >>> 13) ^ (n << 10 | n >>> 22), g = l + ((h << 26 | h >>> 6) ^ (h << 21 | h >>> 11) ^ (h << 7 | h >>> 25)) + w + i[_] + c[_], y = A + x;
l = f, f = u, u = h, h = a + g | 0, a = s, s = o, o = n, n = g + y | 0;
}
// Intermediate hash value
e[0] = e[0] + n | 0, e[1] = e[1] + o | 0, e[2] = e[2] + s | 0, e[3] = e[3] + a | 0, e[4] = e[4] + h | 0, e[5] = e[5] + u | 0, e[6] = e[6] + f | 0, e[7] = e[7] + l | 0;
Expand Down
Loading

0 comments on commit e11230c

Please sign in to comment.