Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Unified Diff: tests/StreamTest.cpp

Issue 16098011: Fix bug in setting directories for tests. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Respond to comments Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/OSPathTest.cpp ('k') | tests/Test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/StreamTest.cpp
diff --git a/tests/StreamTest.cpp b/tests/StreamTest.cpp
index 8f38f46bea9ac4af4017936f3c416f1b2d9fa01d..00c079abc0436251fd81c864b07b122748055d97 100644
--- a/tests/StreamTest.cpp
+++ b/tests/StreamTest.cpp
@@ -35,8 +35,7 @@ static void test_loop_stream(skiatest::Reporter* reporter, SkStream* stream,
}
static void test_filestreams(skiatest::Reporter* reporter, const char* tmpDir) {
- SkString path;
- path.printf("%s%s", tmpDir, "wstream_test");
+ SkString path = SkOSPath::SkPathJoin(tmpDir, "wstream_test");
const char s[] = "abcdefghijklmnopqrstuvwxyz";
@@ -98,8 +97,9 @@ static void TestWStream(skiatest::Reporter* reporter) {
}
delete[] dst;
- if (!skiatest::Test::GetTmpDir().isEmpty()) {
- test_filestreams(reporter, skiatest::Test::GetTmpDir().c_str());
+ SkString tmpDir = skiatest::Test::GetTmpDir();
+ if (!tmpDir.isEmpty()) {
+ test_filestreams(reporter, tmpDir.c_str());
}
}
« no previous file with comments | « tests/OSPathTest.cpp ('k') | tests/Test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698