Return panic tag from roc_panic to test platform

This commit is contained in:
Ayaz Hafiz 2022-11-22 16:54:23 -06:00
parent 9201cf0b32
commit a8122662c2
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
5 changed files with 80 additions and 36 deletions

View file

@ -8,7 +8,7 @@ use crate::helpers::wasm::expect_runtime_error_panic;
#[test]
#[cfg(any(feature = "gen-llvm"))]
#[should_panic = r#"Roc failed with message: "hello crash""#]
#[should_panic = r#"User crash with message: "hello crash""#]
fn crash_literal() {
expect_runtime_error_panic!(indoc!(
r#"
@ -21,7 +21,7 @@ fn crash_literal() {
#[test]
#[cfg(any(feature = "gen-llvm"))]
#[should_panic = r#"Roc failed with message: "hello crash""#]
#[should_panic = r#"User crash with message: "hello crash""#]
fn crash_variable() {
expect_runtime_error_panic!(indoc!(
r#"
@ -36,7 +36,7 @@ fn crash_variable() {
#[test]
#[cfg(any(feature = "gen-llvm"))]
#[should_panic = r#"Roc failed with message: "turns out this was fallible""#]
#[should_panic = r#"User crash with message: "turns out this was fallible""#]
fn crash_in_call() {
expect_runtime_error_panic!(indoc!(
r#"
@ -56,7 +56,7 @@ fn crash_in_call() {
#[test]
#[cfg(any(feature = "gen-llvm"))]
#[should_panic = r#"Roc failed with message: "no new even primes""#]
#[should_panic = r#"User crash with message: "no new even primes""#]
fn crash_in_passed_closure() {
expect_runtime_error_panic!(indoc!(
r#"