summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/record-tuple/with.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/record-tuple/with.js')
-rw-r--r--js/src/jit-test/tests/record-tuple/with.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/record-tuple/with.js b/js/src/jit-test/tests/record-tuple/with.js
new file mode 100644
index 0000000000..920512caa9
--- /dev/null
+++ b/js/src/jit-test/tests/record-tuple/with.js
@@ -0,0 +1,11 @@
+// |jit-test| skip-if: !this.hasOwnProperty("Tuple")
+
+function f() {
+ var expected = #[1, "monkeys", 3];
+ assertEq(#[1,2,3].with(1, "monkeys"), expected);
+ assertEq(Object(#[1,2,3]).with(1, "monkeys"), expected);
+}
+
+for (i = 0; i < 500; i++) {
+ f();
+}