Skip to content

Commit

Permalink
revive wesl-test with crate datatest, fix some of the eval tests
Browse files Browse the repository at this point in the history
  • Loading branch information
k2d222 committed Feb 14, 2025
1 parent dc288ff commit 12bbb1e
Show file tree
Hide file tree
Showing 19 changed files with 721 additions and 572 deletions.
73 changes: 73 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion crates/wesl-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ license.workspace = true
serde = { version = "1.0.210", features = ["derive"] }
serde_json = "1.0.128"
wgsl-parse = { workspace = true }
wesl = { workspace = true }
wesl = { workspace = true, features = ["eval"] }
datatest = "0.8.0"
regex = "1.11.1"
2 changes: 2 additions & 0 deletions crates/wesl-test/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "nightly"
2 changes: 1 addition & 1 deletion crates/wesl-test/spec-tests/lit-type-inference.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"name": "overflow-check-u32-from-i32",
"desc": "Tests overflow from unsigned integer conversion to signed integer.",
"kind": "eval",
"code": "@const fn test() -> i32 u32 { let u32_large : u32 = 2147483649; let i32_large : i32 = u32_large; return i32_large; }",
"code": "@const fn test() -> i32 { let u32_large : u32 = 2147483649; let i32_large : i32 = u32_large; return i32_large; }",
"eval": "test()",
"expect": "fail",
"stage": "const"
Expand Down
Loading

0 comments on commit 12bbb1e

Please sign in to comment.