Skip to content

Commit

Permalink
Remove catch.hpp from fuzzers
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Aug 15, 2024
1 parent 70a12bf commit 91e6115
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 17 deletions.
1 change: 0 additions & 1 deletion fuzzers/fuzz_bson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <utility>
#include <ctime>
#include <limits>
#include <catch/catch.hpp>

using namespace jsoncons;

Expand Down
1 change: 0 additions & 1 deletion fuzzers/fuzz_bson_encoder.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <jsoncons/json.hpp>
#include <jsoncons_ext/bson/bson.hpp>
#include <jsoncons_ext/bson/bson_reader.hpp>
#include <catch/catch.hpp>
#include <sstream>

using namespace jsoncons;
Expand Down
1 change: 0 additions & 1 deletion fuzzers/fuzz_bson_parser_max.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <jsoncons/json.hpp>
#include <jsoncons_ext/bson/bson.hpp>
#include <jsoncons_ext/bson/bson_reader.hpp>
#include <catch/catch.hpp>
#include <sstream>

using namespace jsoncons;
Expand Down
1 change: 0 additions & 1 deletion fuzzers/fuzz_cbor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <jsoncons/json.hpp>
#include <jsoncons_ext/cbor/cbor.hpp>
#include <jsoncons_ext/cbor/cbor_reader.hpp>
#include <catch/catch.hpp>
#include <sstream>

using namespace jsoncons;
Expand Down
1 change: 0 additions & 1 deletion fuzzers/fuzz_cbor_encoder.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <jsoncons/json.hpp>
#include <jsoncons_ext/cbor/cbor.hpp>
#include <jsoncons_ext/cbor/cbor_reader.hpp>
#include <catch/catch.hpp>
#include <sstream>

using namespace jsoncons;
Expand Down
1 change: 0 additions & 1 deletion fuzzers/fuzz_msgpack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <utility>
#include <ctime>
#include <limits>
#include <catch/catch.hpp>

using namespace jsoncons;

Expand Down
1 change: 0 additions & 1 deletion fuzzers/fuzz_ubjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <utility>
#include <ctime>
#include <limits>
#include <catch/catch.hpp>

using namespace jsoncons;

Expand Down
17 changes: 8 additions & 9 deletions fuzzers/fuzz_ubjson_encoder.cpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
#include <jsoncons/json.hpp>
#include <jsoncons_ext/ubjson/ubjson.hpp>
#include <jsoncons_ext/ubjson/ubjson_reader.hpp>
#include <catch/catch.hpp>
#include <sstream>

using namespace jsoncons;
using namespace jsoncons::ubjson;

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size)
{
std::string s(reinterpret_cast<const char*>(data), size);
std::istringstream is(s);
std::vector<uint8_t> s1;
ubjson_bytes_encoder encoder(s1);
ubjson_stream_reader reader(is, encoder);
std::string s(reinterpret_cast<const char*>(data), size);
std::istringstream is(s);
std::vector<uint8_t> s1;
ubjson_bytes_encoder encoder(s1);
ubjson_stream_reader reader(is, encoder);

std::error_code ec;
reader.read(ec);
std::error_code ec;
reader.read(ec);

return 0;
return 0;
}
1 change: 0 additions & 1 deletion fuzzers/fuzz_ubjson_parser_max.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <jsoncons/json.hpp>
#include <jsoncons_ext/ubjson/ubjson.hpp>
#include <jsoncons_ext/ubjson/ubjson_reader.hpp>
#include <catch/catch.hpp>
#include <sstream>

using namespace jsoncons;
Expand Down

0 comments on commit 91e6115

Please sign in to comment.