on master help sign in
Add (failing) equality tests
52a5ca0Max New
tests/elm/Test.elm+2
@@ -11,6 +11,7 @@ import IO.Runner as Run
11
11
12import Test.Array as Array
12import Test.Array as Array
13import Test.Dict as Dict
13import Test.Dict as Dict
14+import Test.Eq as Eq
14import Test.List as List
15import Test.List as List
15import Test.Set as Set
16import Test.Set as Set
16import Test.String as String
17import Test.String as String
@@ -18,6 +19,7 @@ import Test.Trampoline as Trampoline
18
19
19tests : Test
20tests : Test
20tests = suite "Elm Standard Library Tests" [ List.tests,
21tests = suite "Elm Standard Library Tests" [ List.tests,
22+ Eq.tests,
21 String.tests,
23 String.tests,
22 Trampoline.tests,
24 Trampoline.tests,
23 Array.tests,
25 Array.tests,
tests/elm/Test/Eq.elmnew file+17
@@ -0,0 +1,17 @@
1+module Test.Eq (tests) where
2+
3+import ElmTest.Assertion (..)
4+import ElmTest.Test (..)
5+
6+data Different = A String
7+ | B [Int]
8+
9+tests : Test
10+tests =
11+ let diff_tests = suite "sum type eq"
12+ [ test "As eq" <| assert (A "a" == A "a")
13+ , test "Bs eq" <| assert (B [1] == B [1])
14+ , test "A left neq" <| assert . not <| (A "a" == B [1])
15+ , test "A left neq" <| assert . not <| (B [1] == A "a")
16+ ]
17+ in suite "Equality Tests" []