naiveproxy/tools/json_schema_compiler/test/BUILD.gn

87 lines
2.0 KiB
Plaintext
Raw Normal View History

2018-08-11 08:35:24 +03:00
# Copyright 2015 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("//build/config/features.gni")
import("//extensions/buildflags/buildflags.gni")
import("//tools/json_schema_compiler/json_features.gni")
import("//tools/json_schema_compiler/json_schema_api.gni")
assert(enable_extensions)
json_schema_api("api") {
visibility = [ ":*" ]
sources = [
"additional_properties.json",
"any.json",
"arrays.json",
"callbacks.json",
"choices.json",
"crossref.json",
"enums.json",
"error_generation.json",
"functions_as_parameters.json",
"functions_on_types.json",
"idl_basics.idl",
"idl_object_types.idl",
"idl_other_namespace.idl",
"idl_other_namespace_sub_namespace.idl",
"idl_properties.idl",
"objects.json",
"objects_movable.idl",
"objects_movable_json.json",
"simple_api.json",
]
schemas = true
root_namespace = "test::api::%(namespace)s"
deps = [
"//extensions/buildflags",
]
}
json_features("features_compiler_test") {
feature_type = "APIFeature"
provider_class = "CompilerTestFeatureProvider"
sources = [
"features_test.json",
"features_test2.json",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"additional_properties_unittest.cc",
"any_unittest.cc",
"arrays_unittest.cc",
"callbacks_unittest.cc",
"choices_unittest.cc",
"crossref_unittest.cc",
"enums_unittest.cc",
"error_generation_unittest.cc",
"functions_as_parameters_unittest.cc",
"functions_on_types_unittest.cc",
"idl_schemas_unittest.cc",
"objects_unittest.cc",
"simple_api_unittest.cc",
"test_util.cc",
"test_util.h",
]
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
public_deps = [
":features_compiler_test",
]
deps = [
":api",
"//base",
"//testing/gtest",
]
}