From f994855e8ec0e9f969ed31712e546165cc576170 Mon Sep 17 00:00:00 2001 From: Peter de Rivaz Date: Thu, 20 Oct 2016 16:21:20 +0100 Subject: [PATCH] Fix for AV1.TestTell The tell functions return an unsigned integer. This causes the AV1.TestTell test case to fail because -1 is greater than 20 when treated as an unsigned integer. Change-Id: I9dd1d7eb61260d30d1713a4917159fc6fe8eee42 --- test/boolcoder_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/boolcoder_test.cc b/test/boolcoder_test.cc index c0e6d48ce..e2ebdda1f 100644 --- a/test/boolcoder_test.cc +++ b/test/boolcoder_test.cc @@ -135,7 +135,7 @@ TEST(AV1, TestTell) { } const uint32_t expected = (uint32_t)(-kSymbols * log2(probability)); // Last tell should be close to the expected value. - GTEST_ASSERT_LE(last_tell - expected, 20) << " last_tell: " << last_tell; + GTEST_ASSERT_LE(last_tell, expected + 20) << " last_tell: " << last_tell; // The average frac_diff error should be pretty small. GTEST_ASSERT_LE(frac_diff_total / kSymbols, FRAC_DIFF_TOTAL_ERROR) << " frac_diff_total: " << frac_diff_total;