From 4edcf5f1ced745dba93bd36d0b298d0178724b4b Mon Sep 17 00:00:00 2001 From: SirLynix Date: Sun, 28 Jul 2024 11:48:58 +0200 Subject: [PATCH] Fix unit tests following previous change --- tests/src/Tests/BranchTests.cpp | 10 ++++++++-- tests/src/Tests/ConstTests.cpp | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/src/Tests/BranchTests.cpp b/tests/src/Tests/BranchTests.cpp index 3a9e62d..999f56b 100644 --- a/tests/src/Tests/BranchTests.cpp +++ b/tests/src/Tests/BranchTests.cpp @@ -305,7 +305,10 @@ fn main() -> Output ExpectGLSL(*shaderModule, R"( void main() { - discard; + { + discard; + } + Output output_; output_.color = vec4(1.0, 1.0, 1.0, 1.0); @@ -318,7 +321,10 @@ void main() [entry(frag)] fn main() -> Output { - discard; + { + discard; + } + let output: Output; output.color = vec4[f32](1.0, 1.0, 1.0, 1.0); return output; diff --git a/tests/src/Tests/ConstTests.cpp b/tests/src/Tests/ConstTests.cpp index 8d23cf8..6f1f165 100644 --- a/tests/src/Tests/ConstTests.cpp +++ b/tests/src/Tests/ConstTests.cpp @@ -118,7 +118,10 @@ external fn main() { let value: f32; - value = f32(data.value); + { + value = f32(data.value); + } + } )"); } @@ -144,7 +147,10 @@ external fn main() { let value: f32; - value = data.value; + { + value = data.value; + } + } )"); }