Move more test code to CommonArtTest
Complete migration of libdexfile and libartbase to CommonArtTest.
(libprofile and clients remain on CommonRuntimeTest because of required
refactorings.)
Bug: 78651010
Bug: 72216369
Test: make -j 40 test-art-host-gtest
make -j 2 test-art-target-gtest
Change-Id: Id10d8fc9002e0ad9451730627dfd848f5761c90c
diff --git a/libartbase/base/file_utils_test.cc b/libartbase/base/file_utils_test.cc
index e74dfe5..56d1c44 100644
--- a/libartbase/base/file_utils_test.cc
+++ b/libartbase/base/file_utils_test.cc
@@ -20,11 +20,11 @@
#include <stdlib.h>
#include "base/stl_util.h"
-#include "common_runtime_test.h"
+#include "common_art_test.h"
namespace art {
-class FileUtilsTest : public CommonRuntimeTest {};
+class FileUtilsTest : public CommonArtTest {};
TEST_F(FileUtilsTest, GetDalvikCacheFilename) {
std::string name;
@@ -63,7 +63,7 @@
// We don't expect null returns for most cases, so don't check and let std::string crash.
- // CommonRuntimeTest sets ANDROID_ROOT, so expect this to be the same.
+ // CommonArtTest sets ANDROID_ROOT, so expect this to be the same.
std::string android_root = GetAndroidRootSafe(&error_msg);
std::string android_root_env = getenv("ANDROID_ROOT");
EXPECT_EQ(android_root, android_root_env);
@@ -78,7 +78,7 @@
// Set a bogus value for ANDROID_ROOT. This should be an error.
ASSERT_EQ(0, setenv("ANDROID_ROOT", "/this/is/obviously/bogus", 1 /* overwrite */));
- EXPECT_TRUE(GetAndroidRootSafe(&error_msg) == nullptr);
+ EXPECT_EQ(GetAndroidRootSafe(&error_msg), "");
// Unset ANDROID_ROOT and see that it still returns something (as libart code is running).
ASSERT_EQ(0, unsetenv("ANDROID_ROOT"));