Chromium Code Reviews| Index: runtime/vm/code_generator_test.cc |
| =================================================================== |
| --- runtime/vm/code_generator_test.cc (revision 7914) |
| +++ runtime/vm/code_generator_test.cc (working copy) |
| @@ -488,8 +488,13 @@ |
| Object& result = Object::Handle(); |
| result = DartEntry::InvokeStatic(function, arguments, kNoArgumentNames); |
| EXPECT(!result.IsError()); |
| - const Library& app_lib = Library::Handle( |
| - Isolate::Current()->object_store()->registered_libraries()); |
| + const GrowableObjectArray& libs = GrowableObjectArray::Handle( |
| + Isolate::Current()->object_store()->libraries()); |
| + ASSERT(!libs.IsNull()); |
| + // App lib is the last one that was loaded. |
| + intptr_t num_libs = libs.Length(); |
| + const Library& app_lib = Library::CheckedHandle(libs.At(num_libs - 1)); |
|
srdjan
2012/05/23 17:35:18
Why checked handle? Shouldn't it be ^= instead
hausner
2012/05/23 20:27:14
Done.
|
| + ASSERT(!app_lib.IsNull()); |
| const Class& cls = Class::Handle( |
| app_lib.LookupClass(String::Handle(String::NewSymbol("A")))); |
| EXPECT_EQ(cls.raw(), result.clazz()); |