aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/string.cpp
diff options
context:
space:
mode:
authorMartin Leitner-Ankerl <martin.ankerl@gmail.com>2022-05-04 07:32:48 +0200
committerMartin Leitner-Ankerl <martin.ankerl@gmail.com>2022-05-04 07:34:48 +0200
commitf849e63bad963b8717d4bc45efdad9b08567a36e (patch)
tree40f23eaf8bae5257f7d0023bf56250c6e168fa9c /src/test/fuzz/string.cpp
parentd1a9850102fe572b8a1e00b80c757dd82bf39f9d (diff)
fuzz: SplitString with multiple separators
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
Diffstat (limited to 'src/test/fuzz/string.cpp')
-rw-r--r--src/test/fuzz/string.cpp7
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};