Add DexCache table of <Method*, Method::GetCode()>
Change-Id: I69d46e61ff40456ff76888ad90b00e2036250d40
diff --git a/src/compiler_test.cc b/src/compiler_test.cc
index 63aeee2..cab932f 100644
--- a/src/compiler_test.cc
+++ b/src/compiler_test.cc
@@ -95,6 +95,17 @@
EXPECT_TRUE(field != NULL);
}
+ // TODO check Class::IsVerified for all classes
+
+ // TODO: check that all Method::GetCode() values are non-null
+
+ EXPECT_EQ(dex->NumMethodIds(), dex_cache->NumCodeAndMethods());
+ CodeAndMethods* code_and_methods = dex_cache->GetCodeAndMethods();
+ for (size_t i = 0; i < dex_cache->NumCodeAndMethods(); i++) {
+ Method* method = dex_cache->GetResolvedMethod(i);
+ EXPECT_EQ(method->GetCode(), code_and_methods->GetResolvedCode(i));
+ EXPECT_EQ(method, code_and_methods->GetResolvedMethod(i));
+ }
}
TEST_F(CompilerTest, BasicCodegen) {