summaryrefslogtreecommitdiff
path: root/Thue
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2014-03-19 11:16:00 +1100
committerJed Barber <jjbarber@y7mail.com>2014-03-19 11:16:00 +1100
commit6a5acf36e6764c47da526f2980edfef42ae6f59a (patch)
tree3ca7319b6526ca8589b45395117e4d34aa6847ee /Thue
parent0ca67c7536c8ab158c6271d8d72e9786f0e0652b (diff)
More concise test case statements
Diffstat (limited to 'Thue')
-rw-r--r--Thue/Test.hs32
1 files changed, 8 insertions, 24 deletions
diff --git a/Thue/Test.hs b/Thue/Test.hs
index 2e30f6b..0273c48 100644
--- a/Thue/Test.hs
+++ b/Thue/Test.hs
@@ -16,39 +16,23 @@ instance Eq Text.Parsec.Error.ParseError
-parser0 = TestCase (assertEqual ""
- (Right (ThueProgram [ThueRule "a" "b"] "a"))
- (parseThue "a::=b\n::=\na"))
+parser0 = (Right (ThueProgram [ThueRule "a" "b"] "a")) ~=? (parseThue "a::=b\n::=\na")
-parser1 = TestCase (assertEqual ""
- (Right (ThueProgram [] "b"))
- (parseThue "::=\nb"))
+parser1 = (Right (ThueProgram [] "b")) ~=? (parseThue "::=\nb")
-extractInfix0 = TestCase (assertEqual ""
- Nothing
- (extractInfix [1,2] [3,4,5]))
+extractInfix0 = Nothing ~=? (extractInfix [1,2] [3,4,5])
-extractInfix1 = TestCase (assertEqual ""
- (Just ([1,2],[5,6]))
- (extractInfix [3,4] [1,2,3,4,5,6]))
+extractInfix1 = (Just ([1,2],[5,6])) ~=? (extractInfix [3,4] [1,2,3,4,5,6])
-extractInfix2 = TestCase (assertEqual ""
- (Just ([],[3,4]))
- (extractInfix [0,1,2] [0,1,2,3,4]))
+extractInfix2 = (Just ([],[3,4])) ~=? (extractInfix [0,1,2] [0,1,2,3,4])
-extractInfix3 = TestCase (assertEqual ""
- (Just ([1],[]))
- (extractInfix [2,3] [1,2,3]))
+extractInfix3 = (Just ([1],[])) ~=? (extractInfix [2,3] [1,2,3])
-extractInfix4 = TestCase (assertEqual ""
- (Just ([],[1]))
- (extractInfix [] [1]))
+extractInfix4 = (Just ([],[1])) ~=? (extractInfix [] [1])
-extractInfix5 = TestCase (assertEqual ""
- (Just ("before","after"))
- (extractInfix "middle" "beforemiddleafter"))
+extractInfix5 = (Just ("before","after")) ~=? (extractInfix "middle" "beforemiddleafter")