mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
checkpoint
This commit is contained in:
parent
3c8dbce72e
commit
5e4f43e1d8
12 changed files with 296 additions and 109 deletions
|
@ -425,9 +425,19 @@ fn list_contains() {
|
|||
|
||||
#[cfg(not(feature = "wasm"))]
|
||||
#[test]
|
||||
fn list_sum() {
|
||||
fn list_sum_empty() {
|
||||
expect_success("List.sum []", "0 : Num a");
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "wasm"))]
|
||||
#[test]
|
||||
fn list_sum_num() {
|
||||
expect_success("List.sum [1, 2, 3]", "6 : Num *");
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "wasm"))]
|
||||
#[test]
|
||||
fn list_sum_frac() {
|
||||
expect_success("List.sum [1.1, 2.2, 3.3]", "6.6 : Frac *");
|
||||
}
|
||||
|
||||
|
@ -677,16 +687,28 @@ fn type_problem() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn issue_2149() {
|
||||
fn issue_2149_i8_ok() {
|
||||
expect_success(r#"Str.toI8 "127""#, "Ok 127 : Result I8 [InvalidNumStr]");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_2149_i8_err() {
|
||||
expect_success(
|
||||
r#"Str.toI8 "128""#,
|
||||
"Err InvalidNumStr : Result I8 [InvalidNumStr]",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_2149_i16_ok() {
|
||||
expect_success(
|
||||
r#"Str.toI16 "32767""#,
|
||||
"Ok 32767 : Result I16 [InvalidNumStr]",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_2149_i16_err() {
|
||||
expect_success(
|
||||
r#"Str.toI16 "32768""#,
|
||||
"Err InvalidNumStr : Result I16 [InvalidNumStr]",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue