Add WGSL parsing tests

This commit is contained in:
Dzmitry Malyshau 2020-03-15 11:39:45 -04:00 committed by Dzmitry Malyshau
parent a768af6011
commit 1957b09c4d

15
tests/convert.rs Normal file
View File

@ -0,0 +1,15 @@
fn convert_wgsl(name: &str) {
let path = format!("{}/test-data/{}.wgsl", env!("CARGO_MANIFEST_DIR"), name);
let input = std::fs::read_to_string(path).unwrap();
let _module = naga::front::wgsl::parse_str(&input).unwrap();
}
#[test]
fn convert_quad() {
convert_wgsl("quad");
}
#[test]
fn convert_boids() {
convert_wgsl("boids");
}