on master help sign in
Rename test modules to match with corresponding source modules.
8016730pranaysashank
streamly.cabal+12−9
@@ -151,6 +151,7 @@ extra-source-files:
151 src/Streamly/Internal/FileSystem/Event/Darwin.h
151 src/Streamly/Internal/FileSystem/Event/Darwin.h
152 src/config.h.in
152 src/config.h.in
153 src/inline.hs
153 src/inline.hs
154+ test/Streamly/Test/Common/Array.hs
154 stack.yaml
155 stack.yaml
155
156
156extra-tmp-files:
157extra-tmp-files:
@@ -334,6 +335,7 @@ common test-options
334
335
335 ghc-options: -O0
336 ghc-options: -O0
336 -fno-ignore-asserts
337 -fno-ignore-asserts
338+ include-dirs: test
337 -- XXX we need -O for plugin to work
339 -- XXX we need -O for plugin to work
338 -- if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
340 -- if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
339 -- ghc-options: -fplugin Fusion.Plugin
341 -- ghc-options: -fplugin Fusion.Plugin
@@ -668,8 +670,8 @@ test-suite Prelude.MaxRate
668test-suite Data.Array.Storable.Foreign
670test-suite Data.Array.Storable.Foreign
669 import: test-options
671 import: test-options
670 type: exitcode-stdio-1.0
672 type: exitcode-stdio-1.0
671− main-is: Streamly/Test/Array.hs
673+ main-is: Streamly/Test/Data/Array/Storable/Foreign.hs
672− cpp-options: -DTEST_ARRAY
674+ ghc-options: -main-is Streamly.Test.Data.Array.Storable.Foreign.main
673
675
674test-suite Data.Fold
676test-suite Data.Fold
675 import: test-options
677 import: test-options
@@ -696,25 +698,26 @@ test-suite Data.Parser.ParserD
696test-suite Data.Array
698test-suite Data.Array
697 import: test-options
699 import: test-options
698 type: exitcode-stdio-1.0
700 type: exitcode-stdio-1.0
699− main-is: Streamly/Test/Array.hs
701+ main-is: Streamly/Test/Data/Array.hs
702+ ghc-options: -main-is Streamly.Test.Data.Array.main
700
703
701test-suite Data.SmallArray
704test-suite Data.SmallArray
702 import: test-options
705 import: test-options
703 type: exitcode-stdio-1.0
706 type: exitcode-stdio-1.0
704− main-is: Streamly/Test/Array.hs
707+ main-is: Streamly/Test/Data/SmallArray.hs
705− cpp-options: -DTEST_SMALL_ARRAY
708+ ghc-options: -main-is Streamly.Test.Data.SmallArray.main
706
709
707test-suite Data.Array.Prim
710test-suite Data.Array.Prim
708 import: test-options
711 import: test-options
709 type: exitcode-stdio-1.0
712 type: exitcode-stdio-1.0
710− main-is: Streamly/Test/Array.hs
713+ main-is: Streamly/Test/Data/Array/Prim.hs
711− cpp-options: -DDATA_ARRAY_PRIM
714+ ghc-options: -main-is Streamly.Test.Data.Array.Prim.main
712
715
713test-suite Data.Array.Prim.Pinned
716test-suite Data.Array.Prim.Pinned
714 import: test-options
717 import: test-options
715 type: exitcode-stdio-1.0
718 type: exitcode-stdio-1.0
716− main-is: Streamly/Test/Array.hs
719+ main-is: Streamly/Test/Data/Array/Prim/Pinned.hs
717− cpp-options: -DDATA_ARRAY_PRIM_PINNED
720+ ghc-options: -main-is Streamly.Test.Data.Array.Prim.Pinned.main
718
721
719test-suite Unicode.Stream
722test-suite Unicode.Stream
720 import: test-options
723 import: test-options
test/Streamly/Test/Array.hs → test/Streamly/Test/Common/Array.hsrenamed+3−1
@@ -7,7 +7,9 @@
7-- Stability : experimental
7-- Stability : experimental
8-- Portability : GHC
8-- Portability : GHC
9--
9--
10−module Main (main) where
10+
11+-- This is a common array test module that gets included in different
12+-- Array test modules with the corresponding macro defined.
11
13
12import Foreign.Storable (Storable(..))
14import Foreign.Storable (Storable(..))
13
15
test/Streamly/Test/Data/Array.hsnew file+11
@@ -0,0 +1,11 @@
1+-- |
2+-- Module : Streamly.Test.Data.Array
3+-- Copyright : (c) 2019 Composewell Technologies
4+-- License : BSD-3-Clause
5+-- Maintainer : streamly@composewell.com
6+-- Stability : experimental
7+-- Portability : GHC
8+
9+module Streamly.Test.Data.Array where
10+
11+#include "Streamly/Test/Common/Array.hs"
test/Streamly/Test/Data/Array/Prim.hsnew file+12
@@ -0,0 +1,12 @@
1+-- |
2+-- Module : Streamly.Test.Data.Array.Prim
3+-- Copyright : (c) 2020 Composewell Technologies
4+-- License : BSD-3-Clause
5+-- Maintainer : streamly@composewell.com
6+-- Stability : experimental
7+-- Portability : GHC
8+
9+module Streamly.Test.Data.Array.Prim where
10+
11+#define DATA_ARRAY_PRIM
12+#include "Streamly/Test/Common/Array.hs"
test/Streamly/Test/Data/Array/Prim/Pinned.hsnew file+12
@@ -0,0 +1,12 @@
1+-- |
2+-- Module : Streamly.Test.Data.Array.Prim.Pinned
3+-- Copyright : (c) 2020 Composewell Technologies
4+-- License : BSD-3-Clause
5+-- Maintainer : streamly@composewell.com
6+-- Stability : experimental
7+-- Portability : GHC
8+
9+module Streamly.Test.Data.Array.Prim.Pinned where
10+
11+#define DATA_ARRAY_PRIM_PINNED
12+#include "Streamly/Test/Common/Array.hs"
test/Streamly/Test/Data/Array/Storable/Foreign.hsnew file+12
@@ -0,0 +1,12 @@
1+-- |
2+-- Module : Streamly.Test.Data.Array.Storable.Foreign
3+-- Copyright : (c) 2019 Composewell technologies
4+-- License : BSD-3-Clause
5+-- Maintainer : streamly@composewell.com
6+-- Stability : experimental
7+-- Portability : GHC
8+
9+module Streamly.Test.Data.Array.Storable.Foreign (main) where
10+
11+#define TEST_ARRAY
12+#include "Streamly/Test/Common/Array.hs"
test/Streamly/Test/Data/SmallArray.hsnew file+12
@@ -0,0 +1,12 @@
1+-- |
2+-- Module : Streamly.Test.Data.SmallArray
3+-- Copyright : (c) 2020 Composewell technologies
4+-- License : BSD-3-Clause
5+-- Maintainer : streamly@composewell.com
6+-- Stability : experimental
7+-- Portability : GHC
8+
9+module Streamly.Test.Data.SmallArray where
10+
11+#define TEST_SMALL_ARRAY
12+#include "Streamly/Test/Common/Array.hs"