summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testDoubleToStr.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testDoubleToStr.js')
-rw-r--r--js/src/jit-test/tests/basic/testDoubleToStr.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testDoubleToStr.js b/js/src/jit-test/tests/basic/testDoubleToStr.js
new file mode 100644
index 0000000000..9eea240bb6
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testDoubleToStr.js
@@ -0,0 +1,9 @@
+function testDoubleToStr() {
+ var x = 0.0;
+ var y = 5.5;
+ for (var i = 0; i < 200; i++) {
+ x += parseFloat(y.toString());
+ }
+ return x;
+}
+assertEq(testDoubleToStr(), 5.5*200);