| Index: tests/OSPathTest.cpp
|
| diff --git a/tests/OSPathTest.cpp b/tests/OSPathTest.cpp
|
| index 96ff8a712d173242e04ca2efb0470e161be80187..5ae32ebc0d352f854dd3d39999cfc5273d0e55bc 100644
|
| --- a/tests/OSPathTest.cpp
|
| +++ b/tests/OSPathTest.cpp
|
| @@ -59,6 +59,12 @@ static void test_os_path_utils_tests(skiatest::Reporter* reporter) {
|
| dir.appendUnichar(SkPATH_SEPARATOR);
|
| test_dir_with_file(reporter, dir, filename);
|
|
|
| + // Test using no filename.
|
| + test_dir_with_file(reporter, dir, SkString());
|
| +
|
| + // Testing using no directory.
|
| + test_dir_with_file(reporter, SkString(), filename);
|
| +
|
| // Test with a sub directory.
|
| dir.append("subDir");
|
| test_dir_with_file(reporter, dir, filename);
|
| @@ -71,6 +77,11 @@ static void test_os_path_utils_tests(skiatest::Reporter* reporter) {
|
| // Basename of NULL is an empty string.
|
| SkString empty = SkOSPath::SkBasename(NULL);
|
| REPORTER_ASSERT(reporter, empty.size() == 0);
|
| +
|
| + // Test that NULL can be used for the directory and filename.
|
| + SkString emptyPath = SkOSPath::SkPathJoin(NULL, NULL);
|
| + REPORTER_ASSERT(reporter, emptyPath.size() == 1);
|
| + REPORTER_ASSERT(reporter, emptyPath.contains(SkPATH_SEPARATOR));
|
| }
|
|
|
| #include "TestClassDef.h"
|
|
|