| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkOSFile.h" |
| 9 #include "SkString.h" |
| 8 #include "Test.h" | 10 #include "Test.h" |
| 9 #include "SkString.h" | |
| 10 #include "SkOSFile.h" | |
| 11 | 11 |
| 12 /** | 12 /** |
| 13 * Test SkPathJoin and SkBasename. | 13 * Test SkPathJoin and SkBasename. |
| 14 * Will use SkPathJoin to append filename to dir, test that it works correctly, | 14 * Will use SkPathJoin to append filename to dir, test that it works correctly, |
| 15 * and tests using SkBasename on the result. | 15 * and tests using SkBasename on the result. |
| 16 * @param reporter Reporter for test conditions. | 16 * @param reporter Reporter for test conditions. |
| 17 * @param dir String representing the path to a folder. May or may not | 17 * @param dir String representing the path to a folder. May or may not |
| 18 * end with SkPATH_SEPARATOR. | 18 * end with SkPATH_SEPARATOR. |
| 19 * @param filename String representing the basename of a file. Must NOT | 19 * @param filename String representing the basename of a file. Must NOT |
| 20 * contain SkPATH_SEPARATOR. | 20 * contain SkPATH_SEPARATOR. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 // Basename of NULL is an empty string. | 77 // Basename of NULL is an empty string. |
| 78 SkString empty = SkOSPath::SkBasename(NULL); | 78 SkString empty = SkOSPath::SkBasename(NULL); |
| 79 REPORTER_ASSERT(reporter, empty.size() == 0); | 79 REPORTER_ASSERT(reporter, empty.size() == 0); |
| 80 | 80 |
| 81 // Test that NULL can be used for the directory and filename. | 81 // Test that NULL can be used for the directory and filename. |
| 82 SkString emptyPath = SkOSPath::SkPathJoin(NULL, NULL); | 82 SkString emptyPath = SkOSPath::SkPathJoin(NULL, NULL); |
| 83 REPORTER_ASSERT(reporter, emptyPath.size() == 1); | 83 REPORTER_ASSERT(reporter, emptyPath.size() == 1); |
| 84 REPORTER_ASSERT(reporter, emptyPath.contains(SkPATH_SEPARATOR)); | 84 REPORTER_ASSERT(reporter, emptyPath.contains(SkPATH_SEPARATOR)); |
| 85 } | 85 } |
| OLD | NEW |