aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/gleam/bool_test.gleam170
-rw-r--r--test/gleam/order_test.gleam156
2 files changed, 161 insertions, 165 deletions
diff --git a/test/gleam/bool_test.gleam b/test/gleam/bool_test.gleam
index 9658377..3edea25 100644
--- a/test/gleam/bool_test.gleam
+++ b/test/gleam/bool_test.gleam
@@ -1,119 +1,117 @@
-if erlang {
- import gleam/bool
- import gleam/order
- import gleam/should
+import gleam/bool
+import gleam/order
+import gleam/should
- pub fn negate_test() {
- bool.negate(True)
- |> should.be_false
+pub fn negate_test() {
+ bool.negate(True)
+ |> should.be_false
- bool.negate(False)
- |> should.be_true
- }
+ bool.negate(False)
+ |> should.be_true
+}
- pub fn nor_test() {
- bool.nor(False, False)
- |> should.be_true
+pub fn nor_test() {
+ bool.nor(False, False)
+ |> should.be_true
- bool.nor(False, True)
- |> should.be_false
+ bool.nor(False, True)
+ |> should.be_false
- bool.nor(True, False)
- |> should.be_false
+ bool.nor(True, False)
+ |> should.be_false
- bool.nor(True, True)
- |> should.be_false
- }
+ bool.nor(True, True)
+ |> should.be_false
+}
- pub fn nand_test() {
- bool.nand(False, False)
- |> should.be_true
+pub fn nand_test() {
+ bool.nand(False, False)
+ |> should.be_true
- bool.nand(False, True)
- |> should.be_true
+ bool.nand(False, True)
+ |> should.be_true
- bool.nand(True, False)
- |> should.be_true
+ bool.nand(True, False)
+ |> should.be_true
- bool.nand(True, True)
- |> should.be_false
- }
+ bool.nand(True, True)
+ |> should.be_false
+}
- pub fn exclusive_or_test() {
- bool.exclusive_or(True, True)
- |> should.be_false
+pub fn exclusive_or_test() {
+ bool.exclusive_or(True, True)
+ |> should.be_false
- bool.exclusive_or(False, False)
- |> should.be_false
+ bool.exclusive_or(False, False)
+ |> should.be_false
- bool.exclusive_or(True, False)
- |> should.be_true
+ bool.exclusive_or(True, False)
+ |> should.be_true
- bool.exclusive_or(False, True)
- |> should.be_true
- }
+ bool.exclusive_or(False, True)
+ |> should.be_true
+}
- pub fn exclusive_nor_test() {
- bool.exclusive_nor(False, False)
- |> should.be_true
+pub fn exclusive_nor_test() {
+ bool.exclusive_nor(False, False)
+ |> should.be_true
- bool.exclusive_nor(False, True)
- |> should.be_false
+ bool.exclusive_nor(False, True)
+ |> should.be_false
- bool.exclusive_nor(True, False)
- |> should.be_false
+ bool.exclusive_nor(True, False)
+ |> should.be_false
- bool.exclusive_nor(True, True)
- |> should.be_true
- }
+ bool.exclusive_nor(True, True)
+ |> should.be_true
+}
- pub fn compare_test() {
- bool.compare(True, True)
- |> should.equal(order.Eq)
+pub fn compare_test() {
+ bool.compare(True, True)
+ |> should.equal(order.Eq)
- bool.compare(True, False)
- |> should.equal(order.Gt)
+ bool.compare(True, False)
+ |> should.equal(order.Gt)
- bool.compare(False, False)
- |> should.equal(order.Eq)
+ bool.compare(False, False)
+ |> should.equal(order.Eq)
- bool.compare(False, True)
- |> should.equal(order.Lt)
- }
+ bool.compare(False, True)
+ |> should.equal(order.Lt)
+}
- pub fn max_test() {
- bool.max(True, True)
- |> should.equal(True)
+pub fn max_test() {
+ bool.max(True, True)
+ |> should.equal(True)
- bool.max(True, False)
- |> should.equal(True)
+ bool.max(True, False)
+ |> should.equal(True)
- bool.max(False, False)
- |> should.equal(False)
+ bool.max(False, False)
+ |> should.equal(False)
- bool.max(False, True)
- |> should.equal(True)
- }
+ bool.max(False, True)
+ |> should.equal(True)
+}
- pub fn min_test() {
- bool.min(True, True)
- |> should.equal(True)
+pub fn min_test() {
+ bool.min(True, True)
+ |> should.equal(True)
- bool.min(True, False)
- |> should.equal(False)
+ bool.min(True, False)
+ |> should.equal(False)
- bool.min(False, False)
- |> should.equal(False)
+ bool.min(False, False)
+ |> should.equal(False)
- bool.min(False, True)
- |> should.equal(False)
- }
+ bool.min(False, True)
+ |> should.equal(False)
+}
- pub fn to_int_test() {
- bool.to_int(True)
- |> should.equal(1)
+pub fn to_int_test() {
+ bool.to_int(True)
+ |> should.equal(1)
- bool.to_int(False)
- |> should.equal(0)
- }
+ bool.to_int(False)
+ |> should.equal(0)
}
diff --git a/test/gleam/order_test.gleam b/test/gleam/order_test.gleam
index 95cd6e8..2517f9c 100644
--- a/test/gleam/order_test.gleam
+++ b/test/gleam/order_test.gleam
@@ -1,113 +1,111 @@
-if erlang {
- import gleam/should
- import gleam/order.{Eq, Gt, Lt}
+import gleam/should
+import gleam/order.{Eq, Gt, Lt}
- pub fn reverse_test() {
- order.reverse(Lt)
- |> should.equal(Gt)
+pub fn reverse_test() {
+ order.reverse(Lt)
+ |> should.equal(Gt)
- order.reverse(Eq)
- |> should.equal(Eq)
+ order.reverse(Eq)
+ |> should.equal(Eq)
- order.reverse(Gt)
- |> should.equal(Lt)
- }
+ order.reverse(Gt)
+ |> should.equal(Lt)
+}
- pub fn to_int_test() {
- order.to_int(Lt)
- |> should.equal(-1)
+pub fn to_int_test() {
+ order.to_int(Lt)
+ |> should.equal(-1)
- order.to_int(Eq)
- |> should.equal(0)
+ order.to_int(Eq)
+ |> should.equal(0)
- order.to_int(Gt)
- |> should.equal(1)
- }
+ order.to_int(Gt)
+ |> should.equal(1)
+}
- pub fn compare_test() {
- order.compare(Lt, Lt)
- |> should.equal(Eq)
+pub fn compare_test() {
+ order.compare(Lt, Lt)
+ |> should.equal(Eq)
- order.compare(Lt, Eq)
- |> should.equal(Lt)
+ order.compare(Lt, Eq)
+ |> should.equal(Lt)
- order.compare(Lt, Gt)
- |> should.equal(Lt)
+ order.compare(Lt, Gt)
+ |> should.equal(Lt)
- order.compare(Eq, Lt)
- |> should.equal(Gt)
+ order.compare(Eq, Lt)
+ |> should.equal(Gt)
- order.compare(Eq, Eq)
- |> should.equal(Eq)
+ order.compare(Eq, Eq)
+ |> should.equal(Eq)
- order.compare(Eq, Gt)
- |> should.equal(Lt)
+ order.compare(Eq, Gt)
+ |> should.equal(Lt)
- order.compare(Gt, Lt)
- |> should.equal(Gt)
+ order.compare(Gt, Lt)
+ |> should.equal(Gt)
- order.compare(Gt, Eq)
- |> should.equal(Gt)
+ order.compare(Gt, Eq)
+ |> should.equal(Gt)
- order.compare(Gt, Gt)
- |> should.equal(Eq)
- }
+ order.compare(Gt, Gt)
+ |> should.equal(Eq)
+}
- pub fn max_test() {
- order.max(Lt, Lt)
- |> should.equal(Lt)
+pub fn max_test() {
+ order.max(Lt, Lt)
+ |> should.equal(Lt)
- order.max(Lt, Eq)
- |> should.equal(Eq)
+ order.max(Lt, Eq)
+ |> should.equal(Eq)
- order.max(Lt, Gt)
- |> should.equal(Gt)
+ order.max(Lt, Gt)
+ |> should.equal(Gt)
- order.max(Eq, Lt)
- |> should.equal(Eq)
+ order.max(Eq, Lt)
+ |> should.equal(Eq)
- order.max(Eq, Eq)
- |> should.equal(Eq)
+ order.max(Eq, Eq)
+ |> should.equal(Eq)
- order.max(Eq, Gt)
- |> should.equal(Gt)
+ order.max(Eq, Gt)
+ |> should.equal(Gt)
- order.max(Gt, Lt)
- |> should.equal(Gt)
+ order.max(Gt, Lt)
+ |> should.equal(Gt)
- order.max(Gt, Eq)
- |> should.equal(Gt)
+ order.max(Gt, Eq)
+ |> should.equal(Gt)
- order.max(Gt, Gt)
- |> should.equal(Gt)
- }
+ order.max(Gt, Gt)
+ |> should.equal(Gt)
+}
- pub fn min_test() {
- order.min(Lt, Lt)
- |> should.equal(Lt)
+pub fn min_test() {
+ order.min(Lt, Lt)
+ |> should.equal(Lt)
- order.min(Lt, Eq)
- |> should.equal(Lt)
+ order.min(Lt, Eq)
+ |> should.equal(Lt)
- order.min(Lt, Gt)
- |> should.equal(Lt)
+ order.min(Lt, Gt)
+ |> should.equal(Lt)
- order.min(Eq, Lt)
- |> should.equal(Lt)
+ order.min(Eq, Lt)
+ |> should.equal(Lt)
- order.min(Eq, Eq)
- |> should.equal(Eq)
+ order.min(Eq, Eq)
+ |> should.equal(Eq)
- order.min(Eq, Gt)
- |> should.equal(Eq)
+ order.min(Eq, Gt)
+ |> should.equal(Eq)
- order.min(Gt, Lt)
- |> should.equal(Lt)
+ order.min(Gt, Lt)
+ |> should.equal(Lt)
- order.min(Gt, Eq)
- |> should.equal(Eq)
+ order.min(Gt, Eq)
+ |> should.equal(Eq)
- order.min(Gt, Gt)
- |> should.equal(Gt)
- }
+ order.min(Gt, Gt)
+ |> should.equal(Gt)
}