1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
{-# LANGUAGE ConstraintKinds #-}
module Tests.Vector.Unboxed (tests) where
import Test.Tasty
import qualified Data.Vector.Unboxed
import Tests.Vector.Property
testGeneralUnboxedVector
:: forall a. (CommonContext a Data.Vector.Unboxed.Vector, Data.Vector.Unboxed.Unbox a, Ord a, Data a)
=> Data.Vector.Unboxed.Vector a -> [TestTree]
testGeneralUnboxedVector dummy = concatMap ($ dummy)
[
testSanity
, testPolymorphicFunctions
, testOrdFunctions
, testTuplyFunctions
, testMonoidFunctions
, testDataFunctions
]
testUnitUnboxedVector dummy = concatMap ($ dummy)
[
testGeneralUnboxedVector
]
testBoolUnboxedVector dummy = concatMap ($ dummy)
[
testGeneralUnboxedVector
, testBoolFunctions
]
testNumericUnboxedVector
:: forall a. ( CommonContext a Data.Vector.Unboxed.Vector
, Data.Vector.Unboxed.Unbox a, Ord a, Num a, Enum a, Random a, Data a)
=> Data.Vector.Unboxed.Vector a -> [TestTree]
testNumericUnboxedVector dummy = concatMap ($ dummy)
[
testGeneralUnboxedVector
, testNumFunctions
, testEnumFunctions
]
testTupleUnboxedVector
:: forall a. ( CommonContext a Data.Vector.Unboxed.Vector
, Data.Vector.Unboxed.Unbox a, Ord a, Data a) => Data.Vector.Unboxed.Vector a -> [TestTree]
testTupleUnboxedVector dummy = concatMap ($ dummy)
[
testGeneralUnboxedVector
]
tests =
[ testGroup "()" $
testUnitUnboxedVector (undefined :: Data.Vector.Unboxed.Vector ())
, testGroup "(Bool)" $
testBoolUnboxedVector (undefined :: Data.Vector.Unboxed.Vector Bool)
, testGroup "(Int)" $
testNumericUnboxedVector (undefined :: Data.Vector.Unboxed.Vector Int)
, testGroup "(Float)" $
testNumericUnboxedVector (undefined :: Data.Vector.Unboxed.Vector Float)
, testGroup "(Double)" $
testNumericUnboxedVector (undefined :: Data.Vector.Unboxed.Vector Double)
, testGroup "(Int,Bool)" $
testTupleUnboxedVector (undefined :: Data.Vector.Unboxed.Vector (Int, Bool))
, testGroup "(Int,Bool,Int)" $
testTupleUnboxedVector
(undefined :: Data.Vector.Unboxed.Vector (Int, Bool, Int))
, testGroup "unstream" $ testUnstream (undefined :: Data.Vector.Unboxed.Vector Int)
]
|