summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/recover-string-from-charcode.js
blob: be060be8e7366c57f656843f390f7420b82e08c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// |jit-test| --fast-warmup; --ion-offthread-compile=off

function foo(n, trigger) {
  let result = String.fromCharCode(n * -1);
  if (trigger) {
    assertEq(result, "\0");
  }
}

for (var i = 0; i < 100; i++) {
  foo(-50, false);
}
foo(0, true);