diff options
author | Martin Leitner-Ankerl <martin.ankerl@gmail.com> | 2022-05-04 07:32:48 +0200 |
---|---|---|
committer | Martin Leitner-Ankerl <martin.ankerl@gmail.com> | 2022-05-04 07:34:48 +0200 |
commit | f849e63bad963b8717d4bc45efdad9b08567a36e (patch) | |
tree | 40f23eaf8bae5257f7d0023bf56250c6e168fa9c /src/test | |
parent | d1a9850102fe572b8a1e00b80c757dd82bf39f9d (diff) |
fuzz: SplitString with multiple separators
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/string.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/fuzz/string.cpp b/src/test/fuzz/string.cpp index e6064d19b6..94399faf04 100644 --- a/src/test/fuzz/string.cpp +++ b/src/test/fuzz/string.cpp @@ -224,7 +224,12 @@ FUZZ_TARGET(string) int64_t amount_out; (void)ParseFixedPoint(random_string_1, fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 1024), &amount_out); } - (void)SplitString(random_string_1, fuzzed_data_provider.ConsumeIntegral<char>()); + { + const auto single_split{SplitString(random_string_1, fuzzed_data_provider.ConsumeIntegral<char>())}; + assert(single_split.size() >= 1); + const auto any_split{SplitString(random_string_1, random_string_2)}; + assert(any_split.size() >= 1); + } { (void)Untranslated(random_string_1); const bilingual_str bs1{random_string_1, random_string_2}; |