diff options
author | lrosa007 <lrosa008@gmail.com> | 2020-11-04 15:50:55 -0500 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2020-11-04 21:03:21 +0000 |
commit | f68070478362a883a38c5d1637e3dd2da6c80d5a (patch) | |
tree | 7b1742693f198910c7bb9bca7de4a11f9b77bf3c /test | |
parent | be647cae5e1bbda65d933fd5728e21a0fa7a4285 (diff) | |
download | gleam_stdlib-f68070478362a883a38c5d1637e3dd2da6c80d5a.tar.gz gleam_stdlib-f68070478362a883a38c5d1637e3dd2da6c80d5a.zip |
feat(float): add sum function
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/float_test.gleam | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/gleam/float_test.gleam b/test/gleam/float_test.gleam index be1f22d..2ebaefc 100644 --- a/test/gleam/float_test.gleam +++ b/test/gleam/float_test.gleam @@ -242,3 +242,11 @@ pub fn negate_test() { float.negate(0.) |> should.equal(0.) } + +pub fn sum_test() { + float.sum([]) + |> should.equal(0.0) + + float.sum([1.0, 2.2, 3.3]) + |> should.equal(6.5) +} |