Skip to content

Commit

Permalink
fix(diagnostic): expect success on duplicate validation if severities…
Browse files Browse the repository at this point in the history
… are the same
  • Loading branch information
ErichDonGubler committed Nov 14, 2024
1 parent 11ac59b commit 8333c56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/webgpu/shader/validation/parse/diagnostic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ g.test('conflicting_directive')

g.test('duplicate_attribute_same_location')
.specURL('https://gpuweb.github.io/gpuweb/wgsl/#diagnostics')
.desc(`Tests duplicate diagnostics at the same location must be on different rules`)
.desc(
`Tests duplicate diagnostics at the same location must be on different rules unless the severity is the same`
)
.params(u =>
u
.combine('loc', keysOf(kValidLocations))
Expand All @@ -181,7 +183,7 @@ g.test('duplicate_attribute_same_location')
const d1 = generateDiagnostic('attribute', t.params.s1, rule1);
const d2 = generateDiagnostic('attribute', t.params.s2, t.params.same_rule ? rule1 : rule2);
const code = `${kValidLocations[t.params.loc](`${d1} ${d2}`)}`;
t.expectCompileResult(!t.params.same_rule, code);
t.expectCompileResult(!t.params.same_rule || t.params.s1 === t.params.s2, code);
});

g.test('conflicting_attribute_different_location')
Expand Down

0 comments on commit 8333c56

Please sign in to comment.