Index: base/test/fuzzed_data_provider.h |
diff --git a/base/test/fuzzed_data_provider.h b/base/test/fuzzed_data_provider.h |
index 9f048f363e803dcadb12542fc1b5f61dbefe53c8..0750c36d30d3ca14d9364ebb5f02c0f28aec812e 100644 |
--- a/base/test/fuzzed_data_provider.h |
+++ b/base/test/fuzzed_data_provider.h |
@@ -33,6 +33,10 @@ class FuzzedDataProvider { |
// Returns a std::string containing all remaining bytes of the input data. |
std::string ConsumeRemainingBytes(); |
+ // Returns a std::string of length from 0 to |max_length|. When it runs out of |
+ // input data, returns what remains of the input. Designed to be more stable with respect to inserting characters than picking a random length and then consuming that many bytes with ConsumeBytes(). |
Charlie Harrison
2016/11/01 19:02:05
wrap to 80 cols.
mmenke
2016/11/01 19:14:29
Done. Oops. Had to bypass the whine due to CR's
|
+ std::string ConsumeRandomLengthString(size_t max_length); |
Charlie Harrison
2016/11/01 19:02:05
Can you document that this looks for the magic str
mmenke
2016/11/01 19:14:29
I don't think it's useful to consumers unless we d
|
+ |
// Returns a number in the range [min, max] by consuming bytes from the input |
// data. The value might not be uniformly distributed in the given range. If |
// there's no input data left, always returns |min|. |min| must be less than |