1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- # Copyright 2020 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.
- import("//testing/libfuzzer/fuzzer_test.gni")
- import("//testing/test.gni")
- config("zxcvbn_internal_config") {
- cflags = [
- "-Wno-shadow",
- # TODO(crbug.com/1344570) Remove once zxcvbn no longer uses
- # std::wstring_convert.
- "-Wno-deprecated-declarations",
- ]
- }
- config("zxcvbn_public_config") {
- include_dirs = [ "//third_party/zxcvbn-cpp/native-src" ]
- }
- source_set("zxcvbn-cpp") {
- sources = [
- "native-src/zxcvbn/adjacency_graphs.cpp",
- "native-src/zxcvbn/adjacency_graphs.hpp",
- "native-src/zxcvbn/common.hpp",
- "native-src/zxcvbn/frequency_lists.cpp",
- "native-src/zxcvbn/frequency_lists.hpp",
- "native-src/zxcvbn/matching.cpp",
- "native-src/zxcvbn/matching.hpp",
- "native-src/zxcvbn/optional.hpp",
- "native-src/zxcvbn/scoring.cpp",
- "native-src/zxcvbn/scoring.hpp",
- "native-src/zxcvbn/time_estimates.cpp",
- "native-src/zxcvbn/time_estimates.hpp",
- "native-src/zxcvbn/util.cpp",
- "native-src/zxcvbn/util.hpp",
- ]
- deps = [
- "//base",
- "//third_party/icu",
- ]
- public_configs = [ ":zxcvbn_public_config" ]
- configs += [ ":zxcvbn_internal_config" ]
- }
- test("zxcvbn_unittests") {
- sources = [
- "test/matching_unittest.cc",
- "test/scoring_unittest.cc",
- ]
- deps = [
- ":zxcvbn-cpp",
- "//testing/gmock",
- "//testing/gtest",
- "//testing/gtest:gtest_main",
- ]
- configs += [ ":zxcvbn_internal_config" ]
- }
- fuzzer_test("zxcvbn_matching_fuzzer") {
- sources = [ "test/matching_fuzzer.cc" ]
- deps = [
- ":zxcvbn-cpp",
- "//base",
- ]
- libfuzzer_options = [ "max_len=128" ]
- }
- fuzzer_test("zxcvbn_scoring_fuzzer") {
- sources = [ "test/scoring_fuzzer.cc" ]
- deps = [
- ":zxcvbn-cpp",
- "//base",
- ]
- libfuzzer_options = [ "max_len=128" ]
- }
|