commit | 2e920e6548a737084c067d53083f81ec199fcd92 | [log] [tgz] |
---|---|---|
author | hoford <hoford@google.com> | Fri Jul 24 08:15:47 2015 -0700 |
committer | Miao Wang <miaowang@google.com> | Fri Jul 24 13:29:43 2015 -0700 |
tree | 484032318a993e1cb34e9ddef340ce54d8ecaeda | |
parent | 12ae307be445f52669bc8d9cf5f2e17d3f2467bd [diff] |
increase tolerance in RSResizeTest test bug:22357417 Change-Id: I15adb9098e7f96c8887fd515c084b0bdb528f2e5 (cherry picked from commit 9d4dd0b65ce477147f4c8a50a5796f56b623b7da)
diff --git a/tests/tests/rscpp/src/android/cts/rscpp/RSResizeTest.java b/tests/tests/rscpp/src/android/cts/rscpp/RSResizeTest.java index 51ae26e..6826b59 100644 --- a/tests/tests/rscpp/src/android/cts/rscpp/RSResizeTest.java +++ b/tests/tests/rscpp/src/android/cts/rscpp/RSResizeTest.java
@@ -86,6 +86,7 @@ } else { rsCppOutput.copyFromUnchecked(nativeFloatAlloc); } + mVerify.set_image_tolerance(0.04f); // Kept loose till a better test designed mVerify.invoke_verify(rsOutput, rsCppOutput, rsInput); checkForErrors(); }
diff --git a/tests/tests/rscpp/src/android/cts/rscpp/verify.rs b/tests/tests/rscpp/src/android/cts/rscpp/verify.rs index 7fd44d3..700b9d5 100644 --- a/tests/tests/rscpp/src/android/cts/rscpp/verify.rs +++ b/tests/tests/rscpp/src/android/cts/rscpp/verify.rs
@@ -24,10 +24,10 @@ int gAllowedIntError = 0; static bool hadError = false; static int2 errorLoc = {0,0}; - +float image_tolerance = 0.0001f; static bool compare_float(float f1, float f2) { - if (fabs(f1-f2) > 0.0001f) { + if (fabs(f1-f2) > image_tolerance) { hadError = true; return false; }