roc/compiler/test_gen
Ayaz Hafiz 5d1dd81e93
Reuse symbol when opaque type wraps a known symbol
Opaques decay immediately into their argument during codegen, so we need
to handle something that's effectively variable aliasing correctly.

This bug popped up while migrating all current private tags to opaques.
2022-04-23 14:37:52 -04:00
..
src Reuse symbol when opaque type wraps a known symbol 2022-04-23 14:37:52 -04:00
build.rs Wasm: Optional debug code in test_gen build script 2022-01-13 05:41:52 +00:00
Cargo.toml wasm: fix Cargo dependency for ARM 2022-03-02 08:02:21 +00:00
README.md add cargo aliases for convenient test running 2021-11-09 12:27:28 +01: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