Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: tests/OSPathTest.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/MipMapTest.cpp ('k') | tests/PDFDeflateWStreamTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 8 #include "SkOSFile.h"
9 #include "SkString.h" 9 #include "SkString.h"
10 #include "Test.h" 10 #include "Test.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // Test with a sub directory. 80 // Test with a sub directory.
81 dir.append("subDir"); 81 dir.append("subDir");
82 test_dir_with_file(reporter, dir, filename); 82 test_dir_with_file(reporter, dir, filename);
83 83
84 // Basename of a directory with a path separator at the end is empty. 84 // Basename of a directory with a path separator at the end is empty.
85 dir.appendUnichar(SkPATH_SEPARATOR); 85 dir.appendUnichar(SkPATH_SEPARATOR);
86 SkString baseOfDir = SkOSPath::Basename(dir.c_str()); 86 SkString baseOfDir = SkOSPath::Basename(dir.c_str());
87 REPORTER_ASSERT(reporter, baseOfDir.size() == 0); 87 REPORTER_ASSERT(reporter, baseOfDir.size() == 0);
88 88
89 // Basename of NULL is an empty string. 89 // Basename of nullptr is an empty string.
90 SkString empty = SkOSPath::Basename(NULL); 90 SkString empty = SkOSPath::Basename(nullptr);
91 REPORTER_ASSERT(reporter, empty.size() == 0); 91 REPORTER_ASSERT(reporter, empty.size() == 0);
92 92
93 // File in root dir 93 // File in root dir
94 dir.printf("%c", SkPATH_SEPARATOR); 94 dir.printf("%c", SkPATH_SEPARATOR);
95 filename.set("file"); 95 filename.set("file");
96 test_dir_with_file(reporter, dir, filename); 96 test_dir_with_file(reporter, dir, filename);
97 97
98 // Just the root dir 98 // Just the root dir
99 filename.reset(); 99 filename.reset();
100 test_dir_with_file(reporter, dir, filename); 100 test_dir_with_file(reporter, dir, filename);
101 101
102 // Test that NULL can be used for the directory and filename. 102 // Test that nullptr can be used for the directory and filename.
103 SkString emptyPath = SkOSPath::Join(NULL, NULL); 103 SkString emptyPath = SkOSPath::Join(nullptr, nullptr);
104 REPORTER_ASSERT(reporter, emptyPath.isEmpty()); 104 REPORTER_ASSERT(reporter, emptyPath.isEmpty());
105 } 105 }
OLDNEW
« no previous file with comments | « tests/MipMapTest.cpp ('k') | tests/PDFDeflateWStreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698