diff options
Diffstat (limited to 'runtime/reflection_test.cc')
-rw-r--r-- | runtime/reflection_test.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/reflection_test.cc b/runtime/reflection_test.cc index 1ba4b7b9d1..fa2f1e5793 100644 --- a/runtime/reflection_test.cc +++ b/runtime/reflection_test.cc @@ -18,13 +18,13 @@ #include <float.h> #include <limits.h> -#include "ScopedLocalRef.h" #include "art_method-inl.h" #include "base/enums.h" #include "common_compiler_test.h" #include "java_vm_ext.h" #include "jni_internal.h" +#include "nativehelper/ScopedLocalRef.h" #include "scoped_thread_state_change-inl.h" namespace art { @@ -108,9 +108,9 @@ class ReflectionTest : public CommonCompilerTest { class_loader); CHECK(c != nullptr); - *method = is_static ? c->FindDirectMethod(method_name, method_signature, kRuntimePointerSize) - : c->FindVirtualMethod(method_name, method_signature, kRuntimePointerSize); - CHECK(method != nullptr); + *method = c->FindClassMethod(method_name, method_signature, kRuntimePointerSize); + CHECK(*method != nullptr); + CHECK_EQ(is_static, (*method)->IsStatic()); if (is_static) { *receiver = nullptr; @@ -520,10 +520,11 @@ TEST_F(ReflectionTest, StaticMainMethod) { mirror::Class* klass = class_linker_->FindClass(soa.Self(), "LMain;", class_loader); ASSERT_TRUE(klass != nullptr); - ArtMethod* method = klass->FindDirectMethod("main", - "([Ljava/lang/String;)V", - kRuntimePointerSize); + ArtMethod* method = klass->FindClassMethod("main", + "([Ljava/lang/String;)V", + kRuntimePointerSize); ASSERT_TRUE(method != nullptr); + ASSERT_TRUE(method->IsStatic()); // Start runtime. bool started = runtime_->Start(); |