aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/DataRefTest.cpp
diff options
context:
space:
mode:
authorGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-07 14:30:36 +0000
committerGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-07 14:30:36 +0000
commit99d43ffcfbed84aac33a45e1eb725bb684cdc2e7 (patch)
treeddecb56ee03b0a81e5bb8e5fd19114db6e5ce6b1 /tests/DataRefTest.cpp
parentcf5eb6ab25057ee4bcaaee88f819a293e9c47ac6 (diff)
Fix for caller of GetTmpDir.
Since I changed GetTmpDir to create an SkString each time, it needs to be assigned to a variable in order for it to stick around. Update a test which I missed because my client was out of date. Review URL: https://codereview.chromium.org/15719006 git-svn-id: http://skia.googlecode.com/svn/trunk@9475 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/DataRefTest.cpp')
-rw-r--r--tests/DataRefTest.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/DataRefTest.cpp b/tests/DataRefTest.cpp
index 9ff7034ca0..b6daaf9569 100644
--- a/tests/DataRefTest.cpp
+++ b/tests/DataRefTest.cpp
@@ -260,13 +260,12 @@ static void test_cstring(skiatest::Reporter* reporter) {
}
static void test_files(skiatest::Reporter* reporter) {
- if (skiatest::Test::GetTmpDir().isEmpty()) {
+ SkString tmpDir = skiatest::Test::GetTmpDir();
+ if (tmpDir.isEmpty()) {
return;
}
- const char* tmpDir = skiatest::Test::GetTmpDir().c_str();
- SkString path;
- path.printf("%s%s", tmpDir, "data_test");
+ SkString path = SkOSPath::SkPathJoin(tmpDir.c_str(), "data_test");
const char s[] = "abcdefghijklmnopqrstuvwxyz";
{