mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Merge remote-tracking branch 'origin/main' into remove-nat
This commit is contained in:
commit
aabd95404f
104 changed files with 1031 additions and 651 deletions
|
@ -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]");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue