diff options
author | Louis Pilfold <louis@lpil.uk> | 2019-08-14 23:22:54 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2019-08-14 23:22:54 +0100 |
commit | ddba860d353d86c3daa8c3bf7054e9f73c43eac4 (patch) | |
tree | 54346ef18ca6f6f5aba295abfa720f2e2af0f0e9 /gen/test | |
parent | f79ba9b6e4e22188197f87b44794c9771bb40410 (diff) | |
download | gleam_stdlib-ddba860d353d86c3daa8c3bf7054e9f73c43eac4.tar.gz gleam_stdlib-ddba860d353d86c3daa8c3bf7054e9f73c43eac4.zip |
list:sort requires comparison function
Diffstat (limited to 'gen/test')
-rw-r--r-- | gen/test/gleam@list_test.erl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gen/test/gleam@list_test.erl b/gen/test/gleam@list_test.erl index 942bee8..1037884 100644 --- a/gen/test/gleam@list_test.erl +++ b/gen/test/gleam@list_test.erl @@ -179,12 +179,11 @@ unique_test() -> gleam@expect:equal(gleam@list:unique([]), []). sort_test() -> - gleam@expect:equal(gleam@list:sort([4, 3, 6, 5, 4]), [3, 4, 4, 5, 6]), - gleam@expect:equal(gleam@list:sort([]), []), gleam@expect:equal( - gleam@list:sort([{1, 2}, {4, 5}, {3, 2}]), - [{1, 2}, {3, 2}, {4, 5}] - ). + gleam@list:sort([4, 3, 6, 5, 4], fun gleam@int:compare/2), + [3, 4, 4, 5, 6] + ), + gleam@expect:equal(gleam@list:sort([], fun gleam@int:compare/2), []). index_map_test() -> gleam@expect:equal( |