summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/tableSwitchDouble.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/jaeger/tableSwitchDouble.js')
-rw-r--r--js/src/jit-test/tests/jaeger/tableSwitchDouble.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/tableSwitchDouble.js b/js/src/jit-test/tests/jaeger/tableSwitchDouble.js
new file mode 100644
index 000000000..df9fe2a55
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/tableSwitchDouble.js
@@ -0,0 +1,13 @@
+
+function f(a) {
+ switch(a) {
+ case 3: return 3;
+ case 4: return 4;
+ default: return -1;
+ }
+}
+
+assertEq(f(-0.0), -1);
+assertEq(f(3.14), -1);
+assertEq(f(12.34), -1);
+