Add WGSL parsing tests

This commit is contained in:
Dzmitry Malyshau authored and Dzmitry Malyshau committed 2020-03-15 11:43:08 -04:00
1 parent a768af6011
commit 1957b09c4d
1 file changed
+15
+15
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");
}