mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 07:21:04 +01:00
[wgsl-in]: Move WGSL front end integration tests into a WGSL-specific file.
This lets us reduce noise by removing a bunch of `#[cfg]` attributes. In the future, if we have tests for other front ends, we can create an `errors` subdirectory, but for now, we only have the WGSL tests, so we should keep things flat.
This commit is contained in:
1 parent
5e5d64291d
commit
f45d812266
1 file changed
+3
-5
@@ -1,4 +1,6 @@
|
||||
#[cfg(feature = "wgsl-in")]
|
||||
//! Tests for the WGSL front end.
|
||||
#![cfg(feature = "wgsl-in")]
|
||||
|
||||
fn check(input: &str, snapshot: &str) {
|
||||
let output = naga::front::wgsl::parse_str(input)
|
||||
.expect_err("expected parser error")
|
||||
@@ -15,7 +17,6 @@ fn check(input: &str, snapshot: &str) {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "wgsl-in")]
|
||||
#[test]
|
||||
fn function_without_identifier() {
|
||||
check(
|
||||
@@ -30,7 +31,6 @@ fn function_without_identifier() {
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(feature = "wgsl-in")]
|
||||
#[test]
|
||||
fn invalid_integer() {
|
||||
check(
|
||||
@@ -45,7 +45,6 @@ fn invalid_integer() {
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(feature = "wgsl-in")]
|
||||
#[test]
|
||||
fn invalid_float() {
|
||||
check(
|
||||
@@ -60,7 +59,6 @@ fn invalid_float() {
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(feature = "wgsl-in")]
|
||||
#[test]
|
||||
fn invalid_scalar_width() {
|
||||
check(
|
||||
Reference in new issue
Block a user