diff options
author | Sebastien Hertz <shertz@google.com> | 2014-12-04 10:21:02 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-12-04 10:21:02 +0000 |
commit | baede348efa86600e64fb9db43cec1eef07c86d9 (patch) | |
tree | 7ab2c2a69c72b7cd2ce1b7bf1ed9d26b07e4fd7e /runtime/class_linker_test.cc | |
parent | 989210eb453898bd94bf3527f18f6146b07aa4bb (diff) | |
parent | 6963e44331258b131bcc0599b868ba15902d6d22 (diff) | |
download | android_art-baede348efa86600e64fb9db43cec1eef07c86d9.tar.gz android_art-baede348efa86600e64fb9db43cec1eef07c86d9.tar.bz2 android_art-baede348efa86600e64fb9db43cec1eef07c86d9.zip |
Merge "JDWP: fix breakpoint for method in the image"
Diffstat (limited to 'runtime/class_linker_test.cc')
-rw-r--r-- | runtime/class_linker_test.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc index ac078aa68f..4f09460197 100644 --- a/runtime/class_linker_test.cc +++ b/runtime/class_linker_test.cc @@ -1137,4 +1137,24 @@ TEST_F(ClassLinkerTest, Preverified_App) { CheckPreverified(statics.Get(), true); } +TEST_F(ClassLinkerTest, IsBootStrapClassLoaded) { + ScopedObjectAccess soa(Thread::Current()); + + StackHandleScope<3> hs(soa.Self()); + Handle<mirror::ClassLoader> class_loader( + hs.NewHandle(soa.Decode<mirror::ClassLoader*>(LoadDex("Statics")))); + + // java.lang.Object is a bootstrap class. + Handle<mirror::Class> jlo_class( + hs.NewHandle(class_linker_->FindSystemClass(soa.Self(), "Ljava/lang/Object;"))); + ASSERT_TRUE(jlo_class.Get() != nullptr); + EXPECT_TRUE(jlo_class.Get()->IsBootStrapClassLoaded()); + + // Statics is not a bootstrap class. + Handle<mirror::Class> statics( + hs.NewHandle(class_linker_->FindClass(soa.Self(), "LStatics;", class_loader))); + ASSERT_TRUE(statics.Get() != nullptr); + EXPECT_FALSE(statics.Get()->IsBootStrapClassLoaded()); +} + } // namespace art |