Adjust tests to the changed String show instance
commit848d5b9b818291cab4a328aea9be5524f05c166f
authorMelvar Chen <Melvar.Chen@googlemail.com>
dateMon 11 Nov 2013, 17:09 (13 years ago)
parent0913bd1
test/reg005/reg005.idr+1−1
@@ -30,7 +30,7 @@ compress xs with (rle xs)
3030 compress Nil | REnd = ""
3131 compress (rep (S n) x ++ xs) | RChar _ _ rs
3232 = let ni : Integer = cast (S n) in
33− show ni ++ show x ++ compress xs
33+ show ni ++ strCons x (compress xs)
3434
3535compressString : String -> String
3636compressString xs = compress (fromList (unpack xs))
test/reg024/reg024.idr+1−1
@@ -28,4 +28,4 @@ test : String
2828test = printf "The %s is %d" "answer" 42
2929
3030main : IO ()
31−main = print test
31+main = putStrLn test
test/reg025/reg025.idr+2−2
@@ -70,6 +70,6 @@ emptyCell (MkBoard rs) =
7070main : IO ()
7171main =
7272 case emptyCell (emptyBoard {n=0}) of
73− Left _ => print "l"
74− Right _ => print "r"
73+ Left _ => putStrLn "l"
74+ Right _ => putStrLn "r"
7575
test/test003/expected+3−3
@@ -1,7 +1,7 @@
11./test003a.lidr:1:0:Program line next to comment
2−a
3−d
2+'a'
3+'d'
44zabcdefg
55gfedcba
6−[g, f, e, d, c, b, a]
6+['g', 'f', 'e', 'd', 'c', 'b', 'a']
77abcdefg
test/test005/expected+2−2
@@ -1,6 +1,6 @@
118
221
3−(abc, 123)
4−(abc, 123)
3+("abc", "123")
4+("abc", "123")
55([1, 2], [3, 4, 5])
66([1, 2], [3, 4, 5])
test/test008/test008.idr+1−1
@@ -18,7 +18,7 @@ ioVals = do { return ("First", "second") }
1818
1919main : IO ()
2020main = do (a, b) <- ioVals
21− putStr (show a ++ " and " ++ show b ++ "? ")
21+ putStr (a ++ " and " ++ b ++ "? ")
2222 let x = "bar"
2323 putStrLn (show (getVal x 7 testlist))
2424 let ((y, z) :: _) = testlist
test/test011/expected+3−3
@@ -1,5 +1,5 @@
1−foo
2−Fred
1+"foo"
2+"Fred"
33[1, 2, 3]
4−[b, a]
4+["b", "a"]
5525
test/test020/expected+1−1
@@ -11,4 +11,4 @@ Specifically:
1111 List a
1212
1313[3, 2, 1]
14−Number 42
14+"Number 42"
test/test021/expected+1−3
@@ -1,6 +1,4 @@
1−[HELLO!!!
2−, WORLD!!!
3−, ]
1+["HELLO!!!\n", "WORLD!!!\n", ""]
423
5315
64Answer: 99
test/test028/test028.idr+1−1
@@ -2,4 +2,4 @@
22module Main
33--
44main : IO ()
5−main = print "hello, world!"
5+main = putStrLn "hello, world!"
test/test034/expected+1−1
@@ -1,5 +1,5 @@
11prim__floatToStr 0.0
2−0.0
2+"0.0"
33prim__strToFloat "0.0"
440.0
55prim__addFloat 1.0 1.0