Home | History | Annotate | Download | only in fuzz

Lines Matching full:fuzz

8 #include "Fuzz.h"
13 // Most of this is taken from random_parse_path.cpp and adapted to use the Fuzz
37 static void add_white(Fuzz* fuzz, SkString* atom) {
42 int reps = fuzz->nextRangeU(0, 2);
44 int index = fuzz->nextRangeU(0, (int) SK_ARRAY_COUNT(gWhiteSpace) - 1);
51 static void add_comma(Fuzz* fuzz, SkString* atom) {
57 add_white(fuzz, atom);
58 if (fuzz->nextBool()) {
62 add_white(fuzz, atom);
66 static void add_some_white(Fuzz* fuzz, SkString* atom) {
69 add_white(fuzz, atom);
73 SkString MakeRandomParsePathPiece(Fuzz* fuzz) {
75 int index = fuzz->nextRangeU(0, (int) SK_ARRAY_COUNT(gLegal) - 1);
77 gEasy ? atom.append("\n") : add_white(fuzz, &atom);
78 char symbol = legal.fSymbol | (fuzz->nextBool() ? 0x20 : 0);
80 int reps = fuzz->nextRangeU(1, 3);
83 SkScalar coord = fuzz->nextRangeF(0, 100);
84 add_white(fuzz, &atom);
87 add_comma(fuzz, &atom);
89 add_some_white(fuzz, &atom);
92 atom.appendScalar(fuzz->nextRangeF(-720, 720));
93 add_comma(fuzz, &atom);
94 atom.appendU32(fuzz->nextRangeU(0, 1));
95 add_comma(fuzz, &atom);
96 atom.appendU32(fuzz->nextRangeU(0, 1));
97 add_comma(fuzz, &atom);
104 DEF_FUZZ(ParsePath, fuzz) {
107 uint32_t count = fuzz->nextRangeU(0, 40);
109 spec.append(MakeRandomParsePathPiece(fuzz));
113 fuzz->signalBug();