diff options
author | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-06-06 14:59:56 +0000 |
---|---|---|
committer | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-06-06 14:59:56 +0000 |
commit | c76218d5edf08f1b73dc06a92e3af52ed268e7ba (patch) | |
tree | 2f569e6427743a8e18c06f02eb4c040063b2630d /tests/StreamTest.cpp | |
parent | 7d05ac9508bff5b1c62fec42dacb8aabd4cf8adb (diff) |
Fix bug in setting directories for tests.
make_canonical_dir_path only worked if the provided directory
did not end with a slash. Remove this function, and call
SkPathJoin instead. Update the documentation to acknowledge
that this is an acceptable use of SkPathJoin, and update its
test.
R=epoger@google.com
Review URL: https://codereview.chromium.org/16098011
git-svn-id: http://skia.googlecode.com/svn/trunk@9458 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/StreamTest.cpp')
-rw-r--r-- | tests/StreamTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/StreamTest.cpp b/tests/StreamTest.cpp index 8f38f46bea..00c079abc0 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()); } } |