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

Unified Diff: vm/object_test.cc

Issue 10827249: - Register canonical names for internal VM classes and get rid of the method GetSingletonClassName (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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 10528)
+++ vm/object_test.cc (working copy)
@@ -21,7 +21,7 @@
Class::New(class_name, script, Scanner::kDummyTokenIndex));
// Class has no fields.
- const Array& no_fields = Array::Handle(Array::Empty());
+ const Array& no_fields = Array::Handle(Object::empty_array());
cls.SetFields(no_fields);
// Create and populate the function arrays.
@@ -111,6 +111,8 @@
cls.set_interfaces(interfaces);
cls.Finalize();
+ ASSERT(cls.functions_cache() == Array::null());
+ cls.InitFunctionsCache();
const Array& array = Array::Handle(cls.functions_cache());
array.SetAt(0, function_name);
cls.set_functions_cache(array);
@@ -172,7 +174,7 @@
Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex));
// No functions and no super class for the EmptyClass.
- const Array& no_fields = Array::Handle(Array::Empty());
+ const Array& no_fields = Array::Handle(Object::empty_array());
empty_class.SetFields(no_fields);
empty_class.Finalize();
EXPECT_EQ(kObjectAlignment, empty_class.instance_size());
@@ -203,7 +205,7 @@
Script& script = Script::Handle();
const Class& factory_class =
Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex));
- const Array& no_fields = Array::Handle(Array::Empty());
+ const Array& no_fields = Array::Handle(Object::empty_array());
// Finalizes the class.
factory_class.SetFields(no_fields);
@@ -1765,7 +1767,7 @@
other_array.SetAt(2, array);
EXPECT(!array.Equals(other_array));
- EXPECT_EQ(0, Array::Handle(Array::Empty()).Length());
+ EXPECT_EQ(0, Array::Handle(Object::empty_array()).Length());
}
« 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