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

Side by Side Diff: third_party/re2/re2/testing/string_generator.h

Issue 1516543002: Update re2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove sparse-array-valgrind.patch Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2008 The RE2 Authors. All Rights Reserved. 1 // Copyright 2008 The RE2 Authors. All Rights Reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // String generator: generates all possible strings of up to 5 // String generator: generates all possible strings of up to
6 // maxlen letters using the set of letters in alpha. 6 // maxlen letters using the set of letters in alpha.
7 // Fetch strings using a Java-like Next()/HasNext() interface. 7 // Fetch strings using a Java-like Next()/HasNext() interface.
8 8
9 #ifndef RE2_TESTING_STRING_GENERATOR_H__ 9 #ifndef RE2_TESTING_STRING_GENERATOR_H__
10 #define RE2_TESTING_STRING_GENERATOR_H__ 10 #define RE2_TESTING_STRING_GENERATOR_H__
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Iteration state. 44 // Iteration state.
45 StringPiece sp_; // Last StringPiece returned by Next(). 45 StringPiece sp_; // Last StringPiece returned by Next().
46 string s_; // String data in last StringPiece returned by Next (). 46 string s_; // String data in last StringPiece returned by Next ().
47 bool hasnext_; // Whether Next() can be called again. 47 bool hasnext_; // Whether Next() can be called again.
48 vector<int> digits_; // Alphabet indices for next string. 48 vector<int> digits_; // Alphabet indices for next string.
49 bool generate_null_; // Whether to generate a NULL StringPiece next. 49 bool generate_null_; // Whether to generate a NULL StringPiece next.
50 bool random_; // Whether generated strings are random. 50 bool random_; // Whether generated strings are random.
51 int nrandom_; // Number of random strings left to generate. 51 int nrandom_; // Number of random strings left to generate.
52 ACMRandom* acm_; // Random number generator 52 ACMRandom* acm_; // Random number generator
53 DISALLOW_EVIL_CONSTRUCTORS(StringGenerator); 53 DISALLOW_COPY_AND_ASSIGN(StringGenerator);
54 }; 54 };
55 55
56 } // namespace re2 56 } // namespace re2
57 57
58 #endif // RE2_TESTING_STRING_GENERATOR_H__ 58 #endif // RE2_TESTING_STRING_GENERATOR_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698