diff options
Diffstat (limited to 'chromium/third_party/libprotobuf-mutator/test_fuzzer/test_fuzzer.cc')
-rw-r--r-- | chromium/third_party/libprotobuf-mutator/test_fuzzer/test_fuzzer.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chromium/third_party/libprotobuf-mutator/test_fuzzer/test_fuzzer.cc b/chromium/third_party/libprotobuf-mutator/test_fuzzer/test_fuzzer.cc new file mode 100644 index 00000000000..a40167a2d1f --- /dev/null +++ b/chromium/third_party/libprotobuf-mutator/test_fuzzer/test_fuzzer.cc @@ -0,0 +1,17 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Test fuzzer that when built successfully proves that fuzzable_proto_library +// is working. Building this fuzzer without using fuzzable_proto_library will +// fail because of test_fuzzer_input.proto + +#include <iostream> + +#include "third_party/libprotobuf-mutator/src/src/libfuzzer/libfuzzer_macro.h" + +#include "third_party/libprotobuf-mutator/test_fuzzer/test_fuzzer_input.pb.h" + +DEFINE_PROTO_FUZZER(const lpm_test_fuzzer::TestFuzzerInput& input) { + std::cout << input.imported().imported_publicly().input() << std::endl; +} |