Move struct validation from Validator to Resolver

* Moved Validator::ValidateConstructedType, which only validated
structs, to Resolver as ValidateStructure.
* Moved relevant tests to new files, and also updated all failing tests
to validate Source location.
* Fixed other tests that broke now that we're validating structs.

Bug: tint:642
Change-Id: Iefc08ef548f52d8c3798d814d2183c56d1236c2d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/45160
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Antonio Maiorano
2021-03-18 17:59:54 +00:00
committed by Commit Bot service account
parent e072465d83
commit 9970ec63ca
16 changed files with 497 additions and 322 deletions

View File

@@ -169,13 +169,15 @@ source_set("tint_unittests_core_src") {
"../src/intrinsic_table_test.cc",
"../src/program_builder_test.cc",
"../src/program_test.cc",
"../src/resolver/decoration_validation_test.cc",
"../src/resolver/intrinsic_test.cc",
"../src/resolver/is_storeable_test.cc",
"../src/resolver/resolver_test.cc",
"../src/resolver/resolver_test_helper.cc",
"../src/resolver/resolver_test_helper.h",
"../src/resolver/resolver_test.cc",
"../src/resolver/struct_layout_test.cc",
"../src/resolver/struct_storage_class_use_test.cc",
"../src/resolver/type_validation_test.cc",
"../src/resolver/validation_test.cc",
"../src/scope_stack_test.cc",
"../src/semantic/sem_intrinsic_test.cc",