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

Unified Diff: test/cctest/test-api.cc

Issue 159518: - Clamp double values as doubles to get a free NaN check and... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
===================================================================
--- test/cctest/test-api.cc (revision 2563)
+++ test/cctest/test-api.cc (working copy)
@@ -7651,6 +7651,20 @@
CHECK_EQ(0, result->Int32Value());
CHECK_EQ(0, i::Smi::cast(jsobj->GetElement(5))->value());
+ result = CompileRun("for (var i = 0; i < 8; i++) {"
+ " pixels[8] = Infinity;"
+ "}"
+ "pixels[8];");
+ CHECK_EQ(255, result->Int32Value());
+ CHECK_EQ(255, i::Smi::cast(jsobj->GetElement(8))->value());
+
+ result = CompileRun("for (var i = 0; i < 8; i++) {"
+ " pixels[9] = -Infinity;"
+ "}"
+ "pixels[9];");
+ CHECK_EQ(0, result->Int32Value());
+ CHECK_EQ(0, i::Smi::cast(jsobj->GetElement(9))->value());
+
result = CompileRun("pixels[3] = 33;"
"delete pixels[3];"
"pixels[3];");
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698