]> git.saurik.com Git - apple/javascriptcore.git/blame_incremental - tests/stress/math-abs-positive.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / math-abs-positive.js
... / ...
CommitLineData
1var minus_three_quarters = -0.75;
2
3function foo() {
4 return Math.abs(minus_three_quarters);
5}
6
7for (var i = 0; i < 10000; i++) {
8 var result = foo();
9 if (result < 0)
10 throw "Error: Math.abs returned a negative value.";
11}