# Copyright 2017 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//testing/libfuzzer/fuzzer_test.gni")
component("cbor") {
sources = [
"constants.h",
"diagnostic_writer.cc",
"diagnostic_writer.h",
"float_conversions.cc",
"float_conversions.h",
"reader.cc",
"reader.h",
"values.cc",
"values.h",
"writer.cc",
"writer.h",
]
defines = [ "CBOR_IMPLEMENTATION" ]
deps = [ "//base" ]
}
source_set("unit_tests") {
testonly = true
sources = [
"diagnostic_writer_unittest.cc",
"reader_unittest.cc",
"values_unittest.cc",
"writer_unittest.cc",
]
deps = [
":cbor",
"//base",
"//testing/gmock",
"//testing/gtest",
]
}
fuzzer_test("reader_fuzzer") {
sources = [ "reader_fuzzer.cc" ]
deps = [
":cbor",
"//base",
]
seed_corpus = "reader_fuzzer_corpus/"
libfuzzer_options = [ "max_len=65535" ]
}