Index: test/mjsunit/regress/regress-662845.js |
diff --git a/test/mjsunit/compiler/regress-5158.js b/test/mjsunit/regress/regress-662845.js |
similarity index 66% |
copy from test/mjsunit/compiler/regress-5158.js |
copy to test/mjsunit/regress/regress-662845.js |
index ead5f4ed9d36bde7ddf9036f8f18bc11bc386ed3..7740ed10ff5c62234e5788e3c0c0782398f60414 100644 |
--- a/test/mjsunit/compiler/regress-5158.js |
+++ b/test/mjsunit/regress/regress-662845.js |
@@ -5,12 +5,11 @@ |
// Flags: --allow-natives-syntax |
function foo(x) { |
- x = +x; |
- return (x > 0) ? x : 0 - x; |
+ (function() { x = 1; })() |
+ return arguments[0]; |
} |
-foo(1); |
-foo(-1); |
-foo(0); |
+assertEquals(1, foo(42)); |
+assertEquals(1, foo(42)); |
%OptimizeFunctionOnNextCall(foo); |
-assertEquals(2147483648, foo(-2147483648)); |
+assertEquals(1, foo(42)); |