summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testDoubleToStr.js
blob: 9eea240bb684bc9ab0d89b11af24e5b85f5eccaa (plain)
1
2
3
4
5
6
7
8
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);