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

Unified Diff: fuzz/FuzzPaeth.cpp

Issue 1585353002: fuzz: signalBug() / signalBoring() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: stdlib for abs() Created 4 years, 11 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 | « fuzz/Fuzz.h ('k') | fuzz/fuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fuzz/FuzzPaeth.cpp
diff --git a/fuzz/FuzzPaeth.cpp b/fuzz/FuzzPaeth.cpp
index d7c139ce7a32d4cfa34bc97fee799af29124e5d4..dee9ee99143d30dd48d22c2c67198c7bc93c0836 100644
--- a/fuzz/FuzzPaeth.cpp
+++ b/fuzz/FuzzPaeth.cpp
@@ -6,6 +6,7 @@
*/
#include "Fuzz.h"
+#include <stdlib.h>
// This really is just an example Fuzz*.cpp file.
// It tests that two different ways of calculating the Paeth predictor function are equivalent.
@@ -36,5 +37,13 @@ DEF_FUZZ(Paeth, fuzz) {
auto a = fuzz->nextB(),
b = fuzz->nextB(),
c = fuzz->nextB();
- ASSERT(paeth_alt(a,b,c) == paeth_std(a,b,c));
+ SkDebugf("Paeth(%d,%d,%d)\n", a,b,c);
+
+ if (a == b && b == c) {
+ fuzz->signalBoring(); // Not really boring, just demoing signalBoring().
+ }
+
+ if (paeth_alt(a,b,c) != paeth_std(a,b,c)) {
+ fuzz->signalBug();
+ }
}
« no previous file with comments | « fuzz/Fuzz.h ('k') | fuzz/fuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698