ASCII test cases

darcs-hash:20080119233058-a4fee-e903ea97491b95c8278d925553b50589a906a7cd
This commit is contained in:
Henning Guenther 2008-01-19 15:30:58 -08:00
parent 71c645029b
commit 8b29980edb

View File

@ -1,10 +1,21 @@
module Test.Tests where
import Data.Encoding
import Data.Encoding.ASCII
import Data.Encoding.UTF8
import Test.Tester
import Test.HUnit
asciiTests :: Test
asciiTests = TestList $ map test $
[EncodingTest ASCII
"Hello, world!"
[0x48,0x65,0x6C,0x6C,0x6F,0x2C,0x20,0x77,0x6F,0x72,0x6C,0x64,0x21]
,EncodingError ASCII
"\x0041\x2262\x0391\x002E"
(HasNoRepresentation '\x2262')
]
utf8Tests :: Test
utf8Tests = TestList $ map test $
-- Simple encoding tests