xref: /aosp_15_r20/external/cronet/third_party/icu/fuzzers/BUILD.gn (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1# Copyright 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5# ICU fuzzers.
6
7import("//testing/libfuzzer/fuzzer_test.gni")
8import("//third_party/icu/config.gni")
9
10# root BUILD depenends on this target. Needed for package discovery
11group("fuzzers") {
12}
13
14source_set("fuzzer_support") {
15  public = [ "fuzzer_utils.h" ]
16  public_deps = [
17    "//base",
18    "//third_party/icu",
19  ]
20  deps = [ "//base:i18n" ]
21  public_configs = [ "//third_party/icu:icu_config" ]
22}
23
24fuzzer_test("icu_uregex_open_fuzzer") {
25  sources = [ "icu_uregex_open_fuzzer.cc" ]
26  deps = [ ":fuzzer_support" ]
27  dict = "icu_regex.dict"
28  libfuzzer_options = [ "max_len=128" ]
29}
30
31fuzzer_test("icu_unicode_string_codepage_create_fuzzer") {
32  sources = [ "icu_unicode_string_codepage_create_fuzzer.cc" ]
33  deps = [ ":fuzzer_support" ]
34  libfuzzer_options = [ "max_len=10240" ]
35}
36
37fuzzer_test("icu_number_format_fuzzer") {
38  sources = [ "icu_number_format_fuzzer.cc" ]
39  deps = [ ":fuzzer_support" ]
40  libfuzzer_options = [ "max_len=10240" ]
41}
42
43fuzzer_test("icu_break_iterator_fuzzer") {
44  sources = [ "icu_break_iterator_fuzzer.cc" ]
45  deps = [ ":fuzzer_support" ]
46  libfuzzer_options = [ "max_len=10240" ]
47}
48
49fuzzer_test("icu_break_iterator_utf32_fuzzer") {
50  sources = [ "icu_break_iterator_utf32_fuzzer.cc" ]
51  deps = [ ":fuzzer_support" ]
52  libfuzzer_options = [ "max_len=10240" ]
53}
54
55fuzzer_test("icu_ucasemap_fuzzer") {
56  sources = [ "icu_ucasemap_fuzzer.cc" ]
57  deps = [ ":fuzzer_support" ]
58  libfuzzer_options = [ "max_len=10240" ]
59}
60
61fuzzer_test("icu_to_case_fuzzer") {
62  sources = [ "icu_to_case_fuzzer.cc" ]
63  deps = [ ":fuzzer_support" ]
64  libfuzzer_options = [ "max_len=10240" ]
65}
66
67fuzzer_test("icu_converter_fuzzer") {
68  sources = [ "icu_converter_fuzzer.cc" ]
69  deps = [ ":fuzzer_support" ]
70  libfuzzer_options = [ "max_len=10240" ]
71}
72
73fuzzer_test("icu_appendable_fuzzer") {
74  sources = [ "icu_appendable_fuzzer.cc" ]
75  deps = [ ":fuzzer_support" ]
76}
77