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

Unified Diff: fuzz/Fuzz.h

Issue 1702383003: Create ParsePath API fuzz (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: fix float Created 4 years, 10 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 | « no previous file | fuzz/FuzzParsePath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fuzz/Fuzz.h
diff --git a/fuzz/Fuzz.h b/fuzz/Fuzz.h
index 0f34ef4b3ef7a36a6dd5a4c84e3f91d8bfe03260..26a8d429b36e7621f321c63cdd6618228fb51d10 100644
--- a/fuzz/Fuzz.h
+++ b/fuzz/Fuzz.h
@@ -16,10 +16,20 @@ class Fuzz : SkNoncopyable {
public:
explicit Fuzz(SkData*);
+ bool nextBool();
uint8_t nextB();
uint32_t nextU();
+ // This can be nan, +- infinity, 0, anything.
float nextF();
+ // Return the next fuzzed value [min, max) as an unsigned 32bit integer.
+ uint32_t nextRangeU(uint32_t min, uint32_t max);
+ /**
+ * Returns next fuzzed value [min...max) as a float.
+ * Will not be Infinity or NaN.
+ */
+ float nextRangeF(float min, float max);
+
void signalBug (); // Tell afl-fuzz these inputs found a bug.
void signalBoring(); // Tell afl-fuzz these inputs are not worth testing.
« no previous file with comments | « no previous file | fuzz/FuzzParsePath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698