Skip to content

Commit

Permalink
[tint][ir][val] Split up unittests into multiple files
Browse files Browse the repository at this point in the history
Breaks up the tests in validator_test.cc into different files of
conceptually connected tests, i.e. 'builtins', 'types', etc. This
helps get the size of the testing files to a couple of kLOC each
instead of previous ~11kLOC single file.

The actual implementation the common test fixture and a variety of
misc tests are left in validator_test.cc.

This CL is primarily just moving existing code around, and not
intended to be a systematic refactoring of the existing tests.

Fixes: 388064480

Change-Id: Ie33da1fc4813e23535e162a152159e94721f3a58
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/221496
Auto-Submit: Ryan Harrison <[email protected]>
Reviewed-by: dan sinclair <[email protected]>
Commit-Queue: Ryan Harrison <[email protected]>
  • Loading branch information
zoddicus authored and Dawn LUCI CQ committed Jan 9, 2025
1 parent 380f3df commit 0077a73
Show file tree
Hide file tree
Showing 13 changed files with 10,893 additions and 10,422 deletions.
8 changes: 8 additions & 0 deletions src/tint/lang/core/ir/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,15 @@ cc_library(
"traverse_test.cc",
"unreachable_test.cc",
"user_call_test.cc",
"validator_access_test.cc",
"validator_builtin_test.cc",
"validator_call_test.cc",
"validator_flow_control_test.cc",
"validator_function_test.cc",
"validator_test.cc",
"validator_test.h",
"validator_type_test.cc",
"validator_value_test.cc",
"value_test.cc",
"var_test.cc",
],
Expand Down
8 changes: 8 additions & 0 deletions src/tint/lang/core/ir/BUILD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,15 @@ tint_add_target(tint_lang_core_ir_test test
lang/core/ir/traverse_test.cc
lang/core/ir/unreachable_test.cc
lang/core/ir/user_call_test.cc
lang/core/ir/validator_access_test.cc
lang/core/ir/validator_builtin_test.cc
lang/core/ir/validator_call_test.cc
lang/core/ir/validator_flow_control_test.cc
lang/core/ir/validator_function_test.cc
lang/core/ir/validator_test.cc
lang/core/ir/validator_test.h
lang/core/ir/validator_type_test.cc
lang/core/ir/validator_value_test.cc
lang/core/ir/value_test.cc
lang/core/ir/var_test.cc
)
Expand Down
8 changes: 8 additions & 0 deletions src/tint/lang/core/ir/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,15 @@ if (tint_build_unittests) {
"traverse_test.cc",
"unreachable_test.cc",
"user_call_test.cc",
"validator_access_test.cc",
"validator_builtin_test.cc",
"validator_call_test.cc",
"validator_flow_control_test.cc",
"validator_function_test.cc",
"validator_test.cc",
"validator_test.h",
"validator_type_test.cc",
"validator_value_test.cc",
"value_test.cc",
"var_test.cc",
]
Expand Down
1 change: 0 additions & 1 deletion src/tint/lang/core/ir/validator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <algorithm>
#include <cstdint>
#include <functional>
#include <memory>
#include <string>
#include <string_view>
#include <utility>
Expand Down
Loading

0 comments on commit 0077a73

Please sign in to comment.