roc/crates/compiler/test_gen
Ayaz a9243720da
Merge pull request #3496 from rtfeldman/derive-w-mono
Monomorphize and compile derived implementations
2022-07-14 07:45:21 -05:00
..
benches add wasm test mode that influences test wrapper codegen 2022-07-10 14:05:17 +02:00
src Merge pull request #3496 from rtfeldman/derive-w-mono 2022-07-14 07:45:21 -05:00
.gitignore moved all crates into seperate folder + related path fixes 2022-07-01 17:37:43 +02:00
build.rs test_gen: place test host .wasm file in Cargo build directory 2022-07-11 20:47:24 +01:00
Cargo.toml rename wasm-cli-run -> gen-llvm-wasm 2022-07-10 14:08:35 +02:00
README.md moved all crates into seperate folder + related path fixes 2022-07-01 17:37:43 +02: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