mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
add tests
This commit is contained in:
parent
fed470b316
commit
5f72983c82
1 changed files with 7 additions and 0 deletions
|
@ -1760,6 +1760,13 @@ fn list_sum() {
|
|||
assert_evals_to!("List.sum [ 1.1, 2.2, 3.3 ]", 6.6, f64);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_product() {
|
||||
assert_evals_to!("List.product []", 1, i64);
|
||||
assert_evals_to!("List.product [ 1, 2, 3 ]", 6, i64);
|
||||
assert_evals_to!("List.product [ 1.1, 2.2, 3.3 ]", 1.1 * 2.2 * 3.3, f64);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_keep_oks() {
|
||||
assert_evals_to!("List.keepOks [] (\\x -> x)", 0, i64);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue