src/transform: Reimplement tests in WGSL

Easier to read and write, and ensures that the tests exercise valid AST instead of synthetic structures that can never exist.

Change-Id: I5d361ef96383c71943a424f5765952f21d740042
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36422
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1a7c6a4..adc89af 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -465,10 +465,6 @@
     scope_stack_test.cc
     symbol_table_test.cc
     symbol_test.cc
-    transform/emit_vertex_point_size_test.cc
-    transform/bound_array_accessors_test.cc
-    transform/first_index_offset_test.cc
-    transform/vertex_pulling_test.cc
     type_determiner_test.cc
     validator/validator_control_block_test.cc
     validator/validator_function_test.cc
@@ -656,6 +652,16 @@
     )
   endif()
 
+  if(${TINT_BUILD_WGSL_READER} AND ${TINT_BUILD_WGSL_WRITER})
+    list(APPEND TINT_TEST_SRCS
+      transform/bound_array_accessors_test.cc
+      transform/emit_vertex_point_size_test.cc
+      transform/first_index_offset_test.cc
+      transform/test_helper.h
+      transform/vertex_pulling_test.cc
+    )
+  endif()
+
   if(${TINT_BUILD_MSL_WRITER})
     list(APPEND TINT_TEST_SRCS
       writer/msl/generator_impl_alias_type_test.cc