File tree 1 file changed +8
-0
lines changed 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1
1
{-# LANGUAGE CPP #-}
2
2
{-# LANGUAGE DeriveGeneric #-}
3
+ {-# LANGUAGE OverloadedStrings #-}
3
4
4
5
module Regress (regressions ) where
5
6
@@ -9,13 +10,16 @@ import Test.HUnit ((@=?))
9
10
import GHC.Generics (Generic )
10
11
import Data.List (nub )
11
12
import Data.Fixed (Pico )
13
+ import Data.Text (Text )
12
14
13
15
#ifdef HAVE_MMAP
14
16
import qualified Regress.Mmap as Mmap
15
17
#endif
16
18
17
19
import Data.Hashable
18
20
21
+ #include "MachDeps.h"
22
+
19
23
regressions :: [F. Test ]
20
24
regressions = [] ++
21
25
#ifdef HAVE_MMAP
@@ -35,6 +39,10 @@ regressions = [] ++
35
39
let ns = take 20 $ iterate S Z
36
40
let hs = map hash ns
37
41
hs @=? nub hs
42
+ #if WORD_SIZE_IN_BITS == 64
43
+ , testCase " 64 bit Text" $ do
44
+ hash (" hello world" :: Text ) @=? 6567282331143050109
45
+ #endif
38
46
]
39
47
where
40
48
nullaryCase :: Int -> SumOfNullary -> IO ()
You can’t perform that action at this time.
0 commit comments