roc/crates/compiler/test_gen
shua d67d94b15c
merge wasm_str tests into gen_str
This change merges the wasm_str.rs and gen_str.rs tests.
Any tests that could be run on all three backends now are, in addition some
tests were added that just fail whenever some unimplemented things get implemented
so the implementer will be forced to start testing the new code.
2025-01-22 22:59:43 +01:00
..
benches Update test fixtures to not use Nat indices 2024-01-26 16:06:07 -05:00
src merge wasm_str tests into gen_str 2025-01-22 22:59:43 +01:00
build.rs Change a file extension .o -> .wasm to make Zig emit wasm 2023-10-23 13:50:31 -07:00
Cargo.toml replace cargo deps with workspace in lower_parms, module, mono, parse, problem, roc_target, serialize, solve, solve_problem, specialize_types, test_* 2024-11-29 11:29:04 +11:00
README.md Add language to all fenced code blocks 2022-09-09 01:12:31 -06:00

Running our CodeGen tests

Our code generation tests are all in this crate. Feature flags are used to run the tests with a specific backend. For convenience, some aliases are added in .cargo/config:

[alias]
test-gen-llvm = "test -p test_gen"
test-gen-dev = "test -p test_gen --no-default-features --features gen-dev"
test-gen-wasm = "test -p test_gen --no-default-features --features gen-wasm"

So we can run:

cargo test-gen-llvm

To run the gen tests with the LLVM backend. To filter tests, append a filter like so:

> cargo test-gen-wasm wasm_str::small
    Finished test [unoptimized + debuginfo] target(s) in 0.13s
     Running src/tests.rs (target/debug/deps/test_gen-b4ad63a9dd50f050)

running 2 tests
test wasm_str::small_str_literal ... ok
test wasm_str::small_str_zeroed_literal ... ok