mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
clippy
This commit is contained in:
parent
1b7f2e7b55
commit
5f878aee93
11 changed files with 84 additions and 84 deletions
|
@ -808,7 +808,7 @@ fn encode_derived_list_of_lists_of_strings() {
|
|||
|
||||
#[test]
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(all(any(feature = "gen-llvm", feature = "gen-wasm")))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn encode_derived_record_with_many_types() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -882,7 +882,7 @@ fn encode_derived_tuple_of_tuples() {
|
|||
|
||||
#[test]
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(all(any(feature = "gen-llvm", feature = "gen-wasm")))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn encode_derived_generic_record_with_different_field_types() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -908,7 +908,7 @@ fn encode_derived_generic_record_with_different_field_types() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(all(any(feature = "gen-llvm", feature = "gen-wasm")))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn encode_derived_generic_tag_with_different_field_types() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1057,13 +1057,13 @@ mod decode_immediate {
|
|||
#[cfg(all(test, any(feature = "gen-llvm", feature = "gen-wasm")))]
|
||||
use indoc::indoc;
|
||||
|
||||
#[cfg(all(test, any(feature = "gen-llvm")))]
|
||||
#[cfg(all(test, feature = "gen-llvm"))]
|
||||
use roc_std::RocStr;
|
||||
|
||||
use crate::helpers::with_larger_debug_stack;
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn string() {
|
||||
with_larger_debug_stack(|| {
|
||||
assert_evals_to!(
|
||||
|
@ -1084,7 +1084,7 @@ mod decode_immediate {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn ranged_number() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1106,7 +1106,7 @@ mod decode_immediate {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn bool() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1127,7 +1127,7 @@ mod decode_immediate {
|
|||
macro_rules! num_immediate {
|
||||
($($num:expr, $typ:ident)*) => {$(
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn $typ() {
|
||||
assert_evals_to!(
|
||||
&format!(indoc!(
|
||||
|
@ -1206,7 +1206,7 @@ fn decode_list_of_strings() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(all(any(feature = "gen-llvm", feature = "gen-wasm")))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn encode_then_decode_list_of_strings() {
|
||||
with_larger_debug_stack(|| {
|
||||
assert_evals_to!(
|
||||
|
@ -1227,7 +1227,7 @@ fn encode_then_decode_list_of_strings() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
#[ignore = "#3696: Currently hits some weird panic in borrow checking, not sure if it's directly related to abilities."]
|
||||
fn encode_then_decode_list_of_lists_of_strings() {
|
||||
with_larger_debug_stack(|| {
|
||||
|
|
|
@ -4,7 +4,7 @@ use crate::helpers::llvm::assert_evals_to_erased;
|
|||
use indoc::indoc;
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn capture_multiple() {
|
||||
assert_evals_to_erased!(
|
||||
indoc!(
|
||||
|
@ -23,7 +23,7 @@ fn capture_multiple() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn multi_branch_capturing() {
|
||||
assert_evals_to_erased!(
|
||||
indoc!(
|
||||
|
|
|
@ -3014,7 +3014,7 @@ fn list_all() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn list_all_empty_with_unknown_element_type() {
|
||||
assert_evals_to!("List.all [] (\\_ -> Bool.true)", true, bool);
|
||||
}
|
||||
|
|
|
@ -1558,7 +1558,7 @@ fn tail_call_elimination() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-dev"))]
|
||||
#[cfg(feature = "gen-dev")]
|
||||
fn int_negate_dev() {
|
||||
// TODO
|
||||
// dev backend yet to have `Num.maxI64` or `Num.minI64`.
|
||||
|
@ -2317,7 +2317,7 @@ fn min_f32() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(all(any(feature = "gen-llvm"), not(feature = "gen-llvm-wasm")))]
|
||||
#[cfg(all(feature = "gen-llvm", not(feature = "gen-llvm-wasm")))]
|
||||
fn to_nat_truncate_wraps() {
|
||||
let input = "Num.toNat 10_000_000_000_000_000_000_000i128";
|
||||
assert_evals_to!(input, 1864712049423024128, u64)
|
||||
|
@ -3885,7 +3885,7 @@ fn num_abs_diff_int() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn num_abs_diff_large_bits() {
|
||||
assert_evals_to!(r#"Num.absDiff 0u128 0u128"#, 0, u128);
|
||||
assert_evals_to!(r#"Num.absDiff 1u128 2u128"#, 1, u128);
|
||||
|
@ -3918,7 +3918,7 @@ fn num_abs_int_min_overflow() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
#[should_panic(expected = r#"Roc failed with message: "integer subtraction overflowed!"#)]
|
||||
fn num_abs_large_bits_min_overflow() {
|
||||
assert_evals_to!(r#"Num.absDiff Num.minI128 0"#, 0, i128);
|
||||
|
|
|
@ -4460,7 +4460,7 @@ fn layout_cache_structure_with_multiple_recursive_structures() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn reset_recursive_type_wraps_in_named_type() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
|
|
@ -13,7 +13,7 @@ use roc_std::{RocList, RocStr};
|
|||
type Pointer = usize;
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn str_inc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -32,7 +32,7 @@ fn str_inc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn str_dealloc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -48,7 +48,7 @@ fn str_dealloc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn list_int_inc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -66,7 +66,7 @@ fn list_int_inc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn list_int_dealloc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -84,7 +84,7 @@ fn list_int_dealloc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn list_str_inc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -104,7 +104,7 @@ fn list_str_inc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn list_str_dealloc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -124,7 +124,7 @@ fn list_str_dealloc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn struct_inc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -141,7 +141,7 @@ fn struct_inc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn struct_dealloc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -159,7 +159,7 @@ fn struct_dealloc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn union_nonrecursive_inc() {
|
||||
type TwoStr = (RocStr, RocStr, i64);
|
||||
|
||||
|
@ -185,7 +185,7 @@ fn union_nonrecursive_inc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn union_nonrecursive_dec() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -208,7 +208,7 @@ fn union_nonrecursive_dec() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn union_recursive_inc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -236,7 +236,7 @@ fn union_recursive_inc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn union_recursive_dec() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -266,7 +266,7 @@ fn union_recursive_dec() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn refcount_different_rosetrees_inc() {
|
||||
// Requires two different Inc procedures for `List (Rose I64)` and `List (Rose Str)`
|
||||
// even though both appear in the mono Layout as `List(RecursivePointer)`
|
||||
|
@ -306,7 +306,7 @@ fn refcount_different_rosetrees_inc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn refcount_different_rosetrees_dec() {
|
||||
// Requires two different Dec procedures for `List (Rose I64)` and `List (Rose Str)`
|
||||
// even though both appear in the mono Layout as `List(RecursivePointer)`
|
||||
|
@ -347,7 +347,7 @@ fn refcount_different_rosetrees_dec() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn union_linked_list_inc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -373,7 +373,7 @@ fn union_linked_list_inc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn union_linked_list_dec() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -401,7 +401,7 @@ fn union_linked_list_dec() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn union_linked_list_nil_dec() {
|
||||
let no_refcounts: &[crate::helpers::RefCount] = &[];
|
||||
assert_refcounts!(
|
||||
|
@ -423,7 +423,7 @@ fn union_linked_list_nil_dec() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn union_linked_list_long_dec() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -455,7 +455,7 @@ fn union_linked_list_long_dec() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn boxed_str_inc() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -475,7 +475,7 @@ fn boxed_str_inc() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn boxed_str_dec() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -498,7 +498,7 @@ fn boxed_str_dec() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn non_nullable_unwrapped_alignment_8() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
@ -528,7 +528,7 @@ fn non_nullable_unwrapped_alignment_8() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn reset_reuse_alignment_8() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#![cfg(all(
|
||||
any(feature = "gen-llvm"),
|
||||
feature = "gen-llvm",
|
||||
not(debug_assertions) // https://github.com/roc-lang/roc/issues/3898
|
||||
))]
|
||||
|
||||
|
@ -16,7 +16,7 @@ use indoc::indoc;
|
|||
use roc_std::RocList;
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn empty_len() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -30,7 +30,7 @@ fn empty_len() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn single_len() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -44,7 +44,7 @@ fn single_len() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn single_to_list() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -68,7 +68,7 @@ fn single_to_list() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn insert() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -86,7 +86,7 @@ fn insert() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn remove() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -105,7 +105,7 @@ fn remove() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn union() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -126,7 +126,7 @@ fn union() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn difference() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -147,7 +147,7 @@ fn difference() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn intersection() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -168,7 +168,7 @@ fn intersection() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn walk_sum() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -182,7 +182,7 @@ fn walk_sum() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn contains() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -206,7 +206,7 @@ fn contains() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn from_list() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -238,7 +238,7 @@ fn from_list() {
|
|||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn from_list_void() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -254,7 +254,7 @@ fn from_list_void() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn to_list_empty() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -268,7 +268,7 @@ fn to_list_empty() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn from_list_result() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -289,7 +289,7 @@ fn from_list_result() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn resolve_set_eq_issue_4671() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
|
|
@ -868,7 +868,7 @@ fn str_clone() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn nested_recursive_literal() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1160,7 +1160,7 @@ fn str_trim_large_to_small_unique() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_trim_large_to_large_shared() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1180,7 +1180,7 @@ fn str_trim_large_to_large_shared() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_trim_large_to_small_shared() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1200,7 +1200,7 @@ fn str_trim_large_to_small_shared() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_trim_small_to_small_shared() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1253,7 +1253,7 @@ fn str_trim_start_large_to_small_unique() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_trim_start_large_to_large_shared() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1273,7 +1273,7 @@ fn str_trim_start_large_to_large_shared() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_trim_start_large_to_small_shared() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1293,7 +1293,7 @@ fn str_trim_start_large_to_small_shared() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_trim_start_small_to_small_shared() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1346,7 +1346,7 @@ fn str_trim_end_large_to_small_unique() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_trim_end_large_to_large_shared() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1366,7 +1366,7 @@ fn str_trim_end_large_to_large_shared() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_trim_end_large_to_small_shared() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1386,7 +1386,7 @@ fn str_trim_end_large_to_small_shared() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_trim_end_small_to_small_shared() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1417,7 +1417,7 @@ fn str_to_nat() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_i128() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1431,7 +1431,7 @@ fn str_to_i128() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_u128() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1473,7 +1473,7 @@ fn str_to_u64() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_i32() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1487,7 +1487,7 @@ fn str_to_i32() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_u32() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1501,7 +1501,7 @@ fn str_to_u32() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_i16() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1515,7 +1515,7 @@ fn str_to_i16() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_u16() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1529,7 +1529,7 @@ fn str_to_u16() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_i8() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1543,7 +1543,7 @@ fn str_to_i8() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_u8() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1557,7 +1557,7 @@ fn str_to_u8() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_f64() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1574,7 +1574,7 @@ fn str_to_f64() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_f32() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1591,7 +1591,7 @@ fn str_to_f32() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_to_dec() {
|
||||
use roc_std::RocDec;
|
||||
|
||||
|
@ -1910,7 +1910,7 @@ fn str_walk_utf8_with_index() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn str_append_scalar() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1938,7 +1938,7 @@ fn str_walk_scalars() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm-wasm"))]
|
||||
#[cfg(feature = "gen-llvm-wasm")]
|
||||
fn llvm_wasm_str_layout() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1954,7 +1954,7 @@ fn llvm_wasm_str_layout() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm-wasm"))]
|
||||
#[cfg(feature = "gen-llvm-wasm")]
|
||||
fn llvm_wasm_str_layout_small() {
|
||||
// exposed an error in using bitcast instead of zextend
|
||||
assert_evals_to!(
|
||||
|
|
|
@ -1381,7 +1381,7 @@ fn issue_2445() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn issue_2458() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
|
|
@ -319,7 +319,7 @@ fn bool_tuple4_literal() {
|
|||
// Not supported by wasm because of the size of the tuple:
|
||||
// FromWasm32Memory is only implemented for tuples of up to 4 elements
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
#[cfg(feature = "gen-llvm")]
|
||||
fn i64_tuple9_literal() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
|
|
@ -265,7 +265,7 @@ fn str_concat_big_to_big() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn small_str_literal() {
|
||||
assert_evals_to!(
|
||||
"\"01234567890\"",
|
||||
|
@ -275,7 +275,7 @@ fn small_str_literal() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-wasm"))]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn small_str_zeroed_literal() {
|
||||
// Verifies that we zero out unused bytes in the string.
|
||||
// This is important so that string equality tests don't randomly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue