summaryrefslogtreecommitdiff
path: root/runtime/dex_file_test.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2017-02-01 20:40:44 -0800
committer Andreas Gampe <agampe@google.com> 2017-02-02 10:53:14 -0800
commitae78c2643375c7536affcec318a60d13d430f181 (patch)
treed7299730b4e84107d544f66b6a046af75f367669 /runtime/dex_file_test.cc
parenta85111c5f25310e3d0eac68a6f0d8cd7c6612dfe (diff)
ART: Add UnstartedRuntime support for Class.getSimpleName
This requires two native methods, isAnonymousClass and getDeclaringClass. Add tests. Bug: 34890992 Test: m Test: m test-art-host Test: Device boots Change-Id: Ib3fca2a6bb6e367ef202ff864719cab979d6c793
Diffstat (limited to 'runtime/dex_file_test.cc')
-rw-r--r--runtime/dex_file_test.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/dex_file_test.cc b/runtime/dex_file_test.cc
index 0fec856865..9dca4c0621 100644
--- a/runtime/dex_file_test.cc
+++ b/runtime/dex_file_test.cc
@@ -338,13 +338,16 @@ TEST_F(DexFileTest, ClassDefs) {
ScopedObjectAccess soa(Thread::Current());
std::unique_ptr<const DexFile> raw(OpenTestDexFile("Nested"));
ASSERT_TRUE(raw.get() != nullptr);
- EXPECT_EQ(2U, raw->NumClassDefs());
+ EXPECT_EQ(3U, raw->NumClassDefs());
const DexFile::ClassDef& c0 = raw->GetClassDef(0);
- EXPECT_STREQ("LNested$Inner;", raw->GetClassDescriptor(c0));
+ EXPECT_STREQ("LNested$1;", raw->GetClassDescriptor(c0));
const DexFile::ClassDef& c1 = raw->GetClassDef(1);
- EXPECT_STREQ("LNested;", raw->GetClassDescriptor(c1));
+ EXPECT_STREQ("LNested$Inner;", raw->GetClassDescriptor(c1));
+
+ const DexFile::ClassDef& c2 = raw->GetClassDef(2);
+ EXPECT_STREQ("LNested;", raw->GetClassDescriptor(c2));
}
TEST_F(DexFileTest, GetMethodSignature) {