Lines Matching refs:test
25 * `cargo test` - used to run the `tests/*` folder at the top-level. This tests
29 * `cargo test -p cranelift-tools` - used if you're working on Cranelift and this
31 within the `cranelift` folder, run `cargo run test ./filetests` to run these
33 * `cargo test -p wasmtime-wasi` - this will run all WASI tests for the
46 You can test a particular Wasmtime crate with `cargo test -p
47 wasmtime-whatever`. For example, to test the `wasmtime-environ` crate, execute
51 cargo test -p wasmtime-environ
54 Alternatively, you can `cd` into the crate's directory, and run `cargo test`
59 cargo test
76 cargo test --test wast
84 cargo test --test wast Cranelift/tests/spec
89 expected result of the test. When adding new spec tests or implementing features
99 cargo test -p wasmtime-wasi
105 cargo test -p wasmtime-wasi-http
108 Note that these tests will compile programs in `crates/test-programs` to run.
112 ### Adding Rust's `#[test]`-Style Tests
114 For very "unit-y" tests, we add `test` modules in the same `.rs` file as the
115 code that is being tested. These `test` modules are configured to only get
116 compiled during testing with `#[cfg(test)]`.
121 #[cfg(test)]
125 #[test]
132 If you're writing a unit test and a `test` module doesn't already exist, you can
139 facilitates `cargo test` at the repository root running most tests.
142 tests are at `crates/wasi/tests/*.rs`. For adding a test feel free to add it
151 want to modify when adding a new Wasmtime test!
153 When you have a Wasmtime-specific test that you'd like to write in Wast and use
161 cargo test --test wast
164 If you have a new test that you think really belongs in the spec testsuite, make
165 sure it makes sense for every Wasm implementation to run your test (i.e. it
168 upstream repo, it'll make its way to the test-specific mirror at
174 When you have a WASI-specific test program that you'd like to include as a
175 test case to run against our WASI implementation, you can add it to our
176 `test-programs` crate. In particular, you should drop a main-style Rust source
177 file into `crates/test-programs/src/bin/PREFIX_some_new_test.rs`. Here the
178 `PREFIX` indicates what test suite it's going to run as. For example
184 One a test file is added you'll need to add some code to execute the tests as
185 well. For example if you added a new test
186 `crates/test-programs/src/bin/cli_my_test.rs` then you'll need to add a new
190 #[test]
196 The path to the compiled WebAssembly of your test case will be available in a