summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wright <jonathan.wright@arm.com>2020-07-16 13:02:47 +0100
committerJonathan Wright <jonathan.wright@arm.com>2020-07-23 19:16:52 +0100
commit0241a1304fd183ee24fbdfe6891f18fdedea38f9 (patch)
treed310d7e74f3f66d42108f708557e81e8959da885
parentab7cd970a83609f98e8542cea8b81e8d92ddab83 (diff)
Fix file path manipulation on Windows
File path manipulation code introduced in previous commits only supported char_t[]-based POSIX pathnames. This commit adds support for wchar_t[]-based Windows pathnames. Bug: 993876 Change-Id: Ie51eb0a18063ad3209779d9a799309e7a7cd729e
-rw-r--r--gtest/cjpeg-gtest-wrapper.cpp24
-rw-r--r--gtest/djpeg-gtest-wrapper.cpp60
-rw-r--r--gtest/gtest-utils.cpp9
-rw-r--r--gtest/gtest-utils.h4
-rw-r--r--gtest/jpegtran-gtest-wrapper.cpp8
-rw-r--r--gtest/tjbench-gtest-wrapper.cpp8
6 files changed, 63 insertions, 50 deletions
diff --git a/gtest/cjpeg-gtest-wrapper.cpp b/gtest/cjpeg-gtest-wrapper.cpp
index 8e2f7aa..1fa10af 100644
--- a/gtest/cjpeg-gtest-wrapper.cpp
+++ b/gtest/cjpeg-gtest-wrapper.cpp
@@ -34,7 +34,7 @@ TEST(CJPEGTest, RGBISlow) {
GetTestFilePath(&icc_path, "test1.icc");
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_rgb_islow.jpg");
std::string prog_name = "cjpeg";
@@ -63,7 +63,7 @@ TEST(CJPEGTest, IFastOpt422) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_422_ifast_opt.jpg");
std::string prog_name = "cjpeg";
@@ -94,7 +94,7 @@ TEST(CJPEGTest, IFastProg420Q100) {
GetTestFilePath(&scans_path, "test.scan");
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420_q100_ifast_prog.jpg");
std::string prog_name = "cjpeg";
@@ -127,7 +127,7 @@ TEST(CJPEGTest, GrayISlow) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_gray_islow.jpg");
std::string prog_name = "cjpeg";
@@ -154,7 +154,7 @@ TEST(CJPEGTest, IFastOpt420S) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420s_ifast_opt.jpg");
std::string prog_name = "cjpeg";
@@ -218,7 +218,7 @@ TEST(CJPEGTest, IFastProg3x2) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_3x2_ifast_prog.jpg");
std::string prog_name = "cjpeg";
@@ -248,7 +248,7 @@ TEST(CJPEGTest, ISlowAri420) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420_islow_ari.jpg");
std::string prog_name = "cjpeg";
@@ -275,7 +275,7 @@ TEST(CJPEGTest, ISlowProgAri444) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_444_islow_progari.jpg");
std::string prog_name = "cjpeg";
@@ -305,7 +305,7 @@ TEST(CJPEGTest, ISlowAri444) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_444_islow_ari.jpg");
std::string prog_name = "cjpeg";
@@ -335,7 +335,7 @@ TEST(CJPEGTest, ISlowProg420) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420_islow_prog.jpg");
std::string prog_name = "cjpeg";
@@ -362,7 +362,7 @@ TEST(CJPEGTest, ISlow444) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_444_islow.jpg");
std::string prog_name = "cjpeg";
@@ -390,7 +390,7 @@ TEST(CJPEGTest, ISlowProg444) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.ppm");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_444_islow_prog.jpg");
std::string prog_name = "cjpeg";
diff --git a/gtest/djpeg-gtest-wrapper.cpp b/gtest/djpeg-gtest-wrapper.cpp
index 1128d64..43bb1af 100644
--- a/gtest/djpeg-gtest-wrapper.cpp
+++ b/gtest/djpeg-gtest-wrapper.cpp
@@ -66,7 +66,7 @@ TEST_P(DJPEGTestScalingDCT, Test) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII(std::get<1>(GetParam()));
std::string prog_name = "djpeg";
@@ -99,7 +99,7 @@ TEST(DJPEGTest, ISlow420256) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420_islow_256.bmp");
std::string prog_name = "djpeg";
@@ -128,7 +128,7 @@ TEST(DJPEGTest, ISlow420565) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420_islow_565.bmp");
std::string prog_name = "djpeg";
@@ -158,7 +158,7 @@ TEST(DJPEGTest, ISlow420565D) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420_islow_565D.bmp");
std::string prog_name = "djpeg";
@@ -186,7 +186,7 @@ TEST(DJPEGTest, ISlow420M565) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420m_islow_565.bmp");
std::string prog_name = "djpeg";
@@ -217,7 +217,7 @@ TEST(DJPEGTest, ISlow420M565D) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420m_islow_565D.bmp");
std::string prog_name = "djpeg";
@@ -246,7 +246,7 @@ TEST(DJPEGTest, ISlow420Skip1531) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420_islow_skip15_31.ppm");
std::string prog_name = "djpeg";
@@ -276,7 +276,7 @@ TEST(DJPEGTest, ISlow420AriSkip16139) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testimgari.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII(
"testout_420_islow_ari_skip16_139.ppm");
@@ -306,7 +306,7 @@ TEST(DJPEGTest, ISlow420AriCrop53x5344) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testimgari.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII(
"testout_420_islow_ari_crop53x53_4_4.ppm");
@@ -336,7 +336,7 @@ TEST(DJPEGTest, IFast420MAri) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testimgari.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420m_ifast_ari.ppm");
std::string prog_name = "djpeg";
@@ -361,7 +361,7 @@ TEST(DJPEGTest, ISlow444AriCrop37x3700) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_444_islow_ari.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII(
"testout_444_islow_ari_crop37x37_0_0.ppm");
@@ -392,9 +392,9 @@ TEST(DJPEGTest, RGBISlow) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_rgb_islow.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_rgb_islow.ppm");
- base::FilePath output_icc_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_icc_path(GetTargetDirectory());
output_icc_path = output_icc_path.AppendASCII("testout_rgb_islow.icc");
std::string prog_name = "djpeg";
@@ -425,7 +425,7 @@ TEST(DJPEGTest, RGBISlow565) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_rgb_islow.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_rgb_islow_565.bmp");
std::string prog_name = "djpeg";
@@ -455,7 +455,7 @@ TEST(DJPEGTest, RGBISlow565D) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_rgb_islow.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_rgb_islow_565D.bmp");
std::string prog_name = "djpeg";
@@ -483,7 +483,7 @@ TEST(DJPEGTest, IFast422) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_422_ifast_opt.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_422_ifast.ppm");
std::string prog_name = "djpeg";
@@ -508,7 +508,7 @@ TEST(DJPEGTest, IFast422M) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_422_ifast_opt.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_422m_ifast.ppm");
std::string prog_name = "djpeg";
@@ -535,7 +535,7 @@ TEST(DJPEGTest, IFast422M565) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_422_ifast_opt.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_422m_ifast_565.bmp");
std::string prog_name = "djpeg";
@@ -566,7 +566,7 @@ TEST(DJPEGTest, IFast422M565D) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_422_ifast_opt.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_422m_ifast_565D.bmp");
std::string prog_name = "djpeg";
@@ -595,7 +595,7 @@ TEST(DJPEGTest, IFastProg420Q100) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_420_q100_ifast_prog.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420_q100_ifast.ppm");
std::string prog_name = "djpeg";
@@ -620,7 +620,7 @@ TEST(DJPEGTest, IFastProg420MQ100) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_420_q100_ifast_prog.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420m_q100_ifast.ppm");
std::string prog_name = "djpeg";
@@ -647,7 +647,7 @@ TEST(DJPEGTest, GrayISlow) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_gray_islow.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_gray_islow.ppm");
std::string prog_name = "djpeg";
@@ -672,7 +672,7 @@ TEST(DJPEGTest, GrayISlowRGB) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_gray_islow.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_gray_islow_rgb.ppm");
std::string prog_name = "djpeg";
@@ -699,7 +699,7 @@ TEST(DJPEGTest, GrayISlow565) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_gray_islow.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_gray_islow_565.bmp");
std::string prog_name = "djpeg";
@@ -729,7 +729,7 @@ TEST(DJPEGTest, GrayISlow565D) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_gray_islow.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_gray_islow_565D.bmp");
std::string prog_name = "djpeg";
@@ -763,7 +763,7 @@ TEST(DJPEGTest, FloatProg3x2) {
#else
#error "Unknown platform."
#endif
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_3x2_float.ppm");
std::string prog_name = "djpeg";
@@ -794,7 +794,7 @@ TEST(DJPEGTest, IFastProg3x2) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_3x2_ifast_prog.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_3x2_ifast.ppm");
std::string prog_name = "djpeg";
@@ -819,7 +819,7 @@ TEST(DJPEGTest, ISlowProgCrop62x627171) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_420_islow_prog.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII(
"testout_420_islow_prog_crop62x62_71_71.ppm");
@@ -849,7 +849,7 @@ TEST(DJPEGTest, ISlow444Skip16) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_444_islow.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_444_islow_skip1_6.ppm");
std::string prog_name = "djpeg";
@@ -878,7 +878,7 @@ TEST(DJPEGTest, ISlowProg444Crop98x981313) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testout_444_islow_prog.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII(
"testout_444_islow_prog_crop98x98_13_13.ppm");
diff --git a/gtest/gtest-utils.cpp b/gtest/gtest-utils.cpp
index 442c2ac..b6df7ab 100644
--- a/gtest/gtest-utils.cpp
+++ b/gtest/gtest-utils.cpp
@@ -18,8 +18,16 @@
* 3. This notice may not be removed or altered from any source distribution.
*/
+#include "base/strings/utf_string_conversions.h"
#include "gtest-utils.h"
+#if defined(OS_WIN)
+std::wstring GetTargetDirectory() {
+ base::FilePath path;
+ base::PathService::Get(base::DIR_CURRENT, &path);
+ return base::UTF8ToWide(path.MaybeAsASCII());
+}
+#else
std::string GetTargetDirectory() {
#if defined(ANDROID)
return "/sdcard";
@@ -29,6 +37,7 @@ std::string GetTargetDirectory() {
return path.MaybeAsASCII();
#endif
}
+#endif
void GetTestFilePath(base::FilePath* path, const std::string filename) {
ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, path));
diff --git a/gtest/gtest-utils.h b/gtest/gtest-utils.h
index 2b821df..0953848 100644
--- a/gtest/gtest-utils.h
+++ b/gtest/gtest-utils.h
@@ -33,7 +33,11 @@
// Returns the absolute path of the test output directory as a string.
// On Android this path is /sdcard; on all other platforms it is the current
// directory.
+#if defined(OS_WIN)
+std::wstring GetTargetDirectory();
+#else
std::string GetTargetDirectory();
+#endif
// Files used as input for libjpeg-turbo unit tests are stored in
// <chromium>/src/third_party/libjpeg_turbo/testimages.
diff --git a/gtest/jpegtran-gtest-wrapper.cpp b/gtest/jpegtran-gtest-wrapper.cpp
index e672d44..a6a1bd8 100644
--- a/gtest/jpegtran-gtest-wrapper.cpp
+++ b/gtest/jpegtran-gtest-wrapper.cpp
@@ -34,7 +34,7 @@ TEST(JPEGTranTest, ICC) {
GetTestFilePath(&input_image_path, "testout_rgb_islow.jpg");
base::FilePath icc_path;
GetTestFilePath(&icc_path, "test2.icc");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_rgb_islow2.jpg");
std::string prog_name = "jpegtran";
@@ -62,7 +62,7 @@ TEST(JPEGTranTest, Crop) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testorig.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_crop.jpg");
std::string prog_name = "jpegtran";
@@ -91,7 +91,7 @@ TEST(JPEGTranTest, ISlow420Ari) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testimgint.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420_islow_ari2.jpg");
std::string prog_name = "jpegtran";
@@ -115,7 +115,7 @@ TEST(JPEGTranTest, ISlow420) {
base::FilePath input_image_path;
GetTestFilePath(&input_image_path, "testimgari.jpg");
- base::FilePath output_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath output_path(GetTargetDirectory());
output_path = output_path.AppendASCII("testout_420_islow.jpg");
std::string prog_name = "jpegtran";
diff --git a/gtest/tjbench-gtest-wrapper.cpp b/gtest/tjbench-gtest-wrapper.cpp
index 91ef8e9..700b199 100644
--- a/gtest/tjbench-gtest-wrapper.cpp
+++ b/gtest/tjbench-gtest-wrapper.cpp
@@ -67,7 +67,7 @@ class TJBenchTest : public
resource_path = resource_path.AppendASCII("testorig.ppm");
ASSERT_TRUE(base::PathExists(resource_path));
- base::FilePath target_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath target_path(GetTargetDirectory());
target_path = target_path.AppendASCII("testout_tile.ppm");
ASSERT_TRUE(base::CopyFile(resource_path, target_path));
@@ -94,7 +94,7 @@ class TJBenchTest : public
TEST_P(TJBenchTest, TestTileBaseline) {
// Construct path for test image file.
- base::FilePath test_image_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath test_image_path(GetTargetDirectory());
test_image_path = test_image_path.AppendASCII(std::get<0>(GetParam()));
// Read test image as string and compute MD5 sum.
std::string test_image_data;
@@ -137,7 +137,7 @@ class TJBenchTestMerged : public
resource_path = resource_path.AppendASCII("testorig.ppm");
ASSERT_TRUE(base::PathExists(resource_path));
- base::FilePath target_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath target_path(GetTargetDirectory());
target_path = target_path.AppendASCII("testout_tilem.ppm");
ASSERT_TRUE(base::CopyFile(resource_path, target_path));
@@ -165,7 +165,7 @@ class TJBenchTestMerged : public
TEST_P(TJBenchTestMerged, TestTileMerged) {
// Construct path for test image file.
- base::FilePath test_image_path(FILE_PATH_LITERAL(GetTargetDirectory()));
+ base::FilePath test_image_path(GetTargetDirectory());
test_image_path = test_image_path.AppendASCII(std::get<0>(GetParam()));
// Read test image as string and compute MD5 sum.
std::string test_image_data;