Skip to content

Commit

Permalink
fuzz: SplitString with multiple separators
Browse files Browse the repository at this point in the history
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
  • Loading branch information
martinus and MarcoFalke committed May 4, 2022
1 parent d1a9850 commit f849e63
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/test/fuzz/string.cpp
Expand Up @@ -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};
Expand Down

0 comments on commit f849e63

Please sign in to comment.