Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1467)

Unified Diff: test/mjsunit/constant-folding-2.js

Issue 425943002: Inline Math.fround in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: arm64 port Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | test/mjsunit/es6/math-fround.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/constant-folding-2.js
diff --git a/test/mjsunit/constant-folding-2.js b/test/mjsunit/constant-folding-2.js
index f429c6ca10c928de1a1b98c4b143f7c4755860ea..73cf040f5a8c56015249c279d530e790c3e03eab 100644
--- a/test/mjsunit/constant-folding-2.js
+++ b/test/mjsunit/constant-folding-2.js
@@ -181,6 +181,17 @@ test(function mathRound() {
assertEquals(Math.pow(2, 52) + 1, Math.round(Math.pow(2, 52) + 1));
});
+test(function mathFround() {
+ assertTrue(isNaN(Math.fround(NaN)));
+ assertEquals("Infinity", String(1/Math.fround(0)));
+ assertEquals("-Infinity", String(1/Math.fround(-0)));
+ assertEquals("Infinity", String(Math.fround(Infinity)));
+ assertEquals("-Infinity", String(Math.fround(-Infinity)));
+ assertEquals("Infinity", String(Math.fround(1E200)));
+ assertEquals("-Infinity", String(Math.fround(-1E200)));
+ assertEquals(3.1415927410125732, Math.fround(Math.PI));
+});
+
test(function mathFloor() {
assertEquals(1, Math.floor(1.5));
assertEquals(-2, Math.floor(-1.5));
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | test/mjsunit/es6/math-fround.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698