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

Side by Side Diff: tests/StreamTest.cpp

Issue 428443002: Cleanup: Rename SkOSPath functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 years, 4 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/SerializationTest.cpp ('k') | tools/CopyTilesRenderer.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 2011 Google Inc. 2 * Copyright 2011 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 "SkData.h" 8 #include "SkData.h"
9 #include "SkOSFile.h" 9 #include "SkOSFile.h"
10 #include "SkRandom.h" 10 #include "SkRandom.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 // expect EOF 32 // expect EOF
33 size_t bytes = stream->read(tmp, 1); 33 size_t bytes = stream->read(tmp, 1);
34 REPORTER_ASSERT(reporter, 0 == bytes); 34 REPORTER_ASSERT(reporter, 0 == bytes);
35 // isAtEnd might not return true until after the first failing read. 35 // isAtEnd might not return true until after the first failing read.
36 REPORTER_ASSERT(reporter, stream->isAtEnd()); 36 REPORTER_ASSERT(reporter, stream->isAtEnd());
37 } 37 }
38 38
39 static void test_filestreams(skiatest::Reporter* reporter, const char* tmpDir) { 39 static void test_filestreams(skiatest::Reporter* reporter, const char* tmpDir) {
40 SkString path = SkOSPath::SkPathJoin(tmpDir, "wstream_test"); 40 SkString path = SkOSPath::Join(tmpDir, "wstream_test");
41 41
42 const char s[] = "abcdefghijklmnopqrstuvwxyz"; 42 const char s[] = "abcdefghijklmnopqrstuvwxyz";
43 43
44 { 44 {
45 SkFILEWStream writer(path.c_str()); 45 SkFILEWStream writer(path.c_str());
46 if (!writer.isValid()) { 46 if (!writer.isValid()) {
47 ERRORF(reporter, "Failed to create tmp file %s\n", path.c_str()); 47 ERRORF(reporter, "Failed to create tmp file %s\n", path.c_str());
48 return; 48 return;
49 } 49 }
50 50
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 memStream.setData(nullData); 183 memStream.setData(nullData);
184 TestDereferencingData(&memStream); 184 TestDereferencingData(&memStream);
185 185
186 } 186 }
187 187
188 DEF_TEST(Stream, reporter) { 188 DEF_TEST(Stream, reporter) {
189 TestWStream(reporter); 189 TestWStream(reporter);
190 TestPackedUInt(reporter); 190 TestPackedUInt(reporter);
191 TestNullData(); 191 TestNullData();
192 } 192 }
OLDNEW
« no previous file with comments | « tests/SerializationTest.cpp ('k') | tools/CopyTilesRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698