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

Side by Side Diff: tests/StreamTest.cpp

Issue 17414003: Refactor: clean up some unused or mostly-unused API I saw here. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: bungeman Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « tests/EmptyPathTest.cpp ('k') | tests/Test.h » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkRandom.h" 9 #include "SkRandom.h"
10 #include "SkOSFile.h" 10 #include "SkOSFile.h"
(...skipping 26 matching lines...) Expand all
37 static void test_filestreams(skiatest::Reporter* reporter, const char* tmpDir) { 37 static void test_filestreams(skiatest::Reporter* reporter, const char* tmpDir) {
38 SkString path = SkOSPath::SkPathJoin(tmpDir, "wstream_test"); 38 SkString path = SkOSPath::SkPathJoin(tmpDir, "wstream_test");
39 39
40 const char s[] = "abcdefghijklmnopqrstuvwxyz"; 40 const char s[] = "abcdefghijklmnopqrstuvwxyz";
41 41
42 { 42 {
43 SkFILEWStream writer(path.c_str()); 43 SkFILEWStream writer(path.c_str());
44 if (!writer.isValid()) { 44 if (!writer.isValid()) {
45 SkString msg; 45 SkString msg;
46 msg.printf("Failed to create tmp file %s\n", path.c_str()); 46 msg.printf("Failed to create tmp file %s\n", path.c_str());
47 reporter->reportFailed(msg.c_str()); 47 reporter->reportFailed(msg);
48 return; 48 return;
49 } 49 }
50 50
51 for (int i = 0; i < 100; ++i) { 51 for (int i = 0; i < 100; ++i) {
52 writer.write(s, 26); 52 writer.write(s, 26);
53 } 53 }
54 } 54 }
55 55
56 { 56 {
57 SkFILEStream stream(path.c_str()); 57 SkFILEStream stream(path.c_str());
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 static void TestStreams(skiatest::Reporter* reporter) { 155 static void TestStreams(skiatest::Reporter* reporter) {
156 TestWStream(reporter); 156 TestWStream(reporter);
157 TestPackedUInt(reporter); 157 TestPackedUInt(reporter);
158 TestNullData(); 158 TestNullData();
159 } 159 }
160 160
161 #include "TestClassDef.h" 161 #include "TestClassDef.h"
162 DEFINE_TESTCLASS("Stream", StreamTestClass, TestStreams) 162 DEFINE_TESTCLASS("Stream", StreamTestClass, TestStreams)
OLDNEW
« no previous file with comments | « tests/EmptyPathTest.cpp ('k') | tests/Test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698