aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastian <s@porto5.com>2020-12-17 14:34:20 +1100
committerLouis Pilfold <louis@lpil.uk>2020-12-17 10:12:57 +0000
commit095d936bfcbf239d84e329b267aea0d6ebf15d33 (patch)
tree80be1a092edc71965165e2ce1acd230d9737c4e0 /test
parent78c90457dad39639dc384c046846d899c15f7cef (diff)
downloadgleam_stdlib-095d936bfcbf239d84e329b267aea0d6ebf15d33.tar.gz
gleam_stdlib-095d936bfcbf239d84e329b267aea0d6ebf15d33.zip
Add int.absolute_value
Diffstat (limited to 'test')
-rw-r--r--test/gleam/int_test.gleam10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/gleam/int_test.gleam b/test/gleam/int_test.gleam
index 22a35e9..11906db 100644
--- a/test/gleam/int_test.gleam
+++ b/test/gleam/int_test.gleam
@@ -2,6 +2,16 @@ import gleam/should
import gleam/int
import gleam/order
+pub fn absolute_value_test() {
+ 123
+ |> int.absolute_value
+ |> should.equal(123)
+
+ -123
+ |> int.absolute_value
+ |> should.equal(123)
+}
+
pub fn to_string_test() {
123
|> int.to_string