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

Unified Diff: tests/PDFDeflateWStreamTest.cpp

Issue 2322133003: SkPDF/Tests: imporve test coverage. (Closed)
Patch Set: toms nit Created 4 years, 3 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 | « no previous file | tests/PDFDocumentTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PDFDeflateWStreamTest.cpp
diff --git a/tests/PDFDeflateWStreamTest.cpp b/tests/PDFDeflateWStreamTest.cpp
index 262750876e9b124ab3d738fcb358d6c0bcf0f10d..eedcaaf0c5a6f288bdd320e0c67ad33afc0ee5be 100644
--- a/tests/PDFDeflateWStreamTest.cpp
+++ b/tests/PDFDeflateWStreamTest.cpp
@@ -101,7 +101,7 @@ SkStreamAsset* stream_inflate(skiatest::Reporter* reporter, SkStream* src) {
}
} // namespace
-DEF_TEST(SkDeflateWStream, r) {
+DEF_TEST(SkPDF_DeflateWStream, r) {
SkRandom random(123456);
for (int i = 0; i < 50; ++i) {
uint32_t size = random.nextULessThan(10000);
@@ -123,6 +123,7 @@ DEF_TEST(SkDeflateWStream, r) {
}
j += writeSize;
}
+ REPORTER_ASSERT(r, deflateWStream.bytesWritten() == size);
}
SkAutoTDelete<SkStreamAsset> compressed(
dynamicMemoryWStream.detachAsStream());
@@ -159,4 +160,6 @@ DEF_TEST(SkDeflateWStream, r) {
}
}
}
+ SkDeflateWStream emptyDeflateWStream(nullptr);
+ REPORTER_ASSERT(r, !emptyDeflateWStream.writeText("FOO"));
}
« no previous file with comments | « no previous file | tests/PDFDocumentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698