[tint][resolver] Add validation test for @color and @location
On the same fragment input variable.
Bug: tint:2085
Change-Id: I722f6fedfec2eeb428f19ca5cbb7d3ee0e9ff7a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/160085
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/tint/lang/wgsl/resolver/attribute_validation_test.cc b/src/tint/lang/wgsl/resolver/attribute_validation_test.cc
index 7d59187..92151d0 100644
--- a/src/tint/lang/wgsl/resolver/attribute_validation_test.cc
+++ b/src/tint/lang/wgsl/resolver/attribute_validation_test.cc
@@ -764,6 +764,11 @@
Pass,
},
TestParams{
+ {AttributeKind::kColor, AttributeKind::kLocation},
+ R"(3:4 error: multiple entry point IO attributes
+1:2 note: previously consumed @color)",
+ },
+ TestParams{
{AttributeKind::kDiagnostic},
R"(1:2 error: @diagnostic is not valid for function parameters)",
},