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

Unified Diff: fuzz/FuzzParsePath.cpp

Issue 2389853002: Add fuzz executable to GN (Closed)
Patch Set: Fix compile Created 4 years, 2 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 | « BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fuzz/FuzzParsePath.cpp
diff --git a/fuzz/FuzzParsePath.cpp b/fuzz/FuzzParsePath.cpp
index fe1355037d4ac344acf81ca09eb2045f87d68ca5..8e4d8bb78681663d228f2751d5daf97a4c6158c9 100644
--- a/fuzz/FuzzParsePath.cpp
+++ b/fuzz/FuzzParsePath.cpp
@@ -29,13 +29,13 @@ const struct Legal {
{ 'Z', 0 },
};
-bool gEasy = false; // set to true while debugging to suppress unusual whitespace
+bool _gEasy = false; // set to true while debugging to suppress unusual whitespace
mtklein_C 2016/10/03 17:39:39 The author of this fuzz probably meant to write
kjlubick 2016/10/03 18:05:45 Thanks for the tip. Done.
// mostly do nothing, then bias towards spaces
const char gWhiteSpace[] = { 0, 0, 0, 0, 0, 0, 0, 0, ' ', ' ', ' ', ' ', 0x09, 0x0D, 0x0A };
static void add_white(Fuzz* fuzz, SkString* atom) {
- if (gEasy) {
+ if (_gEasy) {
atom->append(" ");
return;
}
@@ -49,7 +49,7 @@ static void add_white(Fuzz* fuzz, SkString* atom) {
}
static void add_comma(Fuzz* fuzz, SkString* atom) {
- if (gEasy) {
+ if (_gEasy) {
atom->append(",");
return;
}
@@ -74,7 +74,7 @@ SkString MakeRandomParsePathPiece(Fuzz* fuzz) {
SkString atom;
int index = fuzz->nextRangeU(0, (int) SK_ARRAY_COUNT(gLegal) - 1);
const Legal& legal = gLegal[index];
- gEasy ? atom.append("\n") : add_white(fuzz, &atom);
+ _gEasy ? atom.append("\n") : add_white(fuzz, &atom);
char symbol = legal.fSymbol | (fuzz->nextBool() ? 0x20 : 0);
atom.append(&symbol, 1);
int reps = fuzz->nextRangeU(1, 3);
« no previous file with comments | « BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698