aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGiacomo Cavalieri <giacomo.cavalieri@icloud.com>2023-05-09 12:37:56 +0200
committerLouis Pilfold <louis@lpil.uk>2023-05-10 18:52:46 +0100
commit431b519d9803105414417e03c0bea55deffac857 (patch)
tree9def912bd8e3456105cf8eecd150b9b290dca578 /test
parentd20282d999be8db6a5cc43be540b0eeb6dda8d15 (diff)
downloadgleam_stdlib-431b519d9803105414417e03c0bea55deffac857.tar.gz
gleam_stdlib-431b519d9803105414417e03c0bea55deffac857.zip
Do not reverse the result of `result.partition`
Diffstat (limited to 'test')
-rw-r--r--test/gleam/result_test.gleam6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/gleam/result_test.gleam b/test/gleam/result_test.gleam
index 951ef2a..8b4b829 100644
--- a/test/gleam/result_test.gleam
+++ b/test/gleam/result_test.gleam
@@ -203,15 +203,15 @@ pub fn partition_test() {
[Ok(1), Ok(2), Ok(3)]
|> result.partition
- |> should.equal(#([1, 2, 3], []))
+ |> should.equal(#([3, 2, 1], []))
[Error("a"), Error("b"), Error("c")]
|> result.partition
- |> should.equal(#([], ["a", "b", "c"]))
+ |> should.equal(#([], ["c", "b", "a"]))
[Ok(1), Error("a"), Ok(2), Error("b"), Error("c")]
|> result.partition
- |> should.equal(#([1, 2], ["a", "b", "c"]))
+ |> should.equal(#([2, 1], ["c", "b", "a"]))
// TCO test
list.repeat(Ok(1), 1_000_000)