summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/cacheir/string-fromcodepoint.js
blob: 254f41fd855b1b96f352231f3e368d0b8082b716 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function f() {
  for (var i = 0x10F000; i <= 0x10FFFF + 1; ++i) {
    String.fromCodePoint(i);
  }
}

for (var i = 0; i < 2; ++i) {
  var err;
  try {
    f();
  } catch (e) {
    err = e;
  }
  assertEq(err instanceof RangeError, true);
}