aboutsummaryrefslogtreecommitdiff
path: root/test/order_test.gleam
blob: 07b527cebee567244a8765772da1c73b5762b729 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import expect
import order

// TODO: https://github.com/lpil/gleam/issues/141

// pub fn reverse_test() {
//   order:reverse(Lt) |> expect:equal(_, Gt)
//   order:reverse(Eq) |> expect:equal(_, Eq)
//   order:reverse(Gt) |> expect:equal(_, Lt)
// }

// pub fn to_int_test() {
//   order:to_int(Lt) |> expect:equal(_, -1)
//   order:to_int(Eq) |> expect:equal(_, 0)
//   order:to_int(Gt) |> expect:equal(_, 1)
// }

// pub fn compare_test() {
//   order:compare(Lt, Lt) |> expect:equal(_, Eq)
//   order:compare(Lt, Eq) |> expect:equal(_, Lt)
//   order:compare(Lt, Gt) |> expect:equal(_, Lt)
//   order:compare(Eq, Lt) |> expect:equal(_, Gt)
//   order:compare(Eq, Eq) |> expect:equal(_, Eq)
//   order:compare(Eq, Gt) |> expect:equal(_, Lt)
//   order:compare(Gt, Lt) |> expect:equal(_, Gt)
//   order:compare(Gt, Eq) |> expect:equal(_, Gt)
//   order:compare(Gt, Gt) |> expect:equal(_, Eq)
// }

// pub fn max_test() {
//   order:max(Lt, Lt) |> expect:equal(_, Lt)
//   order:max(Lt, Eq) |> expect:equal(_, Eq)
//   order:max(Lt, Gt) |> expect:equal(_, Gt)
//   order:max(Eq, Lt) |> expect:equal(_, Eq)
//   order:max(Eq, Eq) |> expect:equal(_, Eq)
//   order:max(Eq, Gt) |> expect:equal(_, Gt)
//   order:max(Gt, Lt) |> expect:equal(_, Gt)
//   order:max(Gt, Eq) |> expect:equal(_, Gt)
//   order:max(Gt, Gt) |> expect:equal(_, Gt)
// }

// pub fn min_test() {
//   order:min(Lt, Lt) |> expect:equal(_, Lt)
//   order:min(Lt, Eq) |> expect:equal(_, Lt)
//   order:min(Lt, Gt) |> expect:equal(_, Lt)
//   order:min(Eq, Lt) |> expect:equal(_, Lt)
//   order:min(Eq, Eq) |> expect:equal(_, Eq)
//   order:min(Eq, Gt) |> expect:equal(_, Eq)
//   order:min(Gt, Lt) |> expect:equal(_, Lt)
//   order:min(Gt, Eq) |> expect:equal(_, Eq)
//   order:min(Gt, Gt) |> expect:equal(_, Gt)
// }