roc/crates/compiler/test_gen
Ayaz Hafiz 3a960e7809
Properly recast nested recursion pointers to their expanded layouts as needed
When we load a structure with a nested recursive pointer, the pointer
may be loaded opaquely. We need to refine it to the concrete type wanted
by the layout.

This conversion can be removed after we upgrade to LLVM 15.

Closes #5162
2023-03-22 08:21:08 -05:00
..
benches make the mmapped buffer configurable 2022-07-26 23:36:25 +02:00
src Properly recast nested recursion pointers to their expanded layouts as needed 2023-03-22 08:21:08 -05:00
.gitignore moved all crates into seperate folder + related path fixes 2022-07-01 17:37:43 +02:00
build.rs Split utils into error and command utils 2023-03-10 09:39:43 -08:00
Cargo.toml Split utils into error and command utils 2023-03-10 09:39:43 -08: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