mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-23 23:34:29 +00:00
Add WGSL parsing tests
This commit is contained in:
parent
a768af6011
commit
1957b09c4d
15
tests/convert.rs
Normal file
15
tests/convert.rs
Normal 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");
|
||||
}
|
Loading…
Reference in New Issue
Block a user