Ada 2.9.2
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
can_parse.cc
Go to the documentation of this file.
1#include <fuzzer/FuzzedDataProvider.h>
2
3#include <memory>
4#include <string>
5
6#include "ada.cpp"
7#include "ada.h"
8
9extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
10 FuzzedDataProvider fdp(data, size);
11 std::string source = fdp.ConsumeRandomLengthString(256);
12 std::string base_source = fdp.ConsumeRandomLengthString(256);
13
17 auto base_source_view =
18 std::string_view(base_source.data(), base_source.length());
19 ada::can_parse(source);
20 ada::can_parse(source, &base_source_view);
21
22 return 0;
23}
Includes all definitions for Ada.
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
Definition can_parse.cc:9
bool can_parse(std::string_view input, const std::string_view *base_input=nullptr)