make an executable that runs all the tests in preparation for making possibly-breaking changes
Ignore-this: 9fcdf4cbef8c48ab63cf8852f7c34609 darcs-hash:20121128033250-76d51-fec2cd876579663f85d3b23a9bcf2dc6a469ce94
This commit is contained in:
parent
93da077efb
commit
789bc64b4c
18
tests/Main.hs
Normal file
18
tests/Main.hs
Normal file
@ -0,0 +1,18 @@
|
||||
import Control.Monad
|
||||
import Test.HUnit
|
||||
import Test.Tests
|
||||
|
||||
hunitTests =
|
||||
[ ("utf8Tests", utf8Tests)
|
||||
, ("utf16Tests", utf16Tests)
|
||||
, ("punycodeTests", punycodeTests)
|
||||
, ("isoTests", isoTests)
|
||||
, ("jisTests", jisTests)
|
||||
, ("gb18030Tests", gb18030Tests)
|
||||
]
|
||||
|
||||
main = do
|
||||
identityTests
|
||||
forM_ hunitTests $ \(name, test) -> do
|
||||
putStrLn $ "running " ++ name
|
||||
runTestTT test >>= print
|
||||
@ -53,9 +53,6 @@ charGen = let
|
||||
threeByte = choose (0x010000,0x10FFFF) >>= return.chr
|
||||
in frequency [(40,ascii),(30,oneByte),(20,twoByte),(10,threeByte)]
|
||||
|
||||
instance Arbitrary Word8 where
|
||||
arbitrary = choose (0x00,0xFF::Int) >>= return.fromIntegral
|
||||
|
||||
quickCheckEncoding :: Encoding enc => enc -> IO ()
|
||||
quickCheckEncoding e = do
|
||||
quickCheck (encodingIdentity e)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user