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

Unified Diff: tests/FlateTest.cpp

Issue 933523007: zlib/pdf: remove HaveFlate(), depend on preprocessor defines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-02-17 (Tuesday) 17:35:15 EST 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFStream.cpp ('k') | tests/PDFPrimitivesTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/FlateTest.cpp
diff --git a/tests/FlateTest.cpp b/tests/FlateTest.cpp
index 8ad4d50376e86ca9d6a8e72f00288e04fb84ae61..17e8b2de2ab65589ea10ddefba435bd2f6ce921d 100644
--- a/tests/FlateTest.cpp
+++ b/tests/FlateTest.cpp
@@ -10,6 +10,8 @@
#include "SkStream.h"
#include "Test.h"
+#ifndef SK_NO_FLATE
+
// A memory stream that reports zero size with the standard call, like
// an unseekable file stream would.
class SkZeroSizeMemStream : public SkMemoryStream {
@@ -104,16 +106,12 @@ static void TestFlate(skiatest::Reporter* reporter, SkMemoryStream* testStream,
}
DEF_TEST(Flate, reporter) {
-#ifndef SK_NO_FLATE
- REPORTER_ASSERT(reporter, SkFlate::HaveFlate());
-#endif
- if (SkFlate::HaveFlate()) {
- SkMemoryStream memStream;
- TestFlate(reporter, &memStream, 512);
- TestFlate(reporter, &memStream, 10240);
-
- SkZeroSizeMemStream fileStream;
- TestFlate(reporter, &fileStream, 512);
- TestFlate(reporter, &fileStream, 10240);
- }
+ SkMemoryStream memStream;
+ TestFlate(reporter, &memStream, 512);
+ TestFlate(reporter, &memStream, 10240);
+
+ SkZeroSizeMemStream fileStream;
+ TestFlate(reporter, &fileStream, 512);
+ TestFlate(reporter, &fileStream, 10240);
}
+#endif // SK_NO_FLATE
« no previous file with comments | « src/pdf/SkPDFStream.cpp ('k') | tests/PDFPrimitivesTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698