From 307315a7305e76529837fd1cdb677f534d5f539b Mon Sep 17 00:00:00 2001 From: Yong He Date: Sun, 20 Oct 2024 09:28:13 -0700 Subject: Properly check switch case. (#5341) --- tests/diagnostics/constexpr-error.slang | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/diagnostics/constexpr-error.slang') diff --git a/tests/diagnostics/constexpr-error.slang b/tests/diagnostics/constexpr-error.slang index a5b98264b..0a4744b71 100644 --- a/tests/diagnostics/constexpr-error.slang +++ b/tests/diagnostics/constexpr-error.slang @@ -1,4 +1,4 @@ -//DIAGNOSTIC_TEST:SIMPLE: +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): // Failure to pass compile-time-constant data // where it is expected. @@ -24,6 +24,7 @@ float4 main() : SV_Target result += t.Sample(s, uv, int2(0,0)); // Error: data passed through cbuffer isn't compile-time constant + // CHECK: ([[# @LINE+1]]): error 40006: result += t.Sample(s, uv, offset); // Error: data computed via conditional isn't compile-time cosntant @@ -32,10 +33,12 @@ float4 main() : SV_Target { ii = 1; } + // CHECK: ([[# @LINE+1]]): error 40006: result += t.Sample(s, uv, int2(ii)); // Error: data computed in loop isn't compile-time constant // (and loop isn't unroll-able) + // CHECK: ([[# @LINE+1]]): error 40006: for(uint jj = 0; jj < uv.y; jj++) { result += t.Sample(s, uv, int2(jj)); -- cgit v1.2.3