mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Add test for last falltrough switch case
This commit is contained in:
committed by
João Capucho
parent
0458f0a404
commit
d1cfdd15a0
@@ -988,3 +988,24 @@ fn select() {
|
||||
if name.starts_with("select_")
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn last_case_falltrough() {
|
||||
check_validation_error! {
|
||||
"
|
||||
fn test_falltrough() {
|
||||
switch(0) {
|
||||
case 0: {
|
||||
fallthrough;
|
||||
}
|
||||
}
|
||||
}
|
||||
":
|
||||
Err(
|
||||
naga::valid::ValidationError::Function {
|
||||
error: naga::valid::FunctionError::LastCaseFallTrough,
|
||||
..
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user