on master help sign in
Add a test-suite for PrimArray
4008a26adithyaov
streamly.cabal+17
@@ -532,6 +532,23 @@ test-suite smallarray-test
532 transformers >= 0.4 && < 0.6
532 transformers >= 0.4 && < 0.6
533 default-language: Haskell2010
533 default-language: Haskell2010
534
534
535+test-suite primarray-test
536+ import: test-options
537+ type: exitcode-stdio-1.0
538+ main-is: Streamly/Test/Array.hs
539+ js-sources: jsbits/clock.js
540+ hs-source-dirs: test
541+ cpp-options: -DTEST_PRIM_ARRAY
542+ build-depends:
543+ streamly
544+ , base >= 4.8 && < 5
545+ , QuickCheck >= 2.10 && < 2.14
546+ , hspec >= 2.0 && < 3
547+ if impl(ghc < 8.0)
548+ build-depends:
549+ transformers >= 0.4 && < 0.6
550+ default-language: Haskell2010
551+
535test-suite string-test
552test-suite string-test
536 import: test-options
553 import: test-options
537 type: exitcode-stdio-1.0
554 type: exitcode-stdio-1.0
test/Streamly/Test/Array.hs+3
@@ -31,6 +31,9 @@ import qualified Streamly.Memory.Array as A
31import qualified Streamly.Internal.Memory.Array as A
31import qualified Streamly.Internal.Memory.Array as A
32import qualified Streamly.Internal.Prelude as IP
32import qualified Streamly.Internal.Prelude as IP
33type Array = A.Array
33type Array = A.Array
34+#elif defined(TEST_PRIM_ARRAY)
35+import qualified Streamly.Data.PrimArray as A
36+type Array = A.PrimArray
34#else
37#else
35import qualified Streamly.Internal.Data.Array as A
38import qualified Streamly.Internal.Data.Array as A
36type Array = A.Array
39type Array = A.Array