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/FlateTest.cpp

Issue 145313004: Cleanup: Sanitize the order of includes under tests/ (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more two fixes Created 6 years, 11 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/FlatDataTest.cpp ('k') | tests/FontHostStreamTest.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 <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
11 #include "Test.h"
12 #include "SkData.h" 11 #include "SkData.h"
13 #include "SkFlate.h" 12 #include "SkFlate.h"
14 #include "SkStream.h" 13 #include "SkStream.h"
14 #include "Test.h"
15 15
16 // A memory stream that reports zero size with the standard call, like 16 // A memory stream that reports zero size with the standard call, like
17 // an unseekable file stream would. 17 // an unseekable file stream would.
18 class SkZeroSizeMemStream : public SkMemoryStream { 18 class SkZeroSizeMemStream : public SkMemoryStream {
19 public: 19 public:
20 virtual size_t read(void* buffer, size_t size) { 20 virtual size_t read(void* buffer, size_t size) {
21 if (buffer == NULL && size == 0) 21 if (buffer == NULL && size == 0)
22 return 0; 22 return 0;
23 if (buffer == NULL && size == kGetSizeKey) 23 if (buffer == NULL && size == kGetSizeKey)
24 size = 0; 24 size = 0;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 SkMemoryStream memStream; 91 SkMemoryStream memStream;
92 TestFlate(reporter, &memStream, 512); 92 TestFlate(reporter, &memStream, 512);
93 TestFlate(reporter, &memStream, 10240); 93 TestFlate(reporter, &memStream, 10240);
94 94
95 SkZeroSizeMemStream fileStream; 95 SkZeroSizeMemStream fileStream;
96 TestFlate(reporter, &fileStream, 512); 96 TestFlate(reporter, &fileStream, 512);
97 TestFlate(reporter, &fileStream, 10240); 97 TestFlate(reporter, &fileStream, 10240);
98 #endif 98 #endif
99 } 99 }
OLDNEW
« no previous file with comments | « tests/FlatDataTest.cpp ('k') | tests/FontHostStreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698