diff options
Diffstat (limited to 'fuzz/Fuzz.h')
-rw-r--r-- | fuzz/Fuzz.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fuzz/Fuzz.h b/fuzz/Fuzz.h index f5083ef8e6..0f34ef4b3e 100644 --- a/fuzz/Fuzz.h +++ b/fuzz/Fuzz.h @@ -11,7 +11,6 @@ #include "SkData.h" #include "SkTRegistry.h" #include "SkTypes.h" -#include <stdlib.h> class Fuzz : SkNoncopyable { public: @@ -21,7 +20,13 @@ public: uint32_t nextU(); float nextF(); + void signalBug (); // Tell afl-fuzz these inputs found a bug. + void signalBoring(); // Tell afl-fuzz these inputs are not worth testing. + private: + template <typename T> + T nextT(); + SkAutoTUnref<SkData> fBytes; int fNextByte; }; @@ -36,6 +41,4 @@ struct Fuzzable { SkTRegistry<Fuzzable> register_##name({#name, fuzz_##name}); \ static void fuzz_##name(Fuzz* f) -#define ASSERT(cond) do { if (!(cond)) abort(); } while(false) - #endif//Fuzz_DEFINED |