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/utils_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/utils_test.cc')
-rw-r--r-- | runtime/utils_test.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/runtime/utils_test.cc b/runtime/utils_test.cc index 6ccbd13..ae24b77 100644 --- a/runtime/utils_test.cc +++ b/runtime/utils_test.cc @@ -106,7 +106,7 @@ TEST_F(UtilsTest, PrettyReturnType) { TEST_F(UtilsTest, PrettyTypeOf) { ScopedObjectAccess soa(Thread::Current()); - EXPECT_EQ("null", PrettyTypeOf(NULL)); + EXPECT_EQ("null", PrettyTypeOf(nullptr)); StackHandleScope<2> hs(soa.Self()); Handle<mirror::String> s(hs.NewHandle(mirror::String::AllocFromModifiedUtf8(soa.Self(), ""))); @@ -116,7 +116,7 @@ TEST_F(UtilsTest, PrettyTypeOf) { EXPECT_EQ("short[]", PrettyTypeOf(a.Get())); mirror::Class* c = class_linker_->FindSystemClass(soa.Self(), "[Ljava/lang/String;"); - ASSERT_TRUE(c != NULL); + ASSERT_TRUE(c != nullptr); mirror::Object* o = mirror::ObjectArray<mirror::String>::Alloc(soa.Self(), c, 0); EXPECT_EQ("java.lang.String[]", PrettyTypeOf(o)); EXPECT_EQ("java.lang.Class<java.lang.String[]>", PrettyTypeOf(o->GetClass())); @@ -124,25 +124,25 @@ TEST_F(UtilsTest, PrettyTypeOf) { TEST_F(UtilsTest, PrettyClass) { ScopedObjectAccess soa(Thread::Current()); - EXPECT_EQ("null", PrettyClass(NULL)); + EXPECT_EQ("null", PrettyClass(nullptr)); mirror::Class* c = class_linker_->FindSystemClass(soa.Self(), "[Ljava/lang/String;"); - ASSERT_TRUE(c != NULL); + ASSERT_TRUE(c != nullptr); mirror::Object* o = mirror::ObjectArray<mirror::String>::Alloc(soa.Self(), c, 0); EXPECT_EQ("java.lang.Class<java.lang.String[]>", PrettyClass(o->GetClass())); } TEST_F(UtilsTest, PrettyClassAndClassLoader) { ScopedObjectAccess soa(Thread::Current()); - EXPECT_EQ("null", PrettyClassAndClassLoader(NULL)); + EXPECT_EQ("null", PrettyClassAndClassLoader(nullptr)); mirror::Class* c = class_linker_->FindSystemClass(soa.Self(), "[Ljava/lang/String;"); - ASSERT_TRUE(c != NULL); + ASSERT_TRUE(c != nullptr); mirror::Object* o = mirror::ObjectArray<mirror::String>::Alloc(soa.Self(), c, 0); EXPECT_EQ("java.lang.Class<java.lang.String[],null>", PrettyClassAndClassLoader(o->GetClass())); } TEST_F(UtilsTest, PrettyField) { ScopedObjectAccess soa(Thread::Current()); - EXPECT_EQ("null", PrettyField(NULL)); + EXPECT_EQ("null", PrettyField(nullptr)); mirror::Class* java_lang_String = class_linker_->FindSystemClass(soa.Self(), "Ljava/lang/String;"); @@ -216,21 +216,21 @@ TEST_F(UtilsTest, MangleForJni) { TEST_F(UtilsTest, JniShortName_JniLongName) { ScopedObjectAccess soa(Thread::Current()); mirror::Class* c = class_linker_->FindSystemClass(soa.Self(), "Ljava/lang/String;"); - ASSERT_TRUE(c != NULL); + ASSERT_TRUE(c != nullptr); mirror::ArtMethod* m; m = c->FindVirtualMethod("charAt", "(I)C"); - ASSERT_TRUE(m != NULL); + ASSERT_TRUE(m != nullptr); EXPECT_EQ("Java_java_lang_String_charAt", JniShortName(m)); EXPECT_EQ("Java_java_lang_String_charAt__I", JniLongName(m)); m = c->FindVirtualMethod("indexOf", "(Ljava/lang/String;I)I"); - ASSERT_TRUE(m != NULL); + ASSERT_TRUE(m != nullptr); EXPECT_EQ("Java_java_lang_String_indexOf", JniShortName(m)); EXPECT_EQ("Java_java_lang_String_indexOf__Ljava_lang_String_2I", JniLongName(m)); m = c->FindDirectMethod("copyValueOf", "([CII)Ljava/lang/String;"); - ASSERT_TRUE(m != NULL); + ASSERT_TRUE(m != nullptr); EXPECT_EQ("Java_java_lang_String_copyValueOf", JniShortName(m)); EXPECT_EQ("Java_java_lang_String_copyValueOf___3CII", JniLongName(m)); } |