diff options
author | 2023-02-04 13:08:18 +0000 | |
---|---|---|
committer | 2023-02-05 18:51:25 +0000 | |
commit | a9fe2d8b08a015cae222407780e940e301043aaf (patch) | |
tree | e324dd60536de0ce5272d721f715866996ea1188 /runtime/class_linker_test.cc | |
parent | 9ec5df7d57ed7d007cc8e3f03803184850753c82 (diff) |
Allow private methods in interfaces
Fixes: 267839015
Test: atest ClassLinkerTest#LibCore
Change-Id: Ib3a98611beb73a4e44ce42f657d5fe54f225115e
Diffstat (limited to 'runtime/class_linker_test.cc')
-rw-r--r-- | runtime/class_linker_test.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc index 05f31b2b5b..274ca9d708 100644 --- a/runtime/class_linker_test.cc +++ b/runtime/class_linker_test.cc @@ -283,9 +283,10 @@ class ClassLinkerTest : public CommonRuntimeTest { 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 { |