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

Unified Diff: test/cctest/test-object-observe.cc

Issue 12212108: Work around nifty VS10 compiler bug (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-object-observe.cc
diff --git a/test/cctest/test-object-observe.cc b/test/cctest/test-object-observe.cc
index 190bbb29ca18636033557264cc72b2705a56d270..7fc5bf765d2d7e815bf0d9c1613d5c249a7e3239 100644
--- a/test/cctest/test-object-observe.cc
+++ b/test/cctest/test-object-observe.cc
@@ -325,7 +325,7 @@ TEST(APITestBasicMutation) {
"function observer(r) { [].push.apply(records, r); };"
"Object.observe(obj, observer);"
"obj"));
- obj->Set(String::New("foo"), Number::New(1));
+ obj->Set(String::New("foo"), Number::New(7));
obj->Set(1, Number::New(2));
// ForceSet should work just as well as Set
obj->ForceSet(String::New("foo"), Number::New(3));
@@ -345,7 +345,9 @@ TEST(APITestBasicMutation) {
const RecordExpectation expected_records[] = {
{ obj, "new", "foo", Handle<Value>() },
{ obj, "new", "1", Handle<Value>() },
- { obj, "updated", "foo", Number::New(1) },
+ // Note: use 7 not 1 below, as the latter triggers a nifty VS10 compiler bug
+ // where instead of 1.0, a garbage value would be passed into Number::New.
+ { obj, "updated", "foo", Number::New(7) },
{ obj, "updated", "1", Number::New(2) },
{ obj, "updated", "1", Number::New(4) },
{ obj, "new", "1.1", Handle<Value>() },
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698