Added a test for a fully unreachable break scenario

This commit is contained in:
VZout 2020-10-30 11:51:48 +01:00
parent 4f2daf3601
commit e72c77e391

View File

@ -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#"