• Home
  • Raw
  • Download

Lines Matching full:dir

14  *  Will use SkOSPath::Join to append filename to dir, test that it works correctly,
17 * @param dir String representing the path to a folder. May or may not
22 static void test_dir_with_file(skiatest::Reporter* reporter, SkString dir, in test_dir_with_file() argument
29 // fullName should be "dir<SkOSPath::SEPARATOR>file" in test_dir_with_file()
30 SkString fullName = SkOSPath::Join(dir.c_str(), filename.c_str()); in test_dir_with_file()
32 // fullName should be the combined size of dir and file, plus one if in test_dir_with_file()
33 // dir did not include the final path separator. in test_dir_with_file()
34 size_t expectedSize = dir.size() + filename.size(); in test_dir_with_file()
35 if (!dir.endsWith(SkOSPath::SEPARATOR) && !dir.isEmpty()) { in test_dir_with_file()
46 // dirname should be the same as dir with any trailing seperators removed. in test_dir_with_file()
48 SkString strippedDir = dir; in test_dir_with_file()
53 SkDebugf("OOUCH %s %s %s\n", dir.c_str(), strippedDir.c_str(), dirname.c_str()); in test_dir_with_file()
66 SkString dir("dir"); in DEF_TEST() local
68 test_dir_with_file(reporter, dir, filename); in DEF_TEST()
70 // Now make sure this works with a path separator at the end of dir. in DEF_TEST()
71 dir.appendUnichar(SkOSPath::SEPARATOR); in DEF_TEST()
72 test_dir_with_file(reporter, dir, filename); in DEF_TEST()
75 test_dir_with_file(reporter, dir, SkString()); in DEF_TEST()
81 dir.append("subDir"); in DEF_TEST()
82 test_dir_with_file(reporter, dir, filename); in DEF_TEST()
85 dir.appendUnichar(SkOSPath::SEPARATOR); in DEF_TEST()
86 SkString baseOfDir = SkOSPath::Basename(dir.c_str()); in DEF_TEST()
93 // File in root dir in DEF_TEST()
94 dir.printf("%c", SkOSPath::SEPARATOR); in DEF_TEST()
96 test_dir_with_file(reporter, dir, filename); in DEF_TEST()
98 // Just the root dir in DEF_TEST()
100 test_dir_with_file(reporter, dir, filename); in DEF_TEST()