mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
test_gen: comments about wasm panics
This commit is contained in:
parent
5f64f32a4a
commit
57179eb458
1 changed files with 5 additions and 2 deletions
|
@ -330,9 +330,12 @@ macro_rules! assert_evals_to {
|
|||
$crate::helpers::wasm::assert_evals_to!($src, $expected, $ty, $transform, false);
|
||||
};
|
||||
|
||||
($src:expr, $expected:expr, $ty:ty, $transform:expr, $ignore_problems: expr) => {{
|
||||
// LLVM tests call the last arg $ignore_problems rather than $expect_panic
|
||||
// Either way, it's only `true` for tests that use `should_panic`.
|
||||
// In Wasm, `should_panic` only works if we spawn a child process.
|
||||
($src:expr, $expected:expr, $ty:ty, $transform:expr, $expect_panic: expr) => {{
|
||||
let phantom = std::marker::PhantomData;
|
||||
let _ = $ignore_problems; // Ignore `ignore_problems`! It is used for LLVM tests.
|
||||
let _ = $expect_panic; // TODO
|
||||
match $crate::helpers::wasm::assert_evals_to_help::<$ty>($src, phantom) {
|
||||
Err(msg) => panic!("{}", msg),
|
||||
Ok(actual) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue