Index: runtime/vm/code_generator_test.cc |
=================================================================== |
--- runtime/vm/code_generator_test.cc (revision 7922) |
+++ runtime/vm/code_generator_test.cc (working copy) |
@@ -488,8 +488,14 @@ |
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(); |
+ Library& app_lib = Library::Handle(); |
+ app_lib ^= libs.At(num_libs - 1); |
+ ASSERT(!app_lib.IsNull()); |
const Class& cls = Class::Handle( |
app_lib.LookupClass(String::Handle(String::NewSymbol("A")))); |
EXPECT_EQ(cls.raw(), result.clazz()); |