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

Unified Diff: test/mjsunit/math-min-max.js

Issue 10034015: Merged r10755, r11237 into 3.8 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.8
Patch Set: Created 8 years, 8 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/version.cc ('k') | test/mjsunit/regress/regress-2056.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/math-min-max.js
diff --git a/test/mjsunit/math-min-max.js b/test/mjsunit/math-min-max.js
index 7717b3bff2d4792b306cda58cdbde25f16fb116c..e4fd313538f53270747661268a1a1d47dfbc7c39 100644
--- a/test/mjsunit/math-min-max.js
+++ b/test/mjsunit/math-min-max.js
@@ -146,6 +146,14 @@ function crankshaft_test_1(arg) {
// Double representation.
assertEquals(v0, Math.max(v0++, v9++));
assertEquals(v9, Math.min(v0++, v9++));
+ // Mixed representation.
+ assertEquals(v1, Math.min(v1++, v9++)); // int32, double
+ assertEquals(v0, Math.max(v0++, v2++)); // double, int32
+ assertEquals(v1, Math.min(v1++, v6)); // int32, tagged
+ assertEquals(v2, Math.max(v5, v2++)); // tagged, int32
+ assertEquals(v6, Math.min(v6, v9++)); // tagged, double
+ assertEquals(v0, Math.max(v0++, v5)); // double, tagged
+
// Minus zero.
assertEquals(Infinity, 1/Math.max(v7, v8));
assertEquals(-Infinity, 1/Math.min(v7, v8));
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/regress/regress-2056.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698