OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "Test.h" | 8 #include "Test.h" |
9 #include "TestClassDef.h" | |
10 #include "picture_utils.h" | 9 #include "picture_utils.h" |
11 #include "SkString.h" | 10 #include "SkString.h" |
12 | 11 |
13 static void test_filepath_creation(skiatest::Reporter* reporter) { | 12 static void test_filepath_creation(skiatest::Reporter* reporter) { |
14 SkString result; | 13 SkString result; |
15 SkString filename("test"); | 14 SkString filename("test"); |
16 SkString dir("test/path"); | 15 SkString dir("test/path"); |
17 sk_tools::make_filepath(&result, dir, filename); | 16 sk_tools::make_filepath(&result, dir, filename); |
18 REPORTER_ASSERT(reporter, result.equals("test/path/test")); | 17 REPORTER_ASSERT(reporter, result.equals("test/path/test")); |
19 } | 18 } |
(...skipping 24 matching lines...) Expand all Loading... |
44 path.set("path\\windir\\"); | 43 path.set("path\\windir\\"); |
45 sk_tools::get_basename(&result, path); | 44 sk_tools::get_basename(&result, path); |
46 REPORTER_ASSERT(reporter, result.equals("windir")); | 45 REPORTER_ASSERT(reporter, result.equals("windir")); |
47 #endif | 46 #endif |
48 } | 47 } |
49 | 48 |
50 DEF_TEST(PictureUtils, reporter) { | 49 DEF_TEST(PictureUtils, reporter) { |
51 test_filepath_creation(reporter); | 50 test_filepath_creation(reporter); |
52 test_get_basename(reporter); | 51 test_get_basename(reporter); |
53 } | 52 } |
OLD | NEW |