Skip to content

Commit f849e63

Browse files
martinusMarcoFalke
and
MarcoFalke
committed
fuzz: SplitString with multiple separators
Co-authored-by: MarcoFalke <[email protected]>
1 parent d1a9850 commit f849e63

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/test/fuzz/string.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,12 @@ FUZZ_TARGET(string)
224224
int64_t amount_out;
225225
(void)ParseFixedPoint(random_string_1, fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 1024), &amount_out);
226226
}
227-
(void)SplitString(random_string_1, fuzzed_data_provider.ConsumeIntegral<char>());
227+
{
228+
const auto single_split{SplitString(random_string_1, fuzzed_data_provider.ConsumeIntegral<char>())};
229+
assert(single_split.size() >= 1);
230+
const auto any_split{SplitString(random_string_1, random_string_2)};
231+
assert(any_split.size() >= 1);
232+
}
228233
{
229234
(void)Untranslated(random_string_1);
230235
const bilingual_str bs1{random_string_1, random_string_2};

0 commit comments

Comments
 (0)