diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-04-21 16:50:40 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-04-22 12:44:27 -0700 |
commit | 2cebb24bfc3247d3e9be138a3350106737455918 (patch) | |
tree | d04d27d21b3c7733d784e303f01f873bb99e7770 /runtime/reflection_test.cc | |
parent | 1f02f1a7b3073b8fef07770a67fbf94afad317f0 (diff) | |
download | art-2cebb24bfc3247d3e9be138a3350106737455918.zip art-2cebb24bfc3247d3e9be138a3350106737455918.tar.gz art-2cebb24bfc3247d3e9be138a3350106737455918.tar.bz2 |
Replace NULL with nullptr
Also fixed some lines that were too long, and a few other minor
details.
Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
Diffstat (limited to 'runtime/reflection_test.cc')
-rw-r--r-- | runtime/reflection_test.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/runtime/reflection_test.cc b/runtime/reflection_test.cc index 7aefdaa..a62bc5e 100644 --- a/runtime/reflection_test.cc +++ b/runtime/reflection_test.cc @@ -37,35 +37,35 @@ class ReflectionTest : public CommonCompilerTest { // Turn on -verbose:jni for the JNI tests. // gLogVerbosity.jni = true; - vm_->AttachCurrentThread(&env_, NULL); + vm_->AttachCurrentThread(&env_, nullptr); ScopedLocalRef<jclass> aioobe(env_, env_->FindClass("java/lang/ArrayIndexOutOfBoundsException")); - CHECK(aioobe.get() != NULL); + CHECK(aioobe.get() != nullptr); aioobe_ = reinterpret_cast<jclass>(env_->NewGlobalRef(aioobe.get())); ScopedLocalRef<jclass> ase(env_, env_->FindClass("java/lang/ArrayStoreException")); - CHECK(ase.get() != NULL); + CHECK(ase.get() != nullptr); ase_ = reinterpret_cast<jclass>(env_->NewGlobalRef(ase.get())); ScopedLocalRef<jclass> sioobe(env_, env_->FindClass("java/lang/StringIndexOutOfBoundsException")); - CHECK(sioobe.get() != NULL); + CHECK(sioobe.get() != nullptr); sioobe_ = reinterpret_cast<jclass>(env_->NewGlobalRef(sioobe.get())); } void CleanUpJniEnv() { - if (aioobe_ != NULL) { + if (aioobe_ != nullptr) { env_->DeleteGlobalRef(aioobe_); - aioobe_ = NULL; + aioobe_ = nullptr; } - if (ase_ != NULL) { + if (ase_ != nullptr) { env_->DeleteGlobalRef(ase_); - ase_ = NULL; + ase_ = nullptr; } - if (sioobe_ != NULL) { + if (sioobe_ != nullptr) { env_->DeleteGlobalRef(sioobe_); - sioobe_ = NULL; + sioobe_ = nullptr; } } @@ -105,7 +105,7 @@ class ReflectionTest : public CommonCompilerTest { mirror::Class* c = class_linker_->FindClass(self, DotToDescriptor(class_name).c_str(), class_loader); - CHECK(c != NULL); + CHECK(c != nullptr); *method = is_static ? c->FindDirectMethod(method_name, method_signature) : c->FindVirtualMethod(method_name, method_signature); @@ -501,10 +501,10 @@ TEST_F(ReflectionTest, StaticMainMethod) { CompileDirectMethod(class_loader, "Main", "main", "([Ljava/lang/String;)V"); mirror::Class* klass = class_linker_->FindClass(soa.Self(), "LMain;", class_loader); - ASSERT_TRUE(klass != NULL); + ASSERT_TRUE(klass != nullptr); mirror::ArtMethod* method = klass->FindDirectMethod("main", "([Ljava/lang/String;)V"); - ASSERT_TRUE(method != NULL); + ASSERT_TRUE(method != nullptr); // Start runtime. bool started = runtime_->Start(); |