aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FlateTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FlateTest.cpp')
-rw-r--r--tests/FlateTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/FlateTest.cpp b/tests/FlateTest.cpp
index 3e8e5837e1..75c6f3f9c6 100644
--- a/tests/FlateTest.cpp
+++ b/tests/FlateTest.cpp
@@ -89,6 +89,8 @@ static void TestFlate(skiatest::Reporter* reporter, SkMemoryStream* testStream,
dataSize) == 0);
}
+ if (compressedSize < 1) { return; }
+
double compressionRatio = static_cast<double>(dataSize) / compressedSize;
// Assert that some compression took place.
REPORTER_ASSERT(reporter, compressionRatio > 1.2);