From 431b519d9803105414417e03c0bea55deffac857 Mon Sep 17 00:00:00 2001 From: Giacomo Cavalieri Date: Tue, 9 May 2023 12:37:56 +0200 Subject: Do not reverse the result of `result.partition` --- test/gleam/result_test.gleam | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') 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) -- cgit v1.2.3