mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[wgsl-in] Test validation of arrays with zero and negative lengths.
This commit is contained in:
committed by
Dzmitry Malyshau
parent
9713dbbbc1
commit
93db57c12b
@@ -606,6 +606,15 @@ fn invalid_arrays() {
|
||||
..
|
||||
})
|
||||
}
|
||||
|
||||
check_validation_error! {
|
||||
"type Bad = array<f32, 0>;",
|
||||
"type Bad = array<f32, -1>;":
|
||||
Err(naga::valid::ValidationError::Type {
|
||||
error: naga::valid::TypeError::NonPositiveArrayLength(_),
|
||||
..
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user