on master help sign in
Rename test modules to match with corresponding source modules.
commit8016730649ffdea75d9d2adb7c29d1381680dac0 authorpranaysashank <pranaysashank@composewell.com> dateThu 12 Nov 2020, 16:38 (6 years ago) parent1c3ce16
7 files changed+74−10
streamly.cabal+12−9 test/Streamly/Test/Array.hs → test/Streamly/Test/Common/Array.hs+3−1 test/Streamly/Test/Data/Array.hs+11 test/Streamly/Test/Data/Array/Prim.hs+12 test/Streamly/Test/Data/Array/Prim/Pinned.hs+12 test/Streamly/Test/Data/Array/Storable/Foreign.hs+12 test/Streamly/Test/Data/SmallArray.hs+12
streamly.cabal+12−9
@@ -151,6 +151,7 @@ extra-source-files:
151151 src/Streamly/Internal/FileSystem/Event/Darwin.h
152152 src/config.h.in
153153 src/inline.hs
154+ test/Streamly/Test/Common/Array.hs
154155 stack.yaml
155156
156157extra-tmp-files:
@@ -334,6 +335,7 @@ common test-options
334335
335336 ghc-options: -O0
336337 -fno-ignore-asserts
338+ include-dirs: test
337339 -- XXX we need -O for plugin to work
338340 -- if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
339341 -- ghc-options: -fplugin Fusion.Plugin
@@ -668,8 +670,8 @@ test-suite Prelude.MaxRate
668670test-suite Data.Array.Storable.Foreign
669671 import: test-options
670672 type: exitcode-stdio-1.0
671− main-is: Streamly/Test/Array.hs
672− cpp-options: -DTEST_ARRAY
673+ main-is: Streamly/Test/Data/Array/Storable/Foreign.hs
674+ ghc-options: -main-is Streamly.Test.Data.Array.Storable.Foreign.main
673675
674676test-suite Data.Fold
675677 import: test-options
@@ -696,25 +698,26 @@ test-suite Data.Parser.ParserD
696698test-suite Data.Array
697699 import: test-options
698700 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
700703
701704test-suite Data.SmallArray
702705 import: test-options
703706 type: exitcode-stdio-1.0
704− main-is: Streamly/Test/Array.hs
705− cpp-options: -DTEST_SMALL_ARRAY
707+ main-is: Streamly/Test/Data/SmallArray.hs
708+ ghc-options: -main-is Streamly.Test.Data.SmallArray.main
706709
707710test-suite Data.Array.Prim
708711 import: test-options
709712 type: exitcode-stdio-1.0
710− main-is: Streamly/Test/Array.hs
711− cpp-options: -DDATA_ARRAY_PRIM
713+ main-is: Streamly/Test/Data/Array/Prim.hs
714+ ghc-options: -main-is Streamly.Test.Data.Array.Prim.main
712715
713716test-suite Data.Array.Prim.Pinned
714717 import: test-options
715718 type: exitcode-stdio-1.0
716− main-is: Streamly/Test/Array.hs
717− cpp-options: -DDATA_ARRAY_PRIM_PINNED
719+ main-is: Streamly/Test/Data/Array/Prim/Pinned.hs
720+ ghc-options: -main-is Streamly.Test.Data.Array.Prim.Pinned.main
718721
719722test-suite Unicode.Stream
720723 import: test-options
test/Streamly/Test/Array.hs → test/Streamly/Test/Common/Array.hsrenamed+3−1
@@ -7,7 +7,9 @@
77-- Stability : experimental
88-- Portability : GHC
99--
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.
1113
1214import Foreign.Storable (Storable(..))
1315
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"