From 5f72983c82c44d369a40909b11807d2d56a387fb Mon Sep 17 00:00:00 2001 From: Folkert Date: Sat, 27 Mar 2021 21:28:56 +0100 Subject: [PATCH] add tests --- compiler/test_gen/src/gen_list.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler/test_gen/src/gen_list.rs b/compiler/test_gen/src/gen_list.rs index 2ed0c4fbe4..5c256299ba 100644 --- a/compiler/test_gen/src/gen_list.rs +++ b/compiler/test_gen/src/gen_list.rs @@ -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);