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

Side by Side Diff: tests/DeflateWStream.cpp

Issue 957323003: miniz support in SkFlate / PDF (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkToInt Created 5 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 "SkDeflateWStream.h"
9 #include "SkFlate.h" 8 #include "SkFlate.h"
10 #include "SkRandom.h" 9 #include "SkRandom.h"
11 #include "Test.h" 10 #include "Test.h"
12 11
13 #ifndef SK_NO_FLATE 12 #ifndef SK_NO_FLATE
14 13
15 DEF_TEST(SkDeflateWStream, r) { 14 DEF_TEST(SkDeflateWStream, r) {
16 SkRandom random(123456); 15 SkRandom random(123456);
17 for (int i = 0; i < 50; ++i) { 16 for (int i = 0; i < 50; ++i) {
18 uint32_t size = random.nextULessThan(10000); 17 uint32_t size = random.nextULessThan(10000);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 SkDEBUGCODE(size_t rb =)decompressed->read(&c, sizeof(uint8_t)); 66 SkDEBUGCODE(size_t rb =)decompressed->read(&c, sizeof(uint8_t));
68 SkASSERT(sizeof(uint8_t) == rb); 67 SkASSERT(sizeof(uint8_t) == rb);
69 if (buffer[i] != c) { 68 if (buffer[i] != c) {
70 ERRORF(r, "Decompression failed at byte %u.", (unsigned)i); 69 ERRORF(r, "Decompression failed at byte %u.", (unsigned)i);
71 break; 70 break;
72 } 71 }
73 } 72 }
74 } 73 }
75 } 74 }
76 #endif // SK_NO_FLATE 75 #endif // SK_NO_FLATE
OLDNEW
« src/core/SkFlate.h ('K') | « src/pdf/SkPDFBitmap.cpp ('k') | third_party/miniz/LICENSE » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698