mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
many extra gen_primitives tests for gen-dev
This commit is contained in:
parent
0e43510103
commit
515d60a138
7 changed files with 263 additions and 118 deletions
|
@ -12,19 +12,19 @@ use indoc::indoc;
|
|||
use roc_std::{RocBox, RocList, RocStr};
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn basic_int() {
|
||||
assert_evals_to!("123", 123, i64);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn basic_float() {
|
||||
assert_evals_to!("1234.0", 1234.0, f64);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn branch_first_float() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -40,7 +40,7 @@ fn branch_first_float() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn branch_second_float() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -56,7 +56,7 @@ fn branch_second_float() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn branch_third_float() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -73,7 +73,7 @@ fn branch_third_float() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn branch_first_int() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -89,7 +89,7 @@ fn branch_first_int() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn branch_second_int() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -122,7 +122,7 @@ fn branch_third_int() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn branch_store_variable() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -138,7 +138,7 @@ fn branch_store_variable() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn when_one_element_tag() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -156,7 +156,7 @@ fn when_one_element_tag() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn when_two_element_tag_first() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -175,7 +175,7 @@ fn when_two_element_tag_first() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn when_two_element_tag_second() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -194,7 +194,7 @@ fn when_two_element_tag_second() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn gen_when_one_branch() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -209,7 +209,7 @@ fn gen_when_one_branch() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn gen_large_when_int() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -232,7 +232,7 @@ fn gen_large_when_int() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn gen_large_when_float() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -255,7 +255,7 @@ fn gen_large_when_float() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn or_pattern() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -271,7 +271,7 @@ fn or_pattern() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn apply_identity() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -287,7 +287,7 @@ fn apply_identity() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn apply_unnamed_identity() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2144,7 +2144,7 @@ fn rosetree_basic() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn case_jump() {
|
||||
// the decision tree will generate a jump to the `1` branch here
|
||||
assert_evals_to!(
|
||||
|
@ -2171,7 +2171,7 @@ fn case_jump() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn nullable_eval_cfold() {
|
||||
// the decision tree will generate a jump to the `1` branch here
|
||||
assert_evals_to!(
|
||||
|
@ -2208,7 +2208,7 @@ fn nullable_eval_cfold() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn nested_switch() {
|
||||
// exposed bug with passing the right symbol/layout down into switch branch generation
|
||||
// This is also the only test_gen test that exercises Reset/Reuse (as of Aug 2022)
|
||||
|
@ -2252,7 +2252,7 @@ fn nested_switch() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn count_deriv_x() {
|
||||
// exposed bug with basing the block_of_memory on a specific (smaller) tag layout
|
||||
assert_evals_to!(
|
||||
|
@ -2279,7 +2279,7 @@ fn count_deriv_x() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn deriv_pow() {
|
||||
// exposed bug with ordering of variable declarations before switch
|
||||
assert_evals_to!(
|
||||
|
@ -2316,7 +2316,7 @@ fn deriv_pow() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn multiple_increment() {
|
||||
// the `leaf` value will be incremented multiple times at once
|
||||
assert_evals_to!(
|
||||
|
@ -2350,7 +2350,7 @@ fn multiple_increment() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn switch_fuse_rc_non_exhaustive() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2380,7 +2380,7 @@ fn switch_fuse_rc_non_exhaustive() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn switch_fuse_rc_exhaustive() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2409,7 +2409,7 @@ fn switch_fuse_rc_exhaustive() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn build_then_apply_closure() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2429,7 +2429,7 @@ fn build_then_apply_closure() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn expanded_result() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2460,7 +2460,7 @@ fn expanded_result() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn backpassing_result() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2530,7 +2530,7 @@ fn call_invalid_layout() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn increment_or_double_closure() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2568,7 +2568,7 @@ fn increment_or_double_closure() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn module_thunk_is_function() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2585,7 +2585,7 @@ fn module_thunk_is_function() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn pass_through_unresolved_type_variable() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2608,7 +2608,7 @@ fn pass_through_unresolved_type_variable() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn pattern_match_empty_record() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2628,7 +2628,7 @@ fn pattern_match_empty_record() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn pattern_match_unit_tag() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2653,7 +2653,7 @@ fn pattern_match_unit_tag() {
|
|||
// see for why this is disabled on wasm32 https://github.com/roc-lang/roc/issues/1687
|
||||
#[cfg(not(feature = "gen-llvm-wasm"))]
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn mirror_llvm_alignment_padding() {
|
||||
// see https://github.com/roc-lang/roc/issues/1569
|
||||
assert_evals_to!(
|
||||
|
@ -2676,7 +2676,7 @@ fn mirror_llvm_alignment_padding() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn lambda_set_bool() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2701,7 +2701,7 @@ fn lambda_set_bool() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn lambda_set_byte() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2727,7 +2727,7 @@ fn lambda_set_byte() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn lambda_set_struct_byte() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2755,7 +2755,7 @@ fn lambda_set_struct_byte() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn lambda_set_enum_byte_byte() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -2786,7 +2786,7 @@ fn lambda_set_enum_byte_byte() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn list_walk_until() {
|
||||
// see https://github.com/roc-lang/roc/issues/1576
|
||||
assert_evals_to!(
|
||||
|
@ -2812,7 +2812,7 @@ fn list_walk_until() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn int_literal_not_specialized_with_annotation() {
|
||||
// see https://github.com/roc-lang/roc/issues/1600
|
||||
assert_evals_to!(
|
||||
|
@ -2840,7 +2840,7 @@ fn int_literal_not_specialized_with_annotation() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn int_literal_not_specialized_no_annotation() {
|
||||
// see https://github.com/roc-lang/roc/issues/1600
|
||||
assert_evals_to!(
|
||||
|
@ -2867,7 +2867,7 @@ fn int_literal_not_specialized_no_annotation() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn unresolved_tvar_when_capture_is_unused() {
|
||||
// see https://github.com/roc-lang/roc/issues/1585
|
||||
assert_evals_to!(
|
||||
|
@ -2913,7 +2913,7 @@ fn value_not_exposed_hits_panic() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn mix_function_and_closure() {
|
||||
// see https://github.com/roc-lang/roc/pull/1706
|
||||
assert_evals_to!(
|
||||
|
@ -2939,7 +2939,7 @@ fn mix_function_and_closure() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn mix_function_and_closure_level_of_indirection() {
|
||||
// see https://github.com/roc-lang/roc/pull/1706
|
||||
assert_evals_to!(
|
||||
|
@ -2964,7 +2964,7 @@ fn mix_function_and_closure_level_of_indirection() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
#[cfg_attr(debug_assertions, ignore)] // this test stack-overflows the compiler in debug mode
|
||||
fn do_pass_bool_byte_closure_layout() {
|
||||
// see https://github.com/roc-lang/roc/pull/1706
|
||||
|
@ -3041,7 +3041,7 @@ fn do_pass_bool_byte_closure_layout() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn nested_rigid_list() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3118,7 +3118,7 @@ fn nested_rigid_tag_union() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn call_that_needs_closure_parameter() {
|
||||
// here both p2 is lifted to the top-level, which means that `list` must be
|
||||
// passed to it from `manyAux`.
|
||||
|
@ -3146,7 +3146,7 @@ fn call_that_needs_closure_parameter() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn alias_defined_out_of_order() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3167,7 +3167,7 @@ fn alias_defined_out_of_order() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn recursively_build_effect() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3214,7 +3214,7 @@ fn recursively_build_effect() {
|
|||
|
||||
#[test]
|
||||
#[ignore = "TODO; currently generates bad code because `a` isn't specialized inside the closure."]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn polymophic_expression_captured_inside_closure() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3238,7 +3238,7 @@ fn polymophic_expression_captured_inside_closure() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn issue_2322() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3271,7 +3271,7 @@ fn box_and_unbox_small_string() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn box_and_unbox_big_string() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3366,7 +3366,7 @@ fn box_and_unbox_f32() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn box_and_unbox_record() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3380,7 +3380,7 @@ fn box_and_unbox_record() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn box_and_unbox_tag_union() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3397,7 +3397,7 @@ fn box_and_unbox_tag_union() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn closure_called_in_its_defining_scope() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3422,7 +3422,7 @@ fn closure_called_in_its_defining_scope() {
|
|||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn issue_2894() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3449,7 +3449,7 @@ fn issue_2894() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn polymorphic_def_used_in_closure() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3470,7 +3470,7 @@ fn polymorphic_def_used_in_closure() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn polymorphic_lambda_set_usage() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3488,7 +3488,7 @@ fn polymorphic_lambda_set_usage() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn polymorphic_lambda_set_multiple_specializations() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3529,7 +3529,7 @@ fn list_map2_conslist() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn mutual_recursion_top_level_defs() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3557,7 +3557,7 @@ fn mutual_recursion_top_level_defs() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn polymorphic_lambda_captures_polymorphic_value() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3704,7 +3704,7 @@ fn lambda_capture_niches_have_captured_function_in_closure() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn recursive_call_capturing_function() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3723,7 +3723,7 @@ fn recursive_call_capturing_function() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn shared_pattern_variable_in_when_branches() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3797,7 +3797,7 @@ fn runtime_error_when_degenerate_pattern_reached() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn recursive_lambda_set_issue_3444() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3818,7 +3818,7 @@ fn recursive_lambda_set_issue_3444() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn recursive_lambda_set_toplevel_issue_3444() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3842,7 +3842,7 @@ fn recursive_lambda_set_toplevel_issue_3444() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn recursive_lambda_set_issue_3444_inferred() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3887,7 +3887,7 @@ fn compose_recursive_lambda_set_productive_toplevel() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn compose_recursive_lambda_set_productive_nested() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3909,7 +3909,7 @@ fn compose_recursive_lambda_set_productive_nested() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn compose_recursive_lambda_set_productive_inferred() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3958,7 +3958,7 @@ fn compose_recursive_lambda_set_productive_nullable_wrapped() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn local_binding_aliases_function() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -3981,7 +3981,7 @@ fn local_binding_aliases_function() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn local_binding_aliases_function_inferred() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4002,7 +4002,7 @@ fn local_binding_aliases_function_inferred() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn transient_captures() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4022,7 +4022,7 @@ fn transient_captures() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn transient_captures_after_def_ordering() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4042,7 +4042,7 @@ fn transient_captures_after_def_ordering() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn deep_transient_capture_chain() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4064,7 +4064,7 @@ fn deep_transient_capture_chain() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn deep_transient_capture_chain_with_multiple_captures() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4089,7 +4089,7 @@ fn deep_transient_capture_chain_with_multiple_captures() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn transient_captures_from_outer_scope() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4111,7 +4111,7 @@ fn transient_captures_from_outer_scope() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn mutually_recursive_captures() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4137,7 +4137,7 @@ fn mutually_recursive_captures() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn int_let_generalization() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4158,7 +4158,7 @@ fn int_let_generalization() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn pattern_match_char() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4176,7 +4176,7 @@ fn pattern_match_char() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn issue_4348() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4194,7 +4194,7 @@ fn issue_4348() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn issue_4349() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4254,7 +4254,7 @@ fn issue_4712() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn pattern_as_toplevel() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4275,7 +4275,7 @@ fn pattern_as_toplevel() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn pattern_as_nested() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4296,7 +4296,7 @@ fn pattern_as_nested() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn pattern_as_of_symbol() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4314,7 +4314,7 @@ fn pattern_as_of_symbol() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn function_specialization_information_in_lambda_set_thunk() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4336,7 +4336,7 @@ fn function_specialization_information_in_lambda_set_thunk() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn function_specialization_information_in_lambda_set_thunk_independent_defs() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4360,7 +4360,7 @@ fn function_specialization_information_in_lambda_set_thunk_independent_defs() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn when_guard_appears_multiple_times_in_compiled_decision_tree_issue_5176() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4383,7 +4383,7 @@ fn when_guard_appears_multiple_times_in_compiled_decision_tree_issue_5176() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn recursive_lambda_set_resolved_only_upon_specialization() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -4406,7 +4406,7 @@ fn recursive_lambda_set_resolved_only_upon_specialization() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn layout_cache_structure_with_multiple_recursive_structures() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
|
|
@ -1042,8 +1042,8 @@ fn newtype_wrapper() {
|
|||
"#
|
||||
),
|
||||
42,
|
||||
Box<i64>,
|
||||
|x: Box<i64>| {
|
||||
roc_std::RocBox<i64>,
|
||||
|x: roc_std::RocBox<i64>| {
|
||||
let value = *x;
|
||||
std::mem::forget(x);
|
||||
value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue