Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/fuzzing/fuzz_TestSpecParser.cpp
diff options
context:
space:
mode:
authorPaul Dreik2020-09-23 21:54:09 +0200
committerMartin Hořeňovský2020-10-07 17:38:27 +0200
commit0098a76fef57c8ac0e5d050e263a1ff4a3b511fa (patch)
tree6b065403510491fbfedc5e02627641773c37705e /fuzzing/fuzz_TestSpecParser.cpp
parent340ff0005872d33405b55a060e018b2b0ff28127 (diff)
downloadcatch3-0098a76fef57c8ac0e5d050e263a1ff4a3b511fa.tar.gz
first take basing fuzz on v3
Diffstat (limited to 'fuzzing/fuzz_TestSpecParser.cpp')
-rw-r--r--fuzzing/fuzz_TestSpecParser.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/fuzzing/fuzz_TestSpecParser.cpp b/fuzzing/fuzz_TestSpecParser.cpp
new file mode 100644
index 00000000..af4de406
--- /dev/null
+++ b/fuzzing/fuzz_TestSpecParser.cpp
@@ -0,0 +1,16 @@
+//License: Boost 1.0
+//By Paul Dreik 2020
+
+#include <catch2/internal/catch_test_spec_parser.hpp>
+#include <catch2/internal/catch_tag_alias_registry.hpp>
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
+
+ Catch::TagAliasRegistry tar;
+ Catch::TestSpecParser tsp(tar);
+
+ std::string buf(Data,Data+Size);
+ tsp.parse(buf);
+
+ return 0;
+}