mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-25 08:14:12 +00:00
Added a test for a fully unreachable break scenario
This commit is contained in:
parent
4f2daf3601
commit
e72c77e391
@ -86,6 +86,23 @@ pub fn main(i: Input<i32>) {
|
||||
"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cf_while_if_break_else_break() {
|
||||
val(r#"
|
||||
#[allow(unused_attributes)]
|
||||
#[spirv(fragment)]
|
||||
pub fn main(i: Input<i32>) {
|
||||
while i.load() < 10 {
|
||||
if i.load() == 0 {
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cf_if_while() {
|
||||
val(r#"
|
||||
|
Loading…
Reference in New Issue
Block a user