Allow private methods in interfaces
Fixes: 267839015
Test: atest ClassLinkerTest#LibCore
Change-Id: Ib3a98611beb73a4e44ce42f657d5fe54f225115e
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc
index 05f31b2..274ca9d 100644
--- a/runtime/class_linker_test.cc
+++ b/runtime/class_linker_test.cc
@@ -283,9 +283,10 @@
klass->GetDescriptor(&temp2)));
if (klass->IsInterface()) {
EXPECT_TRUE(klass->IsAbstract());
- // Check that all direct methods are static (either <clinit> or a regular static method).
+ // Check that all methods are direct and either static (<clinit> or a regular static method),
+ // or private.
for (ArtMethod& m : klass->GetDirectMethods(kRuntimePointerSize)) {
- EXPECT_TRUE(m.IsStatic());
+ EXPECT_TRUE(m.IsStatic() || m.IsPrivate());
EXPECT_TRUE(m.IsDirect());
}
} else {