summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/cacheir/string-fromcodepoint.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/cacheir/string-fromcodepoint.js')
-rw-r--r--js/src/jit-test/tests/cacheir/string-fromcodepoint.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/cacheir/string-fromcodepoint.js b/js/src/jit-test/tests/cacheir/string-fromcodepoint.js
new file mode 100644
index 0000000000..254f41fd85
--- /dev/null
+++ b/js/src/jit-test/tests/cacheir/string-fromcodepoint.js
@@ -0,0 +1,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);
+}