diff options
author | halcanary <halcanary@google.com> | 2014-08-13 09:20:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-13 09:20:08 -0700 |
commit | 2512372b686f814c0afc3f9fbbc2da20e72b7594 (patch) | |
tree | aed4041f53528306fb9c57bcd7db6f73e9d70d82 /tests | |
parent | a9424995ac8d4b355610d22c3dc4bf121d67c6ac (diff) |
fix win compiler div/zero
R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/474433002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/FlateTest.cpp | 2 |
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); |