diff --git a/src/tint/BUILD.gn b/src/tint/BUILD.gn index 5a11615251..83962cbab5 100644 --- a/src/tint/BUILD.gn +++ b/src/tint/BUILD.gn @@ -1205,7 +1205,6 @@ if (tint_build_unittests) { "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", @@ -1234,6 +1233,11 @@ if (tint_build_unittests) { "ast/workgroup_attribute_test.cc", ] deps = [ ":libtint_transform_src" ] + + if (tint_build_wgsl_reader && tint_build_wgsl_writer) { + # This AST test relies on the WGSL reader and writer + sources += [ "ast/module_clone_test.cc" ] + } } tint_unittests_source_set("tint_unittests_diagnostic_src") { @@ -1432,7 +1436,11 @@ if (tint_build_unittests) { "transform/zero_init_workgroup_memory_test.cc", ] - deps = [ ":libtint_transform_src" ] + deps = [ + ":libtint_transform_src", + ":libtint_wgsl_reader_src", + ":libtint_wgsl_writer_src", + ] } tint_unittests_source_set("tint_unittests_utils_src") { @@ -1511,6 +1519,7 @@ if (tint_build_unittests) { deps = [ ":libtint_spv_reader_src", + ":libtint_wgsl_writer_src", "${tint_spirv_tools_dir}/:spvtools_opt", ] } @@ -1804,7 +1813,6 @@ if (tint_build_unittests) { ":libtint_glsl_writer_src", ":libtint_transform_src", ":tint_unittests_ast_src", - ":tint_unittests_transform_src", ] } diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt index 8e824c9aa4..f1f438094b 100644 --- a/src/tint/CMakeLists.txt +++ b/src/tint/CMakeLists.txt @@ -855,7 +855,6 @@ if(TINT_BUILD_TESTS) 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 @@ -1228,6 +1227,7 @@ if(TINT_BUILD_TESTS) if(${TINT_BUILD_WGSL_READER} AND ${TINT_BUILD_WGSL_WRITER}) list(APPEND TINT_TEST_SRCS + ast/module_clone_test.cc transform/add_empty_entry_point_test.cc transform/add_block_attribute_test.cc transform/array_length_from_uniform_test.cc diff --git a/src/tint/ast/module_clone_test.cc b/src/tint/ast/module_clone_test.cc index 09dced5cb4..57c421a7e5 100644 --- a/src/tint/ast/module_clone_test.cc +++ b/src/tint/ast/module_clone_test.cc @@ -22,7 +22,6 @@ namespace tint::ast { namespace { TEST(ModuleCloneTest, Clone) { -#if TINT_BUILD_WGSL_READER && TINT_BUILD_WGSL_WRITER // Shader that exercises the bulk of the AST nodes and types. // See also fuzzers/tint_ast_clone_fuzzer.cc for further coverage of cloning. Source::File file("test.wgsl", R"(struct S0 { @@ -170,11 +169,6 @@ const declaration_order_check_4 : i32 = 1; ASSERT_TRUE(result.success); auto dst_wgsl = result.wgsl; ASSERT_EQ(src_wgsl, dst_wgsl); - -#else // #if TINT_BUILD_WGSL_READER && TINT_BUILD_WGSL_WRITER - GTEST_SKIP() << "ModuleCloneTest requires TINT_BUILD_WGSL_READER and " - "TINT_BUILD_WGSL_WRITER to be enabled"; -#endif } } // namespace diff --git a/src/tint/fuzzers/data_builder.h b/src/tint/fuzzers/data_builder.h index 2aaecf701f..d9e8e18660 100644 --- a/src/tint/fuzzers/data_builder.h +++ b/src/tint/fuzzers/data_builder.h @@ -23,8 +23,6 @@ #include #include "src/tint/fuzzers/random_generator.h" -#include "src/tint/writer/hlsl/generator.h" -#include "src/tint/writer/msl/generator.h" namespace tint::fuzzers {