From 1957b09c4dcd3f04766b57e0afec7425a4aee411 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sun, 15 Mar 2020 11:39:45 -0400 Subject: [PATCH] Add WGSL parsing tests --- tests/convert.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/convert.rs diff --git a/tests/convert.rs b/tests/convert.rs new file mode 100644 index 000000000..6e18ae764 --- /dev/null +++ b/tests/convert.rs @@ -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"); +}