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

Unified Diff: vm/object_test.cc

Issue 11745022: - Make Boolean 'true' and 'false' singleton VM isolate objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 12 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 | « vm/object_store.cc ('k') | vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object_test.cc
===================================================================
--- vm/object_test.cc (revision 16591)
+++ vm/object_test.cc (working copy)
@@ -1613,10 +1613,8 @@
TEST_CASE(Bool) {
- const Bool& true_value = Bool::Handle(Bool::True());
- EXPECT(true_value.value());
- const Bool& false_value = Bool::Handle(Bool::False());
- EXPECT(!false_value.value());
+ EXPECT(Bool::True().value());
+ EXPECT(!Bool::False().value());
}
@@ -2543,8 +2541,8 @@
const Class& bool_class = Class::Handle(object_store->bool_class());
EXPECT_STREQ("Library:'dart:core' Class: bool",
bool_class.ToCString());
- EXPECT_STREQ("true", Bool::Handle(Bool::True()).ToCString());
- EXPECT_STREQ("false", Bool::Handle(Bool::False()).ToCString());
+ EXPECT_STREQ("true", Bool::True().ToCString());
+ EXPECT_STREQ("false", Bool::False().ToCString());
// Strings.
EXPECT_STREQ("Sugarbowl",
@@ -2846,7 +2844,7 @@
EXPECT_EQ(0, cache.NumberOfChecks());
const TypeArguments& targ_0 = TypeArguments::Handle(TypeArguments::New(2));
const TypeArguments& targ_1 = TypeArguments::Handle(TypeArguments::New(3));
- cache.AddCheck(empty_class.id(), targ_0, targ_1, Bool::Handle(Bool::True()));
+ cache.AddCheck(empty_class.id(), targ_0, targ_1, Bool::True());
EXPECT_EQ(1, cache.NumberOfChecks());
intptr_t test_class_id = -1;
AbstractTypeArguments& test_targ_0 = AbstractTypeArguments::Handle();
@@ -2856,7 +2854,7 @@
EXPECT_EQ(empty_class.id(), test_class_id);
EXPECT_EQ(targ_0.raw(), test_targ_0.raw());
EXPECT_EQ(targ_1.raw(), test_targ_1.raw());
- EXPECT_EQ(Bool::True(), test_result.raw());
+ EXPECT_EQ(Bool::True().raw(), test_result.raw());
}
« no previous file with comments | « vm/object_store.cc ('k') | vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698