Remove test/tint/BUILD.gn.

This Cl moves the contents of the test/tint/BUILD.gn file into the
src/tint/BUILD.gn file. This moves the tests into the same build file as
what is being tested. This is more in line with how the CMakeLists.txt
file is setup.

This removes the need to update 2 BUILD.gn files when adding new files
and tests to tint.

Bug: tint:1517
Change-Id: I9beb8a8bff7c10ac875647246ad4362f7e60f7da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94040
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
dan sinclair 2022-06-17 13:01:59 +00:00 committed by Dawn LUCI CQ
parent ecb46b33cc
commit 889a499ef4
3 changed files with 822 additions and 820 deletions

View File

@ -22,8 +22,8 @@ group("all") {
"src/dawn/tests",
"src/fuzzers/dawn:dawn_fuzzers",
"src/tint:libtint",
"src/tint:tint_unittests",
"src/tint/fuzzers",
"test/tint:tint_unittests",
]
if (dawn_standalone) {
deps += [

View File

@ -13,6 +13,7 @@
# limitations under the License.
import("//build_overrides/build.gni")
import("//testing/test.gni")
import("../../tint_overrides_with_defaults.gni")
###############################################################################
@ -845,3 +846,821 @@ source_set("libtint") {
configs += [ "//build/config/compiler:no_chromium_code" ]
}
}
###############################################################################
# Gtest Gmock - Handle building inside and outside of Chromium.
###############################################################################
# When building outside of Chromium we need to define our own targets for GTest
# and GMock. However when compiling inside of Chromium we need to reuse the
# existing targets, both because Chromium has a special harness for swarming
# and because otherwise the "gn check" fails.
if (!build_with_chromium) {
# When we aren't in Chromium we define out own targets based on the location
# of the googletest repo.
config("gtest_config") {
include_dirs = [
"${tint_googletest_dir}/googletest",
"${tint_googletest_dir}/googletest/include",
]
}
static_library("gtest") {
testonly = true
sources = [ "${tint_googletest_dir}/googletest/src/gtest-all.cc" ]
public_configs = [ ":gtest_config" ]
}
config("gmock_config") {
include_dirs = [
"${tint_googletest_dir}/googlemock",
"${tint_googletest_dir}/googlemock/include",
"${tint_googletest_dir}/googletest/include",
]
}
static_library("gmock") {
testonly = true
sources = [ "${tint_googletest_dir}/googlemock/src/gmock-all.cc" ]
public_configs = [ ":gmock_config" ]
}
group("gmock_and_gtest") {
testonly = true
public_deps = [
":gmock",
":gtest",
]
}
} else {
# When we are in Chromium we reuse its targets, and also add some deps that
# are needed to launch the test in swarming mode.
group("gmock_and_gtest") {
testonly = true
public_deps = [
"//base",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/googletest:gmock",
]
}
}
###############################################################################
# Wrapping of Chromium targets
###############################################################################
# These targets are separated because they are Chromium sources files that
# can't use the tint_internal config, otherwise Tint's warning flags get
# applied while compiling a bunch of Chromium's //base (via header inclusion)
source_set("tint_unittests_main") {
testonly = true
deps = [ ":gmock_and_gtest" ]
if (build_with_chromium) {
sources = [ "//gpu/tint_unittests_main.cc" ]
} else {
sources = [ "test_main.cc" ]
configs += [ ":tint_unittests_config" ]
deps += [
":libtint",
":tint_unittests_hlsl_writer_src",
":tint_unittests_msl_writer_src",
":tint_unittests_spv_reader_src",
]
}
}
###############################################################################
# Tests - For libtint core and optional modules
###############################################################################
config("tint_unittests_config") {
include_dirs = [
"${tint_googletest_dir}/googlemock/include",
"${tint_googletest_dir}/googletest/include",
]
configs = [
":tint_common_config",
":tint_public_config",
]
}
template("tint_unittests_source_set") {
source_set(target_name) {
forward_variables_from(invoker, "*", [ "configs" ])
if (defined(invoker.configs)) {
configs += invoker.configs
}
configs += [ ":tint_unittests_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
testonly = true
if (!defined(invoker.deps)) {
deps = []
}
deps += [
":gmock_and_gtest",
":libtint",
":tint_utils_io",
]
}
}
tint_unittests_source_set("tint_unittests_ast_src") {
sources = [
"ast/alias_test.cc",
"ast/array_test.cc",
"ast/assignment_statement_test.cc",
"ast/atomic_test.cc",
"ast/binary_expression_test.cc",
"ast/binding_attribute_test.cc",
"ast/bitcast_expression_test.cc",
"ast/block_statement_test.cc",
"ast/bool_literal_expression_test.cc",
"ast/bool_test.cc",
"ast/break_statement_test.cc",
"ast/builtin_attribute_test.cc",
"ast/builtin_texture_helper_test.cc",
"ast/builtin_texture_helper_test.h",
"ast/call_expression_test.cc",
"ast/call_statement_test.cc",
"ast/case_statement_test.cc",
"ast/compound_assignment_statement_test.cc",
"ast/continue_statement_test.cc",
"ast/depth_multisampled_texture_test.cc",
"ast/depth_texture_test.cc",
"ast/discard_statement_test.cc",
"ast/enable_test.cc",
"ast/extension_test.cc",
"ast/external_texture_test.cc",
"ast/f16_test.cc",
"ast/f32_test.cc",
"ast/fallthrough_statement_test.cc",
"ast/float_literal_expression_test.cc",
"ast/for_loop_statement_test.cc",
"ast/function_test.cc",
"ast/group_attribute_test.cc",
"ast/i32_test.cc",
"ast/id_attribute_test.cc",
"ast/identifier_expression_test.cc",
"ast/if_statement_test.cc",
"ast/increment_decrement_statement_test.cc",
"ast/index_accessor_expression_test.cc",
"ast/int_literal_expression_test.cc",
"ast/interpolate_attribute_test.cc",
"ast/invariant_attribute_test.cc",
"ast/location_attribute_test.cc",
"ast/loop_statement_test.cc",
"ast/matrix_test.cc",
"ast/member_accessor_expression_test.cc",
"ast/module_clone_test.cc",
"ast/module_test.cc",
"ast/multisampled_texture_test.cc",
"ast/phony_expression_test.cc",
"ast/pointer_test.cc",
"ast/return_statement_test.cc",
"ast/sampled_texture_test.cc",
"ast/sampler_test.cc",
"ast/stage_attribute_test.cc",
"ast/storage_texture_test.cc",
"ast/stride_attribute_test.cc",
"ast/struct_member_align_attribute_test.cc",
"ast/struct_member_offset_attribute_test.cc",
"ast/struct_member_size_attribute_test.cc",
"ast/struct_member_test.cc",
"ast/struct_test.cc",
"ast/switch_statement_test.cc",
"ast/test_helper.h",
"ast/texture_test.cc",
"ast/traverse_expressions_test.cc",
"ast/u32_test.cc",
"ast/unary_op_expression_test.cc",
"ast/variable_decl_statement_test.cc",
"ast/variable_test.cc",
"ast/vector_test.cc",
"ast/while_statement_test.cc",
"ast/workgroup_attribute_test.cc",
]
}
tint_unittests_source_set("tint_unittests_diagnostic_src") {
sources = [
"diagnostic/diagnostic_test.cc",
"diagnostic/formatter_test.cc",
"diagnostic/printer_test.cc",
]
}
tint_unittests_source_set("tint_unittests_inspector_src") {
sources = [
"inspector/inspector_test.cc",
"inspector/test_inspector_builder.cc",
"inspector/test_inspector_builder.h",
"inspector/test_inspector_runner.cc",
"inspector/test_inspector_runner.h",
]
}
tint_unittests_source_set("tint_unittests_resolver_src") {
sources = [
"resolver/array_accessor_test.cc",
"resolver/assignment_validation_test.cc",
"resolver/atomics_test.cc",
"resolver/atomics_validation_test.cc",
"resolver/attribute_validation_test.cc",
"resolver/bitcast_validation_test.cc",
"resolver/builtin_test.cc",
"resolver/builtin_validation_test.cc",
"resolver/builtins_validation_test.cc",
"resolver/call_test.cc",
"resolver/call_validation_test.cc",
"resolver/compound_assignment_validation_test.cc",
"resolver/compound_statement_test.cc",
"resolver/control_block_validation_test.cc",
"resolver/dependency_graph_test.cc",
"resolver/entry_point_validation_test.cc",
"resolver/function_validation_test.cc",
"resolver/host_shareable_validation_test.cc",
"resolver/increment_decrement_validation_test.cc",
"resolver/intrinsic_table_test.cc",
"resolver/is_host_shareable_test.cc",
"resolver/is_storeable_test.cc",
"resolver/materialize_test.cc",
"resolver/pipeline_overridable_constant_test.cc",
"resolver/ptr_ref_test.cc",
"resolver/ptr_ref_validation_test.cc",
"resolver/resolver_behavior_test.cc",
"resolver/resolver_constants_test.cc",
"resolver/resolver_test.cc",
"resolver/resolver_test_helper.cc",
"resolver/resolver_test_helper.h",
"resolver/side_effects_test.cc",
"resolver/source_variable_test.cc",
"resolver/storage_class_layout_validation_test.cc",
"resolver/storage_class_validation_test.cc",
"resolver/struct_layout_test.cc",
"resolver/struct_pipeline_stage_use_test.cc",
"resolver/struct_storage_class_use_test.cc",
"resolver/type_constructor_validation_test.cc",
"resolver/type_validation_test.cc",
"resolver/uniformity_test.cc",
"resolver/validation_test.cc",
"resolver/validator_is_storeable_test.cc",
"resolver/var_let_test.cc",
"resolver/var_let_validation_test.cc",
]
deps = [ ":tint_unittests_ast_src" ]
}
tint_unittests_source_set("tint_unittests_sem_src") {
sources = [
"sem/atomic_test.cc",
"sem/bool_test.cc",
"sem/builtin_test.cc",
"sem/constant_test.cc",
"sem/depth_multisampled_texture_test.cc",
"sem/depth_texture_test.cc",
"sem/expression_test.cc",
"sem/external_texture_test.cc",
"sem/f16_test.cc",
"sem/f32_test.cc",
"sem/i32_test.cc",
"sem/matrix_test.cc",
"sem/multisampled_texture_test.cc",
"sem/pointer_test.cc",
"sem/reference_test.cc",
"sem/sampled_texture_test.cc",
"sem/sampler_test.cc",
"sem/sem_array_test.cc",
"sem/sem_struct_test.cc",
"sem/storage_texture_test.cc",
"sem/texture_test.cc",
"sem/type_manager_test.cc",
"sem/type_test.cc",
"sem/u32_test.cc",
"sem/vector_test.cc",
]
}
tint_unittests_source_set("tint_unittests_text_src") {
sources = [ "text/unicode_test.cc" ]
}
tint_unittests_source_set("tint_unittests_transform_src") {
sources = [
"transform/add_empty_entry_point_test.cc",
"transform/add_spirv_block_attribute_test.cc",
"transform/array_length_from_uniform_test.cc",
"transform/binding_remapper_test.cc",
"transform/builtin_polyfill_test.cc",
"transform/calculate_array_length_test.cc",
"transform/canonicalize_entry_point_io_test.cc",
"transform/combine_samplers_test.cc",
"transform/decompose_memory_access_test.cc",
"transform/decompose_strided_array_test.cc",
"transform/decompose_strided_matrix_test.cc",
"transform/disable_uniformity_analysis_test.cc",
"transform/expand_compound_assignment_test.cc",
"transform/first_index_offset_test.cc",
"transform/fold_trivial_single_use_lets_test.cc",
"transform/for_loop_to_loop_test.cc",
"transform/localize_struct_array_assignment_test.cc",
"transform/loop_to_for_loop_test.cc",
"transform/module_scope_var_to_entry_point_param_test.cc",
"transform/multiplanar_external_texture_test.cc",
"transform/num_workgroups_from_uniform_test.cc",
"transform/promote_initializers_to_const_var_test.cc",
"transform/promote_side_effects_to_decl_test.cc",
"transform/remove_continue_in_switch_test.cc",
"transform/remove_phonies_test.cc",
"transform/remove_unreachable_statements_test.cc",
"transform/renamer_test.cc",
"transform/robustness_test.cc",
"transform/simplify_pointers_test.cc",
"transform/single_entry_point_test.cc",
"transform/test_helper.h",
"transform/transform_test.cc",
"transform/unshadow_test.cc",
"transform/unwind_discard_functions_test.cc",
"transform/utils/get_insertion_point_test.cc",
"transform/utils/hoist_to_decl_before_test.cc",
"transform/var_for_dynamic_index_test.cc",
"transform/vectorize_scalar_matrix_constructors_test.cc",
"transform/vertex_pulling_test.cc",
"transform/while_to_loop_test.cc",
"transform/wrap_arrays_in_structs_test.cc",
"transform/zero_init_workgroup_memory_test.cc",
]
}
tint_unittests_source_set("tint_unittests_utils_src") {
sources = [
"utils/bitcast_test.cc",
"utils/crc32_test.cc",
"utils/defer_test.cc",
"utils/enum_set_test.cc",
"utils/hash_test.cc",
"utils/io/command_test.cc",
"utils/io/tmpfile_test.cc",
"utils/map_test.cc",
"utils/math_test.cc",
"utils/result_test.cc",
"utils/reverse_test.cc",
"utils/scoped_assignment_test.cc",
"utils/string_test.cc",
"utils/transform_test.cc",
"utils/unique_allocator_test.cc",
"utils/unique_vector_test.cc",
]
}
tint_unittests_source_set("tint_unittests_writer_src") {
sources = [
"writer/append_vector_test.cc",
"writer/flatten_bindings_test.cc",
"writer/float_to_string_test.cc",
"writer/generate_external_texture_bindings_test.cc",
"writer/text_generator_test.cc",
]
}
tint_unittests_source_set("tint_unittests_spv_reader_src") {
sources = [
"reader/spirv/enum_converter_test.cc",
"reader/spirv/fail_stream_test.cc",
"reader/spirv/function_arithmetic_test.cc",
"reader/spirv/function_bit_test.cc",
"reader/spirv/function_call_test.cc",
"reader/spirv/function_cfg_test.cc",
"reader/spirv/function_composite_test.cc",
"reader/spirv/function_conversion_test.cc",
"reader/spirv/function_decl_test.cc",
"reader/spirv/function_glsl_std_450_test.cc",
"reader/spirv/function_logical_test.cc",
"reader/spirv/function_memory_test.cc",
"reader/spirv/function_misc_test.cc",
"reader/spirv/function_var_test.cc",
"reader/spirv/namer_test.cc",
"reader/spirv/parser_impl_barrier_test.cc",
"reader/spirv/parser_impl_convert_member_decoration_test.cc",
"reader/spirv/parser_impl_convert_type_test.cc",
"reader/spirv/parser_impl_function_decl_test.cc",
"reader/spirv/parser_impl_get_decorations_test.cc",
"reader/spirv/parser_impl_handle_test.cc",
"reader/spirv/parser_impl_import_test.cc",
"reader/spirv/parser_impl_module_var_test.cc",
"reader/spirv/parser_impl_named_types_test.cc",
"reader/spirv/parser_impl_test.cc",
"reader/spirv/parser_impl_test_helper.cc",
"reader/spirv/parser_impl_test_helper.h",
"reader/spirv/parser_impl_user_name_test.cc",
"reader/spirv/parser_test.cc",
"reader/spirv/parser_type_test.cc",
"reader/spirv/spirv_tools_helpers_test.cc",
"reader/spirv/spirv_tools_helpers_test.h",
"reader/spirv/usage_test.cc",
]
deps = [ ":libtint_spv_reader_src" ]
}
tint_unittests_source_set("tint_unittests_spv_writer_src") {
sources = [
"writer/spirv/binary_writer_test.cc",
"writer/spirv/builder_accessor_expression_test.cc",
"writer/spirv/builder_assign_test.cc",
"writer/spirv/builder_binary_expression_test.cc",
"writer/spirv/builder_bitcast_expression_test.cc",
"writer/spirv/builder_block_test.cc",
"writer/spirv/builder_builtin_test.cc",
"writer/spirv/builder_builtin_texture_test.cc",
"writer/spirv/builder_call_test.cc",
"writer/spirv/builder_constructor_expression_test.cc",
"writer/spirv/builder_discard_test.cc",
"writer/spirv/builder_entry_point_test.cc",
"writer/spirv/builder_format_conversion_test.cc",
"writer/spirv/builder_function_attribute_test.cc",
"writer/spirv/builder_function_test.cc",
"writer/spirv/builder_function_variable_test.cc",
"writer/spirv/builder_global_variable_test.cc",
"writer/spirv/builder_ident_expression_test.cc",
"writer/spirv/builder_if_test.cc",
"writer/spirv/builder_literal_test.cc",
"writer/spirv/builder_loop_test.cc",
"writer/spirv/builder_return_test.cc",
"writer/spirv/builder_switch_test.cc",
"writer/spirv/builder_test.cc",
"writer/spirv/builder_type_test.cc",
"writer/spirv/builder_unary_op_expression_test.cc",
"writer/spirv/instruction_test.cc",
"writer/spirv/operand_test.cc",
"writer/spirv/scalar_constant_test.cc",
"writer/spirv/spv_dump.cc",
"writer/spirv/spv_dump.h",
"writer/spirv/test_helper.h",
]
deps = [
":libtint_spv_writer_src",
":tint_unittests_ast_src",
"${tint_spirv_tools_dir}/:spvtools",
]
}
tint_unittests_source_set("tint_unittests_wgsl_reader_src") {
sources = [
"reader/wgsl/lexer_test.cc",
"reader/wgsl/parser_impl_additive_expression_test.cc",
"reader/wgsl/parser_impl_and_expression_test.cc",
"reader/wgsl/parser_impl_argument_expression_list_test.cc",
"reader/wgsl/parser_impl_assignment_stmt_test.cc",
"reader/wgsl/parser_impl_body_stmt_test.cc",
"reader/wgsl/parser_impl_break_stmt_test.cc",
"reader/wgsl/parser_impl_bug_cases_test.cc",
"reader/wgsl/parser_impl_call_stmt_test.cc",
"reader/wgsl/parser_impl_case_body_test.cc",
"reader/wgsl/parser_impl_const_expr_test.cc",
"reader/wgsl/parser_impl_const_literal_test.cc",
"reader/wgsl/parser_impl_continue_stmt_test.cc",
"reader/wgsl/parser_impl_continuing_stmt_test.cc",
"reader/wgsl/parser_impl_depth_texture_test.cc",
"reader/wgsl/parser_impl_enable_directive_test.cc",
"reader/wgsl/parser_impl_equality_expression_test.cc",
"reader/wgsl/parser_impl_error_msg_test.cc",
"reader/wgsl/parser_impl_error_resync_test.cc",
"reader/wgsl/parser_impl_exclusive_or_expression_test.cc",
"reader/wgsl/parser_impl_external_texture_test.cc",
"reader/wgsl/parser_impl_for_stmt_test.cc",
"reader/wgsl/parser_impl_function_attribute_list_test.cc",
"reader/wgsl/parser_impl_function_attribute_test.cc",
"reader/wgsl/parser_impl_function_decl_test.cc",
"reader/wgsl/parser_impl_function_header_test.cc",
"reader/wgsl/parser_impl_global_constant_decl_test.cc",
"reader/wgsl/parser_impl_global_decl_test.cc",
"reader/wgsl/parser_impl_global_variable_decl_test.cc",
"reader/wgsl/parser_impl_if_stmt_test.cc",
"reader/wgsl/parser_impl_inclusive_or_expression_test.cc",
"reader/wgsl/parser_impl_increment_decrement_stmt_test.cc",
"reader/wgsl/parser_impl_logical_and_expression_test.cc",
"reader/wgsl/parser_impl_logical_or_expression_test.cc",
"reader/wgsl/parser_impl_loop_stmt_test.cc",
"reader/wgsl/parser_impl_multiplicative_expression_test.cc",
"reader/wgsl/parser_impl_param_list_test.cc",
"reader/wgsl/parser_impl_paren_rhs_stmt_test.cc",
"reader/wgsl/parser_impl_pipeline_stage_test.cc",
"reader/wgsl/parser_impl_primary_expression_test.cc",
"reader/wgsl/parser_impl_relational_expression_test.cc",
"reader/wgsl/parser_impl_reserved_keyword_test.cc",
"reader/wgsl/parser_impl_sampled_texture_test.cc",
"reader/wgsl/parser_impl_sampler_test.cc",
"reader/wgsl/parser_impl_shift_expression_test.cc",
"reader/wgsl/parser_impl_singular_expression_test.cc",
"reader/wgsl/parser_impl_statement_test.cc",
"reader/wgsl/parser_impl_statements_test.cc",
"reader/wgsl/parser_impl_storage_class_test.cc",
"reader/wgsl/parser_impl_storage_texture_test.cc",
"reader/wgsl/parser_impl_struct_attribute_decl_test.cc",
"reader/wgsl/parser_impl_struct_body_decl_test.cc",
"reader/wgsl/parser_impl_struct_decl_test.cc",
"reader/wgsl/parser_impl_struct_member_attribute_decl_test.cc",
"reader/wgsl/parser_impl_struct_member_attribute_test.cc",
"reader/wgsl/parser_impl_struct_member_test.cc",
"reader/wgsl/parser_impl_switch_body_test.cc",
"reader/wgsl/parser_impl_switch_stmt_test.cc",
"reader/wgsl/parser_impl_test.cc",
"reader/wgsl/parser_impl_test_helper.cc",
"reader/wgsl/parser_impl_test_helper.h",
"reader/wgsl/parser_impl_texel_format_test.cc",
"reader/wgsl/parser_impl_texture_sampler_test.cc",
"reader/wgsl/parser_impl_type_alias_test.cc",
"reader/wgsl/parser_impl_type_decl_test.cc",
"reader/wgsl/parser_impl_unary_expression_test.cc",
"reader/wgsl/parser_impl_variable_attribute_list_test.cc",
"reader/wgsl/parser_impl_variable_attribute_test.cc",
"reader/wgsl/parser_impl_variable_decl_test.cc",
"reader/wgsl/parser_impl_variable_ident_decl_test.cc",
"reader/wgsl/parser_impl_variable_qualifier_test.cc",
"reader/wgsl/parser_impl_variable_stmt_test.cc",
"reader/wgsl/parser_impl_while_stmt_test.cc",
"reader/wgsl/parser_test.cc",
"reader/wgsl/token_test.cc",
]
deps = [ ":libtint_wgsl_reader_src" ]
}
tint_unittests_source_set("tint_unittests_wgsl_writer_src") {
sources = [
"writer/wgsl/generator_impl_alias_type_test.cc",
"writer/wgsl/generator_impl_array_accessor_test.cc",
"writer/wgsl/generator_impl_assign_test.cc",
"writer/wgsl/generator_impl_binary_test.cc",
"writer/wgsl/generator_impl_bitcast_test.cc",
"writer/wgsl/generator_impl_block_test.cc",
"writer/wgsl/generator_impl_break_test.cc",
"writer/wgsl/generator_impl_call_test.cc",
"writer/wgsl/generator_impl_case_test.cc",
"writer/wgsl/generator_impl_cast_test.cc",
"writer/wgsl/generator_impl_constructor_test.cc",
"writer/wgsl/generator_impl_continue_test.cc",
"writer/wgsl/generator_impl_discard_test.cc",
"writer/wgsl/generator_impl_enable_test.cc",
"writer/wgsl/generator_impl_fallthrough_test.cc",
"writer/wgsl/generator_impl_function_test.cc",
"writer/wgsl/generator_impl_global_decl_test.cc",
"writer/wgsl/generator_impl_identifier_test.cc",
"writer/wgsl/generator_impl_if_test.cc",
"writer/wgsl/generator_impl_literal_test.cc",
"writer/wgsl/generator_impl_loop_test.cc",
"writer/wgsl/generator_impl_member_accessor_test.cc",
"writer/wgsl/generator_impl_return_test.cc",
"writer/wgsl/generator_impl_switch_test.cc",
"writer/wgsl/generator_impl_test.cc",
"writer/wgsl/generator_impl_type_test.cc",
"writer/wgsl/generator_impl_unary_op_test.cc",
"writer/wgsl/generator_impl_variable_decl_statement_test.cc",
"writer/wgsl/generator_impl_variable_test.cc",
"writer/wgsl/test_helper.h",
]
deps = [
":libtint_wgsl_writer_src",
":tint_unittests_ast_src",
]
}
tint_unittests_source_set("tint_unittests_msl_writer_src") {
sources = [
"writer/msl/generator_impl_array_accessor_test.cc",
"writer/msl/generator_impl_assign_test.cc",
"writer/msl/generator_impl_binary_test.cc",
"writer/msl/generator_impl_bitcast_test.cc",
"writer/msl/generator_impl_block_test.cc",
"writer/msl/generator_impl_break_test.cc",
"writer/msl/generator_impl_builtin_test.cc",
"writer/msl/generator_impl_builtin_texture_test.cc",
"writer/msl/generator_impl_call_test.cc",
"writer/msl/generator_impl_case_test.cc",
"writer/msl/generator_impl_cast_test.cc",
"writer/msl/generator_impl_constructor_test.cc",
"writer/msl/generator_impl_continue_test.cc",
"writer/msl/generator_impl_discard_test.cc",
"writer/msl/generator_impl_function_test.cc",
"writer/msl/generator_impl_identifier_test.cc",
"writer/msl/generator_impl_if_test.cc",
"writer/msl/generator_impl_import_test.cc",
"writer/msl/generator_impl_loop_test.cc",
"writer/msl/generator_impl_member_accessor_test.cc",
"writer/msl/generator_impl_module_constant_test.cc",
"writer/msl/generator_impl_return_test.cc",
"writer/msl/generator_impl_sanitizer_test.cc",
"writer/msl/generator_impl_switch_test.cc",
"writer/msl/generator_impl_test.cc",
"writer/msl/generator_impl_type_test.cc",
"writer/msl/generator_impl_unary_op_test.cc",
"writer/msl/generator_impl_variable_decl_statement_test.cc",
"writer/msl/test_helper.h",
]
deps = [
":libtint_msl_writer_src",
":tint_unittests_ast_src",
]
}
tint_unittests_source_set("tint_unittests_hlsl_writer_src") {
sources = [
"writer/hlsl/generator_impl_array_accessor_test.cc",
"writer/hlsl/generator_impl_assign_test.cc",
"writer/hlsl/generator_impl_binary_test.cc",
"writer/hlsl/generator_impl_bitcast_test.cc",
"writer/hlsl/generator_impl_block_test.cc",
"writer/hlsl/generator_impl_break_test.cc",
"writer/hlsl/generator_impl_builtin_test.cc",
"writer/hlsl/generator_impl_builtin_texture_test.cc",
"writer/hlsl/generator_impl_call_test.cc",
"writer/hlsl/generator_impl_case_test.cc",
"writer/hlsl/generator_impl_cast_test.cc",
"writer/hlsl/generator_impl_constructor_test.cc",
"writer/hlsl/generator_impl_continue_test.cc",
"writer/hlsl/generator_impl_discard_test.cc",
"writer/hlsl/generator_impl_function_test.cc",
"writer/hlsl/generator_impl_identifier_test.cc",
"writer/hlsl/generator_impl_if_test.cc",
"writer/hlsl/generator_impl_import_test.cc",
"writer/hlsl/generator_impl_loop_test.cc",
"writer/hlsl/generator_impl_member_accessor_test.cc",
"writer/hlsl/generator_impl_module_constant_test.cc",
"writer/hlsl/generator_impl_return_test.cc",
"writer/hlsl/generator_impl_sanitizer_test.cc",
"writer/hlsl/generator_impl_switch_test.cc",
"writer/hlsl/generator_impl_test.cc",
"writer/hlsl/generator_impl_type_test.cc",
"writer/hlsl/generator_impl_unary_op_test.cc",
"writer/hlsl/generator_impl_variable_decl_statement_test.cc",
"writer/hlsl/generator_impl_workgroup_var_test.cc",
"writer/hlsl/test_helper.h",
]
deps = [
":libtint_hlsl_writer_src",
":tint_unittests_ast_src",
]
}
tint_unittests_source_set("tint_unittests_glsl_writer_src") {
sources = [
"writer/glsl/generator_impl_array_accessor_test.cc",
"writer/glsl/generator_impl_assign_test.cc",
"writer/glsl/generator_impl_binary_test.cc",
"writer/glsl/generator_impl_bitcast_test.cc",
"writer/glsl/generator_impl_block_test.cc",
"writer/glsl/generator_impl_break_test.cc",
"writer/glsl/generator_impl_builtin_test.cc",
"writer/glsl/generator_impl_builtin_texture_test.cc",
"writer/glsl/generator_impl_call_test.cc",
"writer/glsl/generator_impl_case_test.cc",
"writer/glsl/generator_impl_cast_test.cc",
"writer/glsl/generator_impl_constructor_test.cc",
"writer/glsl/generator_impl_continue_test.cc",
"writer/glsl/generator_impl_discard_test.cc",
"writer/glsl/generator_impl_function_test.cc",
"writer/glsl/generator_impl_identifier_test.cc",
"writer/glsl/generator_impl_if_test.cc",
"writer/glsl/generator_impl_import_test.cc",
"writer/glsl/generator_impl_loop_test.cc",
"writer/glsl/generator_impl_member_accessor_test.cc",
"writer/glsl/generator_impl_module_constant_test.cc",
"writer/glsl/generator_impl_return_test.cc",
"writer/glsl/generator_impl_sanitizer_test.cc",
"writer/glsl/generator_impl_storage_buffer_test.cc",
"writer/glsl/generator_impl_switch_test.cc",
"writer/glsl/generator_impl_test.cc",
"writer/glsl/generator_impl_type_test.cc",
"writer/glsl/generator_impl_unary_op_test.cc",
"writer/glsl/generator_impl_uniform_buffer_test.cc",
"writer/glsl/generator_impl_variable_decl_statement_test.cc",
"writer/glsl/generator_impl_workgroup_var_test.cc",
"writer/glsl/test_helper.h",
]
deps = [
":libtint_glsl_writer_src",
":tint_unittests_ast_src",
":tint_unittests_transform_src",
]
}
tint_unittests_source_set("tint_unittests_core_src") {
sources = [
"castable_test.cc",
"clone_context_test.cc",
"debug_test.cc",
"demangler_test.cc",
"number_test.cc",
"program_builder_test.cc",
"program_test.cc",
"scope_stack_test.cc",
"source_test.cc",
"symbol_table_test.cc",
"symbol_test.cc",
"traits_test.cc",
"utils/block_allocator_test.cc",
]
deps = [ ":tint_unittests_ast_src" ]
}
if (build_with_chromium) {
tint_unittests_source_set("tint_unittests_fuzzer_src") {
sources = [ "fuzzers/random_generator_test.cc" ]
deps = [
":tint_unittests_core_src",
"fuzzers:tint_fuzzer_common_src",
]
}
}
source_set("tint_unittests_src") {
testonly = true
deps = [
":libtint_wgsl_reader_src",
":libtint_wgsl_writer_src",
":tint_unittests_ast_src",
":tint_unittests_core_src",
":tint_unittests_diagnostic_src",
":tint_unittests_inspector_src",
":tint_unittests_resolver_src",
":tint_unittests_sem_src",
":tint_unittests_text_src",
":tint_unittests_transform_src",
":tint_unittests_utils_src",
":tint_unittests_writer_src",
]
if (tint_build_spv_reader) {
deps += [ ":tint_unittests_spv_reader_src" ]
}
if (tint_build_spv_writer) {
deps += [ ":tint_unittests_spv_writer_src" ]
}
if (tint_build_wgsl_reader) {
deps += [ ":tint_unittests_wgsl_reader_src" ]
}
if (tint_build_wgsl_writer) {
deps += [ ":tint_unittests_wgsl_writer_src" ]
}
if (tint_build_msl_writer) {
deps += [ ":tint_unittests_msl_writer_src" ]
}
if (tint_build_hlsl_writer) {
deps += [ ":tint_unittests_hlsl_writer_src" ]
}
if (tint_build_glsl_writer) {
deps += [ ":tint_unittests_glsl_writer_src" ]
}
if (build_with_chromium) {
deps += [ ":tint_unittests_fuzzer_src" ]
}
configs += [ ":tint_unittests_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
}
test("tint_unittests") {
deps = [
":gmock_and_gtest",
":tint_unittests_src",
"${tint_spirv_tools_dir}/:spvtools",
"${tint_spirv_tools_dir}/:spvtools_opt",
"${tint_spirv_tools_dir}/:spvtools_val",
]
deps += [ ":tint_unittests_main" ]
configs += [ ":tint_unittests_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
testonly = true
}

View File

@ -12,824 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build_overrides/build.gni")
import("//testing/test.gni")
import("../../tint_overrides_with_defaults.gni")
###############################################################################
# Gtest Gmock - Handle building inside and outside of Chromium.
###############################################################################
# When building outside of Chromium we need to define our own targets for GTest
# and GMock. However when compiling inside of Chromium we need to reuse the
# existing targets, both because Chromium has a special harness for swarming
# and because otherwise the "gn check" fails.
if (!build_with_chromium) {
# When we aren't in Chromium we define out own targets based on the location
# of the googletest repo.
config("gtest_config") {
include_dirs = [
"${tint_googletest_dir}/googletest",
"${tint_googletest_dir}/googletest/include",
]
}
static_library("gtest") {
testonly = true
sources = [ "${tint_googletest_dir}/googletest/src/gtest-all.cc" ]
public_configs = [ ":gtest_config" ]
}
config("gmock_config") {
include_dirs = [
"${tint_googletest_dir}/googlemock",
"${tint_googletest_dir}/googlemock/include",
"${tint_googletest_dir}/googletest/include",
]
}
static_library("gmock") {
testonly = true
sources = [ "${tint_googletest_dir}/googlemock/src/gmock-all.cc" ]
public_configs = [ ":gmock_config" ]
}
group("gmock_and_gtest") {
testonly = true
public_deps = [
":gmock",
":gtest",
]
}
} else {
# When we are in Chromium we reuse its targets, and also add some deps that
# are needed to launch the test in swarming mode.
group("gmock_and_gtest") {
testonly = true
public_deps = [
"//base",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/googletest:gmock",
]
}
}
###############################################################################
# Wrapping of Chromium targets
###############################################################################
# These targets are separated because they are Chromium sources files that
# can't use the tint_internal config, otherwise Tint's warning flags get
# applied while compiling a bunch of Chromium's //base (via header inclusion)
source_set("tint_unittests_main") {
testonly = true
deps = [ ":gmock_and_gtest" ]
if (build_with_chromium) {
sources = [ "//gpu/tint_unittests_main.cc" ]
} else {
sources = [ "../../src/tint/test_main.cc" ]
configs += [ ":tint_unittests_config" ]
deps += [
":tint_unittests_hlsl_writer_src",
":tint_unittests_msl_writer_src",
":tint_unittests_spv_reader_src",
"${tint_root_dir}/src/tint:libtint",
]
}
}
###############################################################################
# Tests - For libtint core and optional modules
###############################################################################
config("tint_unittests_config") {
include_dirs = [
"${tint_googletest_dir}/googlemock/include",
"${tint_googletest_dir}/googletest/include",
]
configs = [
"${tint_root_dir}/src/tint:tint_common_config",
"${tint_root_dir}/src/tint:tint_public_config",
]
}
template("tint_unittests_source_set") {
source_set(target_name) {
forward_variables_from(invoker, "*", [ "configs" ])
if (defined(invoker.configs)) {
configs += invoker.configs
}
configs += [ ":tint_unittests_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
testonly = true
if (!defined(invoker.deps)) {
deps = []
}
deps += [
":gmock_and_gtest",
"${tint_root_dir}/src/tint:libtint",
"${tint_root_dir}/src/tint:tint_utils_io",
]
}
}
tint_unittests_source_set("tint_unittests_ast_src") {
sources = [
"../../src/tint/ast/alias_test.cc",
"../../src/tint/ast/array_test.cc",
"../../src/tint/ast/assignment_statement_test.cc",
"../../src/tint/ast/atomic_test.cc",
"../../src/tint/ast/binary_expression_test.cc",
"../../src/tint/ast/binding_attribute_test.cc",
"../../src/tint/ast/bitcast_expression_test.cc",
"../../src/tint/ast/block_statement_test.cc",
"../../src/tint/ast/bool_literal_expression_test.cc",
"../../src/tint/ast/bool_test.cc",
"../../src/tint/ast/break_statement_test.cc",
"../../src/tint/ast/builtin_attribute_test.cc",
"../../src/tint/ast/builtin_texture_helper_test.cc",
"../../src/tint/ast/builtin_texture_helper_test.h",
"../../src/tint/ast/call_expression_test.cc",
"../../src/tint/ast/call_statement_test.cc",
"../../src/tint/ast/case_statement_test.cc",
"../../src/tint/ast/compound_assignment_statement_test.cc",
"../../src/tint/ast/continue_statement_test.cc",
"../../src/tint/ast/depth_multisampled_texture_test.cc",
"../../src/tint/ast/depth_texture_test.cc",
"../../src/tint/ast/discard_statement_test.cc",
"../../src/tint/ast/enable_test.cc",
"../../src/tint/ast/extension_test.cc",
"../../src/tint/ast/external_texture_test.cc",
"../../src/tint/ast/f16_test.cc",
"../../src/tint/ast/f32_test.cc",
"../../src/tint/ast/fallthrough_statement_test.cc",
"../../src/tint/ast/float_literal_expression_test.cc",
"../../src/tint/ast/for_loop_statement_test.cc",
"../../src/tint/ast/function_test.cc",
"../../src/tint/ast/group_attribute_test.cc",
"../../src/tint/ast/i32_test.cc",
"../../src/tint/ast/id_attribute_test.cc",
"../../src/tint/ast/identifier_expression_test.cc",
"../../src/tint/ast/if_statement_test.cc",
"../../src/tint/ast/increment_decrement_statement_test.cc",
"../../src/tint/ast/index_accessor_expression_test.cc",
"../../src/tint/ast/int_literal_expression_test.cc",
"../../src/tint/ast/interpolate_attribute_test.cc",
"../../src/tint/ast/invariant_attribute_test.cc",
"../../src/tint/ast/location_attribute_test.cc",
"../../src/tint/ast/loop_statement_test.cc",
"../../src/tint/ast/matrix_test.cc",
"../../src/tint/ast/member_accessor_expression_test.cc",
"../../src/tint/ast/module_clone_test.cc",
"../../src/tint/ast/module_test.cc",
"../../src/tint/ast/multisampled_texture_test.cc",
"../../src/tint/ast/phony_expression_test.cc",
"../../src/tint/ast/pointer_test.cc",
"../../src/tint/ast/return_statement_test.cc",
"../../src/tint/ast/sampled_texture_test.cc",
"../../src/tint/ast/sampler_test.cc",
"../../src/tint/ast/stage_attribute_test.cc",
"../../src/tint/ast/storage_texture_test.cc",
"../../src/tint/ast/stride_attribute_test.cc",
"../../src/tint/ast/struct_member_align_attribute_test.cc",
"../../src/tint/ast/struct_member_offset_attribute_test.cc",
"../../src/tint/ast/struct_member_size_attribute_test.cc",
"../../src/tint/ast/struct_member_test.cc",
"../../src/tint/ast/struct_test.cc",
"../../src/tint/ast/switch_statement_test.cc",
"../../src/tint/ast/test_helper.h",
"../../src/tint/ast/texture_test.cc",
"../../src/tint/ast/traverse_expressions_test.cc",
"../../src/tint/ast/u32_test.cc",
"../../src/tint/ast/unary_op_expression_test.cc",
"../../src/tint/ast/variable_decl_statement_test.cc",
"../../src/tint/ast/variable_test.cc",
"../../src/tint/ast/vector_test.cc",
"../../src/tint/ast/while_statement_test.cc",
"../../src/tint/ast/workgroup_attribute_test.cc",
]
}
tint_unittests_source_set("tint_unittests_diagnostic_src") {
sources = [
"../../src/tint/diagnostic/diagnostic_test.cc",
"../../src/tint/diagnostic/formatter_test.cc",
"../../src/tint/diagnostic/printer_test.cc",
]
}
tint_unittests_source_set("tint_unittests_inspector_src") {
sources = [
"../../src/tint/inspector/inspector_test.cc",
"../../src/tint/inspector/test_inspector_builder.cc",
"../../src/tint/inspector/test_inspector_builder.h",
"../../src/tint/inspector/test_inspector_runner.cc",
"../../src/tint/inspector/test_inspector_runner.h",
]
}
tint_unittests_source_set("tint_unittests_resolver_src") {
sources = [
"../../src/tint/resolver/array_accessor_test.cc",
"../../src/tint/resolver/assignment_validation_test.cc",
"../../src/tint/resolver/atomics_test.cc",
"../../src/tint/resolver/atomics_validation_test.cc",
"../../src/tint/resolver/attribute_validation_test.cc",
"../../src/tint/resolver/bitcast_validation_test.cc",
"../../src/tint/resolver/builtin_test.cc",
"../../src/tint/resolver/builtin_validation_test.cc",
"../../src/tint/resolver/builtins_validation_test.cc",
"../../src/tint/resolver/call_test.cc",
"../../src/tint/resolver/call_validation_test.cc",
"../../src/tint/resolver/compound_assignment_validation_test.cc",
"../../src/tint/resolver/compound_statement_test.cc",
"../../src/tint/resolver/control_block_validation_test.cc",
"../../src/tint/resolver/dependency_graph_test.cc",
"../../src/tint/resolver/entry_point_validation_test.cc",
"../../src/tint/resolver/function_validation_test.cc",
"../../src/tint/resolver/host_shareable_validation_test.cc",
"../../src/tint/resolver/increment_decrement_validation_test.cc",
"../../src/tint/resolver/intrinsic_table_test.cc",
"../../src/tint/resolver/is_host_shareable_test.cc",
"../../src/tint/resolver/is_storeable_test.cc",
"../../src/tint/resolver/materialize_test.cc",
"../../src/tint/resolver/pipeline_overridable_constant_test.cc",
"../../src/tint/resolver/ptr_ref_test.cc",
"../../src/tint/resolver/ptr_ref_validation_test.cc",
"../../src/tint/resolver/resolver_behavior_test.cc",
"../../src/tint/resolver/resolver_constants_test.cc",
"../../src/tint/resolver/resolver_test.cc",
"../../src/tint/resolver/resolver_test_helper.cc",
"../../src/tint/resolver/resolver_test_helper.h",
"../../src/tint/resolver/side_effects_test.cc",
"../../src/tint/resolver/source_variable_test.cc",
"../../src/tint/resolver/storage_class_layout_validation_test.cc",
"../../src/tint/resolver/storage_class_validation_test.cc",
"../../src/tint/resolver/struct_layout_test.cc",
"../../src/tint/resolver/struct_pipeline_stage_use_test.cc",
"../../src/tint/resolver/struct_storage_class_use_test.cc",
"../../src/tint/resolver/type_constructor_validation_test.cc",
"../../src/tint/resolver/type_validation_test.cc",
"../../src/tint/resolver/uniformity_test.cc",
"../../src/tint/resolver/validation_test.cc",
"../../src/tint/resolver/validator_is_storeable_test.cc",
"../../src/tint/resolver/var_let_test.cc",
"../../src/tint/resolver/var_let_validation_test.cc",
]
deps = [ ":tint_unittests_ast_src" ]
}
tint_unittests_source_set("tint_unittests_sem_src") {
sources = [
"../../src/tint/sem/atomic_test.cc",
"../../src/tint/sem/bool_test.cc",
"../../src/tint/sem/builtin_test.cc",
"../../src/tint/sem/constant_test.cc",
"../../src/tint/sem/depth_multisampled_texture_test.cc",
"../../src/tint/sem/depth_texture_test.cc",
"../../src/tint/sem/expression_test.cc",
"../../src/tint/sem/external_texture_test.cc",
"../../src/tint/sem/f16_test.cc",
"../../src/tint/sem/f32_test.cc",
"../../src/tint/sem/i32_test.cc",
"../../src/tint/sem/matrix_test.cc",
"../../src/tint/sem/multisampled_texture_test.cc",
"../../src/tint/sem/pointer_test.cc",
"../../src/tint/sem/reference_test.cc",
"../../src/tint/sem/sampled_texture_test.cc",
"../../src/tint/sem/sampler_test.cc",
"../../src/tint/sem/sem_array_test.cc",
"../../src/tint/sem/sem_struct_test.cc",
"../../src/tint/sem/storage_texture_test.cc",
"../../src/tint/sem/texture_test.cc",
"../../src/tint/sem/type_manager_test.cc",
"../../src/tint/sem/type_test.cc",
"../../src/tint/sem/u32_test.cc",
"../../src/tint/sem/vector_test.cc",
]
}
tint_unittests_source_set("tint_unittests_text_src") {
sources = [ "../../src/tint/text/unicode_test.cc" ]
}
tint_unittests_source_set("tint_unittests_transform_src") {
sources = [
"../../src/tint/transform/add_empty_entry_point_test.cc",
"../../src/tint/transform/add_spirv_block_attribute_test.cc",
"../../src/tint/transform/array_length_from_uniform_test.cc",
"../../src/tint/transform/binding_remapper_test.cc",
"../../src/tint/transform/builtin_polyfill_test.cc",
"../../src/tint/transform/calculate_array_length_test.cc",
"../../src/tint/transform/canonicalize_entry_point_io_test.cc",
"../../src/tint/transform/combine_samplers_test.cc",
"../../src/tint/transform/decompose_memory_access_test.cc",
"../../src/tint/transform/decompose_strided_array_test.cc",
"../../src/tint/transform/decompose_strided_matrix_test.cc",
"../../src/tint/transform/disable_uniformity_analysis_test.cc",
"../../src/tint/transform/expand_compound_assignment_test.cc",
"../../src/tint/transform/first_index_offset_test.cc",
"../../src/tint/transform/fold_trivial_single_use_lets_test.cc",
"../../src/tint/transform/for_loop_to_loop_test.cc",
"../../src/tint/transform/localize_struct_array_assignment_test.cc",
"../../src/tint/transform/loop_to_for_loop_test.cc",
"../../src/tint/transform/module_scope_var_to_entry_point_param_test.cc",
"../../src/tint/transform/multiplanar_external_texture_test.cc",
"../../src/tint/transform/num_workgroups_from_uniform_test.cc",
"../../src/tint/transform/promote_initializers_to_const_var_test.cc",
"../../src/tint/transform/promote_side_effects_to_decl_test.cc",
"../../src/tint/transform/remove_continue_in_switch_test.cc",
"../../src/tint/transform/remove_phonies_test.cc",
"../../src/tint/transform/remove_unreachable_statements_test.cc",
"../../src/tint/transform/renamer_test.cc",
"../../src/tint/transform/robustness_test.cc",
"../../src/tint/transform/simplify_pointers_test.cc",
"../../src/tint/transform/single_entry_point_test.cc",
"../../src/tint/transform/test_helper.h",
"../../src/tint/transform/transform_test.cc",
"../../src/tint/transform/unshadow_test.cc",
"../../src/tint/transform/unwind_discard_functions_test.cc",
"../../src/tint/transform/utils/get_insertion_point_test.cc",
"../../src/tint/transform/utils/hoist_to_decl_before_test.cc",
"../../src/tint/transform/var_for_dynamic_index_test.cc",
"../../src/tint/transform/vectorize_scalar_matrix_constructors_test.cc",
"../../src/tint/transform/vertex_pulling_test.cc",
"../../src/tint/transform/while_to_loop_test.cc",
"../../src/tint/transform/wrap_arrays_in_structs_test.cc",
"../../src/tint/transform/zero_init_workgroup_memory_test.cc",
]
}
tint_unittests_source_set("tint_unittests_utils_src") {
sources = [
"../../src/tint/utils/bitcast_test.cc",
"../../src/tint/utils/crc32_test.cc",
"../../src/tint/utils/defer_test.cc",
"../../src/tint/utils/enum_set_test.cc",
"../../src/tint/utils/hash_test.cc",
"../../src/tint/utils/io/command_test.cc",
"../../src/tint/utils/io/tmpfile_test.cc",
"../../src/tint/utils/map_test.cc",
"../../src/tint/utils/math_test.cc",
"../../src/tint/utils/result_test.cc",
"../../src/tint/utils/reverse_test.cc",
"../../src/tint/utils/scoped_assignment_test.cc",
"../../src/tint/utils/string_test.cc",
"../../src/tint/utils/transform_test.cc",
"../../src/tint/utils/unique_allocator_test.cc",
"../../src/tint/utils/unique_vector_test.cc",
]
}
tint_unittests_source_set("tint_unittests_writer_src") {
sources = [
"../../src/tint/writer/append_vector_test.cc",
"../../src/tint/writer/flatten_bindings_test.cc",
"../../src/tint/writer/float_to_string_test.cc",
"../../src/tint/writer/generate_external_texture_bindings_test.cc",
"../../src/tint/writer/text_generator_test.cc",
]
}
tint_unittests_source_set("tint_unittests_spv_reader_src") {
sources = [
"../../src/tint/reader/spirv/enum_converter_test.cc",
"../../src/tint/reader/spirv/fail_stream_test.cc",
"../../src/tint/reader/spirv/function_arithmetic_test.cc",
"../../src/tint/reader/spirv/function_bit_test.cc",
"../../src/tint/reader/spirv/function_call_test.cc",
"../../src/tint/reader/spirv/function_cfg_test.cc",
"../../src/tint/reader/spirv/function_composite_test.cc",
"../../src/tint/reader/spirv/function_conversion_test.cc",
"../../src/tint/reader/spirv/function_decl_test.cc",
"../../src/tint/reader/spirv/function_glsl_std_450_test.cc",
"../../src/tint/reader/spirv/function_logical_test.cc",
"../../src/tint/reader/spirv/function_memory_test.cc",
"../../src/tint/reader/spirv/function_misc_test.cc",
"../../src/tint/reader/spirv/function_var_test.cc",
"../../src/tint/reader/spirv/namer_test.cc",
"../../src/tint/reader/spirv/parser_impl_barrier_test.cc",
"../../src/tint/reader/spirv/parser_impl_convert_member_decoration_test.cc",
"../../src/tint/reader/spirv/parser_impl_convert_type_test.cc",
"../../src/tint/reader/spirv/parser_impl_function_decl_test.cc",
"../../src/tint/reader/spirv/parser_impl_get_decorations_test.cc",
"../../src/tint/reader/spirv/parser_impl_handle_test.cc",
"../../src/tint/reader/spirv/parser_impl_import_test.cc",
"../../src/tint/reader/spirv/parser_impl_module_var_test.cc",
"../../src/tint/reader/spirv/parser_impl_named_types_test.cc",
"../../src/tint/reader/spirv/parser_impl_test.cc",
"../../src/tint/reader/spirv/parser_impl_test_helper.cc",
"../../src/tint/reader/spirv/parser_impl_test_helper.h",
"../../src/tint/reader/spirv/parser_impl_user_name_test.cc",
"../../src/tint/reader/spirv/parser_test.cc",
"../../src/tint/reader/spirv/parser_type_test.cc",
"../../src/tint/reader/spirv/spirv_tools_helpers_test.cc",
"../../src/tint/reader/spirv/spirv_tools_helpers_test.h",
"../../src/tint/reader/spirv/usage_test.cc",
]
deps = [ "${tint_root_dir}/src/tint:libtint_spv_reader_src" ]
}
tint_unittests_source_set("tint_unittests_spv_writer_src") {
sources = [
"../../src/tint/writer/spirv/binary_writer_test.cc",
"../../src/tint/writer/spirv/builder_accessor_expression_test.cc",
"../../src/tint/writer/spirv/builder_assign_test.cc",
"../../src/tint/writer/spirv/builder_binary_expression_test.cc",
"../../src/tint/writer/spirv/builder_bitcast_expression_test.cc",
"../../src/tint/writer/spirv/builder_block_test.cc",
"../../src/tint/writer/spirv/builder_builtin_test.cc",
"../../src/tint/writer/spirv/builder_builtin_texture_test.cc",
"../../src/tint/writer/spirv/builder_call_test.cc",
"../../src/tint/writer/spirv/builder_constructor_expression_test.cc",
"../../src/tint/writer/spirv/builder_discard_test.cc",
"../../src/tint/writer/spirv/builder_entry_point_test.cc",
"../../src/tint/writer/spirv/builder_format_conversion_test.cc",
"../../src/tint/writer/spirv/builder_function_attribute_test.cc",
"../../src/tint/writer/spirv/builder_function_test.cc",
"../../src/tint/writer/spirv/builder_function_variable_test.cc",
"../../src/tint/writer/spirv/builder_global_variable_test.cc",
"../../src/tint/writer/spirv/builder_ident_expression_test.cc",
"../../src/tint/writer/spirv/builder_if_test.cc",
"../../src/tint/writer/spirv/builder_literal_test.cc",
"../../src/tint/writer/spirv/builder_loop_test.cc",
"../../src/tint/writer/spirv/builder_return_test.cc",
"../../src/tint/writer/spirv/builder_switch_test.cc",
"../../src/tint/writer/spirv/builder_test.cc",
"../../src/tint/writer/spirv/builder_type_test.cc",
"../../src/tint/writer/spirv/builder_unary_op_expression_test.cc",
"../../src/tint/writer/spirv/instruction_test.cc",
"../../src/tint/writer/spirv/operand_test.cc",
"../../src/tint/writer/spirv/scalar_constant_test.cc",
"../../src/tint/writer/spirv/spv_dump.cc",
"../../src/tint/writer/spirv/spv_dump.h",
"../../src/tint/writer/spirv/test_helper.h",
]
deps = [
":tint_unittests_ast_src",
"${tint_root_dir}/src/tint:libtint_spv_writer_src",
"${tint_spirv_tools_dir}/:spvtools",
]
}
tint_unittests_source_set("tint_unittests_wgsl_reader_src") {
sources = [
"../../src/tint/reader/wgsl/lexer_test.cc",
"../../src/tint/reader/wgsl/parser_impl_additive_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_and_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_argument_expression_list_test.cc",
"../../src/tint/reader/wgsl/parser_impl_assignment_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_body_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_break_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_bug_cases_test.cc",
"../../src/tint/reader/wgsl/parser_impl_call_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_case_body_test.cc",
"../../src/tint/reader/wgsl/parser_impl_const_expr_test.cc",
"../../src/tint/reader/wgsl/parser_impl_const_literal_test.cc",
"../../src/tint/reader/wgsl/parser_impl_continue_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_continuing_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_depth_texture_test.cc",
"../../src/tint/reader/wgsl/parser_impl_enable_directive_test.cc",
"../../src/tint/reader/wgsl/parser_impl_equality_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_error_msg_test.cc",
"../../src/tint/reader/wgsl/parser_impl_error_resync_test.cc",
"../../src/tint/reader/wgsl/parser_impl_exclusive_or_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_external_texture_test.cc",
"../../src/tint/reader/wgsl/parser_impl_for_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_function_attribute_list_test.cc",
"../../src/tint/reader/wgsl/parser_impl_function_attribute_test.cc",
"../../src/tint/reader/wgsl/parser_impl_function_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_function_header_test.cc",
"../../src/tint/reader/wgsl/parser_impl_global_constant_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_global_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_global_variable_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_if_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_inclusive_or_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_increment_decrement_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_logical_and_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_logical_or_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_loop_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_multiplicative_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_param_list_test.cc",
"../../src/tint/reader/wgsl/parser_impl_paren_rhs_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_pipeline_stage_test.cc",
"../../src/tint/reader/wgsl/parser_impl_primary_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_relational_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_reserved_keyword_test.cc",
"../../src/tint/reader/wgsl/parser_impl_sampled_texture_test.cc",
"../../src/tint/reader/wgsl/parser_impl_sampler_test.cc",
"../../src/tint/reader/wgsl/parser_impl_shift_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_singular_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_statement_test.cc",
"../../src/tint/reader/wgsl/parser_impl_statements_test.cc",
"../../src/tint/reader/wgsl/parser_impl_storage_class_test.cc",
"../../src/tint/reader/wgsl/parser_impl_storage_texture_test.cc",
"../../src/tint/reader/wgsl/parser_impl_struct_attribute_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_struct_body_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_struct_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_struct_member_attribute_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_struct_member_attribute_test.cc",
"../../src/tint/reader/wgsl/parser_impl_struct_member_test.cc",
"../../src/tint/reader/wgsl/parser_impl_switch_body_test.cc",
"../../src/tint/reader/wgsl/parser_impl_switch_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_test_helper.cc",
"../../src/tint/reader/wgsl/parser_impl_test_helper.h",
"../../src/tint/reader/wgsl/parser_impl_texel_format_test.cc",
"../../src/tint/reader/wgsl/parser_impl_texture_sampler_test.cc",
"../../src/tint/reader/wgsl/parser_impl_type_alias_test.cc",
"../../src/tint/reader/wgsl/parser_impl_type_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_unary_expression_test.cc",
"../../src/tint/reader/wgsl/parser_impl_variable_attribute_list_test.cc",
"../../src/tint/reader/wgsl/parser_impl_variable_attribute_test.cc",
"../../src/tint/reader/wgsl/parser_impl_variable_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_variable_ident_decl_test.cc",
"../../src/tint/reader/wgsl/parser_impl_variable_qualifier_test.cc",
"../../src/tint/reader/wgsl/parser_impl_variable_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_impl_while_stmt_test.cc",
"../../src/tint/reader/wgsl/parser_test.cc",
"../../src/tint/reader/wgsl/token_test.cc",
]
deps = [ "${tint_root_dir}/src/tint:libtint_wgsl_reader_src" ]
}
tint_unittests_source_set("tint_unittests_wgsl_writer_src") {
sources = [
"../../src/tint/writer/wgsl/generator_impl_alias_type_test.cc",
"../../src/tint/writer/wgsl/generator_impl_array_accessor_test.cc",
"../../src/tint/writer/wgsl/generator_impl_assign_test.cc",
"../../src/tint/writer/wgsl/generator_impl_binary_test.cc",
"../../src/tint/writer/wgsl/generator_impl_bitcast_test.cc",
"../../src/tint/writer/wgsl/generator_impl_block_test.cc",
"../../src/tint/writer/wgsl/generator_impl_break_test.cc",
"../../src/tint/writer/wgsl/generator_impl_call_test.cc",
"../../src/tint/writer/wgsl/generator_impl_case_test.cc",
"../../src/tint/writer/wgsl/generator_impl_cast_test.cc",
"../../src/tint/writer/wgsl/generator_impl_constructor_test.cc",
"../../src/tint/writer/wgsl/generator_impl_continue_test.cc",
"../../src/tint/writer/wgsl/generator_impl_discard_test.cc",
"../../src/tint/writer/wgsl/generator_impl_enable_test.cc",
"../../src/tint/writer/wgsl/generator_impl_fallthrough_test.cc",
"../../src/tint/writer/wgsl/generator_impl_function_test.cc",
"../../src/tint/writer/wgsl/generator_impl_global_decl_test.cc",
"../../src/tint/writer/wgsl/generator_impl_identifier_test.cc",
"../../src/tint/writer/wgsl/generator_impl_if_test.cc",
"../../src/tint/writer/wgsl/generator_impl_literal_test.cc",
"../../src/tint/writer/wgsl/generator_impl_loop_test.cc",
"../../src/tint/writer/wgsl/generator_impl_member_accessor_test.cc",
"../../src/tint/writer/wgsl/generator_impl_return_test.cc",
"../../src/tint/writer/wgsl/generator_impl_switch_test.cc",
"../../src/tint/writer/wgsl/generator_impl_test.cc",
"../../src/tint/writer/wgsl/generator_impl_type_test.cc",
"../../src/tint/writer/wgsl/generator_impl_unary_op_test.cc",
"../../src/tint/writer/wgsl/generator_impl_variable_decl_statement_test.cc",
"../../src/tint/writer/wgsl/generator_impl_variable_test.cc",
"../../src/tint/writer/wgsl/test_helper.h",
]
deps = [
":tint_unittests_ast_src",
"${tint_root_dir}/src/tint:libtint_wgsl_writer_src",
]
}
tint_unittests_source_set("tint_unittests_msl_writer_src") {
sources = [
"../../src/tint/writer/msl/generator_impl_array_accessor_test.cc",
"../../src/tint/writer/msl/generator_impl_assign_test.cc",
"../../src/tint/writer/msl/generator_impl_binary_test.cc",
"../../src/tint/writer/msl/generator_impl_bitcast_test.cc",
"../../src/tint/writer/msl/generator_impl_block_test.cc",
"../../src/tint/writer/msl/generator_impl_break_test.cc",
"../../src/tint/writer/msl/generator_impl_builtin_test.cc",
"../../src/tint/writer/msl/generator_impl_builtin_texture_test.cc",
"../../src/tint/writer/msl/generator_impl_call_test.cc",
"../../src/tint/writer/msl/generator_impl_case_test.cc",
"../../src/tint/writer/msl/generator_impl_cast_test.cc",
"../../src/tint/writer/msl/generator_impl_constructor_test.cc",
"../../src/tint/writer/msl/generator_impl_continue_test.cc",
"../../src/tint/writer/msl/generator_impl_discard_test.cc",
"../../src/tint/writer/msl/generator_impl_function_test.cc",
"../../src/tint/writer/msl/generator_impl_identifier_test.cc",
"../../src/tint/writer/msl/generator_impl_if_test.cc",
"../../src/tint/writer/msl/generator_impl_import_test.cc",
"../../src/tint/writer/msl/generator_impl_loop_test.cc",
"../../src/tint/writer/msl/generator_impl_member_accessor_test.cc",
"../../src/tint/writer/msl/generator_impl_module_constant_test.cc",
"../../src/tint/writer/msl/generator_impl_return_test.cc",
"../../src/tint/writer/msl/generator_impl_sanitizer_test.cc",
"../../src/tint/writer/msl/generator_impl_switch_test.cc",
"../../src/tint/writer/msl/generator_impl_test.cc",
"../../src/tint/writer/msl/generator_impl_type_test.cc",
"../../src/tint/writer/msl/generator_impl_unary_op_test.cc",
"../../src/tint/writer/msl/generator_impl_variable_decl_statement_test.cc",
"../../src/tint/writer/msl/test_helper.h",
]
deps = [
":tint_unittests_ast_src",
"${tint_root_dir}/src/tint:libtint_msl_writer_src",
]
}
tint_unittests_source_set("tint_unittests_hlsl_writer_src") {
sources = [
"../../src/tint/writer/hlsl/generator_impl_array_accessor_test.cc",
"../../src/tint/writer/hlsl/generator_impl_assign_test.cc",
"../../src/tint/writer/hlsl/generator_impl_binary_test.cc",
"../../src/tint/writer/hlsl/generator_impl_bitcast_test.cc",
"../../src/tint/writer/hlsl/generator_impl_block_test.cc",
"../../src/tint/writer/hlsl/generator_impl_break_test.cc",
"../../src/tint/writer/hlsl/generator_impl_builtin_test.cc",
"../../src/tint/writer/hlsl/generator_impl_builtin_texture_test.cc",
"../../src/tint/writer/hlsl/generator_impl_call_test.cc",
"../../src/tint/writer/hlsl/generator_impl_case_test.cc",
"../../src/tint/writer/hlsl/generator_impl_cast_test.cc",
"../../src/tint/writer/hlsl/generator_impl_constructor_test.cc",
"../../src/tint/writer/hlsl/generator_impl_continue_test.cc",
"../../src/tint/writer/hlsl/generator_impl_discard_test.cc",
"../../src/tint/writer/hlsl/generator_impl_function_test.cc",
"../../src/tint/writer/hlsl/generator_impl_identifier_test.cc",
"../../src/tint/writer/hlsl/generator_impl_if_test.cc",
"../../src/tint/writer/hlsl/generator_impl_import_test.cc",
"../../src/tint/writer/hlsl/generator_impl_loop_test.cc",
"../../src/tint/writer/hlsl/generator_impl_member_accessor_test.cc",
"../../src/tint/writer/hlsl/generator_impl_module_constant_test.cc",
"../../src/tint/writer/hlsl/generator_impl_return_test.cc",
"../../src/tint/writer/hlsl/generator_impl_sanitizer_test.cc",
"../../src/tint/writer/hlsl/generator_impl_switch_test.cc",
"../../src/tint/writer/hlsl/generator_impl_test.cc",
"../../src/tint/writer/hlsl/generator_impl_type_test.cc",
"../../src/tint/writer/hlsl/generator_impl_unary_op_test.cc",
"../../src/tint/writer/hlsl/generator_impl_variable_decl_statement_test.cc",
"../../src/tint/writer/hlsl/generator_impl_workgroup_var_test.cc",
"../../src/tint/writer/hlsl/test_helper.h",
]
deps = [
":tint_unittests_ast_src",
"${tint_root_dir}/src/tint:libtint_hlsl_writer_src",
]
}
tint_unittests_source_set("tint_unittests_glsl_writer_src") {
sources = [
"../../src/tint/writer/glsl/generator_impl_array_accessor_test.cc",
"../../src/tint/writer/glsl/generator_impl_assign_test.cc",
"../../src/tint/writer/glsl/generator_impl_binary_test.cc",
"../../src/tint/writer/glsl/generator_impl_bitcast_test.cc",
"../../src/tint/writer/glsl/generator_impl_block_test.cc",
"../../src/tint/writer/glsl/generator_impl_break_test.cc",
"../../src/tint/writer/glsl/generator_impl_builtin_test.cc",
"../../src/tint/writer/glsl/generator_impl_builtin_texture_test.cc",
"../../src/tint/writer/glsl/generator_impl_call_test.cc",
"../../src/tint/writer/glsl/generator_impl_case_test.cc",
"../../src/tint/writer/glsl/generator_impl_cast_test.cc",
"../../src/tint/writer/glsl/generator_impl_constructor_test.cc",
"../../src/tint/writer/glsl/generator_impl_continue_test.cc",
"../../src/tint/writer/glsl/generator_impl_discard_test.cc",
"../../src/tint/writer/glsl/generator_impl_function_test.cc",
"../../src/tint/writer/glsl/generator_impl_identifier_test.cc",
"../../src/tint/writer/glsl/generator_impl_if_test.cc",
"../../src/tint/writer/glsl/generator_impl_import_test.cc",
"../../src/tint/writer/glsl/generator_impl_loop_test.cc",
"../../src/tint/writer/glsl/generator_impl_member_accessor_test.cc",
"../../src/tint/writer/glsl/generator_impl_module_constant_test.cc",
"../../src/tint/writer/glsl/generator_impl_return_test.cc",
"../../src/tint/writer/glsl/generator_impl_sanitizer_test.cc",
"../../src/tint/writer/glsl/generator_impl_storage_buffer_test.cc",
"../../src/tint/writer/glsl/generator_impl_switch_test.cc",
"../../src/tint/writer/glsl/generator_impl_test.cc",
"../../src/tint/writer/glsl/generator_impl_type_test.cc",
"../../src/tint/writer/glsl/generator_impl_unary_op_test.cc",
"../../src/tint/writer/glsl/generator_impl_uniform_buffer_test.cc",
"../../src/tint/writer/glsl/generator_impl_variable_decl_statement_test.cc",
"../../src/tint/writer/glsl/generator_impl_workgroup_var_test.cc",
"../../src/tint/writer/glsl/test_helper.h",
]
deps = [
":tint_unittests_ast_src",
":tint_unittests_transform_src",
"${tint_root_dir}/src/tint:libtint_glsl_writer_src",
]
}
tint_unittests_source_set("tint_unittests_core_src") {
sources = [
"../../src/tint/castable_test.cc",
"../../src/tint/clone_context_test.cc",
"../../src/tint/debug_test.cc",
"../../src/tint/demangler_test.cc",
"../../src/tint/number_test.cc",
"../../src/tint/program_builder_test.cc",
"../../src/tint/program_test.cc",
"../../src/tint/scope_stack_test.cc",
"../../src/tint/source_test.cc",
"../../src/tint/symbol_table_test.cc",
"../../src/tint/symbol_test.cc",
"../../src/tint/traits_test.cc",
"../../src/tint/utils/block_allocator_test.cc",
]
deps = [ ":tint_unittests_ast_src" ]
}
if (build_with_chromium) {
tint_unittests_source_set("tint_unittests_fuzzer_src") {
sources = [ "../../src/tint/fuzzers/random_generator_test.cc" ]
deps = [
":tint_unittests_core_src",
"${tint_root_dir}/src/tint/fuzzers:tint_fuzzer_common_src",
]
}
}
source_set("tint_unittests_src") {
testonly = true
deps = [
":tint_unittests_ast_src",
":tint_unittests_core_src",
":tint_unittests_diagnostic_src",
":tint_unittests_inspector_src",
":tint_unittests_resolver_src",
":tint_unittests_sem_src",
":tint_unittests_text_src",
":tint_unittests_transform_src",
":tint_unittests_utils_src",
":tint_unittests_writer_src",
"${tint_root_dir}/src/tint:libtint_wgsl_reader_src",
"${tint_root_dir}/src/tint:libtint_wgsl_writer_src",
]
if (tint_build_spv_reader) {
deps += [ ":tint_unittests_spv_reader_src" ]
}
if (tint_build_spv_writer) {
deps += [ ":tint_unittests_spv_writer_src" ]
}
if (tint_build_wgsl_reader) {
deps += [ ":tint_unittests_wgsl_reader_src" ]
}
if (tint_build_wgsl_writer) {
deps += [ ":tint_unittests_wgsl_writer_src" ]
}
if (tint_build_msl_writer) {
deps += [ ":tint_unittests_msl_writer_src" ]
}
if (tint_build_hlsl_writer) {
deps += [ ":tint_unittests_hlsl_writer_src" ]
}
if (tint_build_glsl_writer) {
deps += [ ":tint_unittests_glsl_writer_src" ]
}
if (build_with_chromium) {
deps += [ ":tint_unittests_fuzzer_src" ]
}
configs += [ ":tint_unittests_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
}
test("tint_unittests") {
deps = [
":gmock_and_gtest",
":tint_unittests_src",
"${tint_spirv_tools_dir}/:spvtools",
"${tint_spirv_tools_dir}/:spvtools_opt",
"${tint_spirv_tools_dir}/:spvtools_val",
]
deps += [ ":tint_unittests_main" ]
configs += [ ":tint_unittests_config" ]
if (build_with_chromium) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
group("tint_unittests") {
testonly = true
public_deps = [ "../../src/tint:tint_unittests" ]
}