[wgsl-in] Test validation of arrays with zero and negative lengths.

This commit is contained in:
Jim Blandy 2021-06-16 14:42:20 -07:00 committed by Dzmitry Malyshau
parent 9713dbbbc1
commit 93db57c12b

View File

@ -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]