diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/bool_test.gleam | 23 | ||||
-rw-r--r-- | test/gleam/function_test.gleam | 85 | ||||
-rw-r--r-- | test/gleam/list_test.gleam | 21 | ||||
-rw-r--r-- | test/gleam/result_test.gleam | 14 |
4 files changed, 0 insertions, 143 deletions
diff --git a/test/gleam/bool_test.gleam b/test/gleam/bool_test.gleam index 03a3584..bd91eca 100644 --- a/test/gleam/bool_test.gleam +++ b/test/gleam/bool_test.gleam @@ -1,5 +1,4 @@ import gleam/bool -import gleam/order import gleam/should pub fn and_test() { @@ -98,28 +97,6 @@ pub fn exclusive_nor_test() { |> should.be_true } -pub fn compare_test() { - bool.compare(True, True) - |> should.equal(order.Eq) - - bool.compare(True, False) - |> should.equal(order.Gt) - - bool.compare(False, False) - |> should.equal(order.Eq) - - bool.compare(False, True) - |> should.equal(order.Lt) -} - -pub fn to_int_test() { - bool.to_int(True) - |> should.equal(1) - - bool.to_int(False) - |> should.equal(0) -} - pub fn to_string_test() { bool.to_string(True) |> should.equal("True") diff --git a/test/gleam/function_test.gleam b/test/gleam/function_test.gleam index 62c74bf..ecc5363 100644 --- a/test/gleam/function_test.gleam +++ b/test/gleam/function_test.gleam @@ -3,46 +3,6 @@ import gleam/int import gleam/should import gleam/string -pub fn curry2_test() { - let fun = fn(a, b) { a + b } - let curried = function.curry2(fun) - - curried(1)(2) - |> should.equal(3) -} - -pub fn curry3_test() { - let fun = fn(a, b, c) { a + b + c } - let curried = function.curry3(fun) - - curried(1)(2)(4) - |> should.equal(7) -} - -pub fn curry4_test() { - let fun = fn(a, b, c, d) { a + b + c + d } - let curried = function.curry4(fun) - - curried(1)(2)(4)(8) - |> should.equal(15) -} - -pub fn curry5_test() { - let fun = fn(a, b, c, d, e) { a + b + c + d + e } - let curried = function.curry5(fun) - - curried(1)(2)(4)(8)(16) - |> should.equal(31) -} - -pub fn curry6_test() { - let fun = fn(a, b, c, d, e, f) { a + b + c + d + e + f } - let curried = function.curry6(fun) - - curried(1)(2)(4)(8)(16)(32) - |> should.equal(63) -} - pub fn flip_test() { let fun = fn(s: String, i: Int) { s @@ -87,48 +47,3 @@ pub fn tap_test() { }) |> should.equal("Thanks Joe & Louis") } - -pub fn apply1_test() { - let fun = fn(x1) { x1 } - - fun - |> function.apply1(1) - |> should.equal(1) -} - -pub fn apply2_test() { - let fun = fn(x1, x2) { x1 + x2 } - - fun - |> function.apply2(1, 2) - |> should.equal(3) -} - -pub fn apply3_test() { - let fun = fn(x1, x2, x3) { x1 + x2 + x3 } - - fun - |> function.apply3(1, 2, 3) - |> should.equal(6) -} - -pub fn apply3_maintains_arguments_orders_test() { - let first = "first" - let second = "second" - let third = "third" - let fun = fn(x1, x2, x3) { - should.equal(x1, first) - should.equal(x2, second) - should.equal(x3, third) - } - - function.apply3(fun, first, second, third) -} - -pub fn apply3_supports_arguments_of_different_types() { - let fun = fn(x1, _x2, _x3) { x1 } - - fun - |> function.apply3(1, 0.5, "3") - |> should.equal(1) -} diff --git a/test/gleam/list_test.gleam b/test/gleam/list_test.gleam index e981a9d..14d02d7 100644 --- a/test/gleam/list_test.gleam +++ b/test/gleam/list_test.gleam @@ -322,27 +322,6 @@ pub fn append_test() { |> list.append([1]) } -pub fn concat_test() { - list.concat([]) - |> should.equal([]) - - list.concat([[]]) - |> should.equal([]) - - list.concat([[], [], []]) - |> should.equal([]) - - list.concat([[1, 2], [], [3, 4]]) - |> should.equal([1, 2, 3, 4]) - // // TCO test - // case recursion_test_cycles > 2 { - // True -> - // list.repeat([[1]], recursion_test_cycles / 50) - // |> list.concat() - // False -> [] - // } -} - pub fn flatten_test() { list.flatten([]) |> should.equal([]) diff --git a/test/gleam/result_test.gleam b/test/gleam/result_test.gleam index 8e4c831..4816fb6 100644 --- a/test/gleam/result_test.gleam +++ b/test/gleam/result_test.gleam @@ -136,20 +136,6 @@ pub fn lazy_unwrap_test() { |> should.equal(50) } -pub fn nil_error_test() { - Error("error_string") - |> result.nil_error - |> should.equal(Error(Nil)) - - Error(123) - |> result.nil_error - |> should.equal(Error(Nil)) - - Ok(1) - |> result.nil_error - |> should.equal(Ok(1)) -} - pub fn or_test() { Ok(1) |> result.or(Ok(2)) |