Merge remote-tracking branch 'origin/main' into remove-nat

This commit is contained in:
Richard Feldman 2024-01-30 21:42:45 -05:00
commit aabd95404f
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
104 changed files with 1031 additions and 651 deletions

View file

@ -100,6 +100,12 @@ fn num_ceil_checked_division_success() {
)
}
#[test]
fn float_division_by_zero() {
expect_success("1f64 / 0", "∞ : F64");
expect_success("-1f64 / 0", "-∞ : F64");
}
#[test]
fn bool_in_record() {
expect_success("{ x: 1 == 1 }", "{ x: Bool.true } : { x : Bool }");
@ -807,6 +813,32 @@ fn list_get_negative_index() {
);
}
#[cfg(not(feature = "wasm"))] // TODO: mismatch is due to terminal control codes!
#[test]
fn invalid_string_interpolation() {
expect_failure(
"\"$(123)\"",
indoc!(
r#"
TYPE MISMATCH
This argument to this string interpolation has an unexpected type:
4 "$(123)"
^^^
The argument is a number of type:
Num *
But this string interpolation needs its argument to be:
Str
"#
),
);
}
#[test]
fn issue_2149_i8_ok() {
expect_success(r#"Str.toI8 "127""#, "Ok 127 : Result I8 [InvalidNumStr]");