Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 78 additions & 86 deletions containers-tests/containers-tests.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,22 @@ library
-- B E N C H M A R K I N G --
-----------------------------

library benchmark-utils
import: deps, warnings
default-language: Haskell2010
hs-source-dirs: benchmark-utils

build-depends:
containers-tests
, random >=1.0 && <1.3
, transformers
, tasty-bench

exposed-modules:
SetOperations
Utils.Fold
Utils.Random

benchmark intmap-benchmarks
import: benchmark-deps, warnings
default-language: Haskell2010
Expand All @@ -140,11 +156,8 @@ benchmark intmap-benchmarks
main-is: IntMap.hs
ghc-options: -O2

other-modules:
Utils.Fold

build-depends:
transformers
benchmark-utils
, random >=1.0 && <1.3

benchmark intset-benchmarks
Expand All @@ -155,11 +168,8 @@ benchmark intset-benchmarks
main-is: IntSet.hs
ghc-options: -O2

other-modules:
Utils.Fold

build-depends:
transformers
benchmark-utils
, random >=1.0 && <1.3

benchmark map-benchmarks
Expand All @@ -172,14 +182,8 @@ benchmark map-benchmarks
build-depends:
random >=1.0 && <1.3

other-modules:
Utils.Random

other-modules:
Utils.Fold

build-depends:
transformers
benchmark-utils

benchmark tree-benchmarks
import: benchmark-deps, warnings
Expand All @@ -189,11 +193,8 @@ benchmark tree-benchmarks
main-is: Tree.hs
ghc-options: -O2

other-modules:
Utils.Fold

build-depends:
transformers
benchmark-utils

benchmark sequence-benchmarks
import: benchmark-deps, warnings
Expand All @@ -203,33 +204,20 @@ benchmark sequence-benchmarks
main-is: Sequence.hs
ghc-options: -O2
build-depends:
random >=1.0 && <1.3
benchmark-utils
, random >=1.0 && <1.3
, transformers

other-modules:
Utils.Fold

build-depends:
transformers

benchmark set-benchmarks
import: benchmark-deps, warnings
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: benchmarks
main-is: Set.hs
ghc-options: -O2
build-depends:
random >=1.0 && <1.3

other-modules:
Utils.Random

other-modules:
Utils.Fold

build-depends:
transformers
benchmark-utils

benchmark graph-benchmarks
import: benchmark-deps, warnings
Expand All @@ -247,49 +235,45 @@ benchmark set-operations-intmap
type: exitcode-stdio-1.0
hs-source-dirs: benchmarks/SetOperations
main-is: SetOperations-IntMap.hs
other-modules: SetOperations
ghc-options: -O2

build-depends:
benchmark-utils

benchmark set-operations-intset
import: benchmark-deps, warnings
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: benchmarks/SetOperations
main-is: SetOperations-IntSet.hs
other-modules: SetOperations
ghc-options: -O2

build-depends:
benchmark-utils

benchmark set-operations-map
import: benchmark-deps, warnings
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs:
benchmarks/SetOperations
benchmarks
main-is: SetOperations-Map.hs
other-modules: SetOperations
ghc-options: -O2
build-depends:
random >=1.0 && <1.3

other-modules:
Utils.Random
build-depends:
benchmark-utils

benchmark set-operations-set
import: benchmark-deps, warnings
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs:
benchmarks/SetOperations
benchmarks
main-is: SetOperations-Set.hs
other-modules: SetOperations
ghc-options: -O2
build-depends:
random >=1.0 && <1.3

other-modules:
Utils.Random
build-depends:
benchmark-utils

benchmark lookupge-intmap
import: benchmark-deps, warnings
Expand All @@ -315,15 +299,34 @@ benchmark lookupge-map
-- Every test-suite contains the build-depends and options of the library,
-- plus the testing stuff.

library test-utils
import: deps, warnings
default-language: Haskell2010
hs-source-dirs: test-utils

build-depends:
containers-tests
, ChasingBottoms
, QuickCheck
, transformers

exposed-modules:
IntMapValidity
IntSetValidity
Utils.ArbitrarySetMap
Utils.MergeFunc
Utils.NubSorted
Utils.Strictness

test-suite map-lazy-properties
import: test-deps, warnings
default-language: Haskell2010
hs-source-dirs: tests
main-is: map-properties.hs
type: exitcode-stdio-1.0

other-modules:
Utils.ArbitrarySetMap
build-depends:
test-utils

ghc-options: -O2
other-extensions:
Expand All @@ -338,8 +341,8 @@ test-suite map-strict-properties
type: exitcode-stdio-1.0
cpp-options: -DSTRICT

other-modules:
Utils.ArbitrarySetMap
build-depends:
test-utils

ghc-options: -O2
other-extensions:
Expand All @@ -364,8 +367,8 @@ test-suite set-properties
main-is: set-properties.hs
type: exitcode-stdio-1.0

other-modules:
Utils.ArbitrarySetMap
build-depends:
test-utils

ghc-options: -O2
other-extensions:
Expand All @@ -378,7 +381,9 @@ test-suite intmap-lazy-properties
hs-source-dirs: tests
main-is: intmap-properties.hs
type: exitcode-stdio-1.0
other-modules: IntMapValidity

build-depends:
test-utils

ghc-options: -O2
other-extensions:
Expand All @@ -392,7 +397,9 @@ test-suite intmap-strict-properties
main-is: intmap-properties.hs
type: exitcode-stdio-1.0
cpp-options: -DSTRICT
other-modules: IntMapValidity

build-depends:
test-utils

ghc-options: -O2
other-extensions:
Expand All @@ -405,7 +412,9 @@ test-suite intset-properties
hs-source-dirs: tests
main-is: intset-properties.hs
type: exitcode-stdio-1.0
other-modules: IntSetValidity

build-depends:
test-utils

ghc-options: -O2
other-extensions:
Expand All @@ -418,17 +427,16 @@ test-suite seq-properties
hs-source-dirs: tests
main-is: seq-properties.hs
type: exitcode-stdio-1.0

build-depends:
ChasingBottoms
test-utils
, ChasingBottoms

ghc-options: -O2
other-extensions:
BangPatterns
CPP

other-modules:
Utils.Strictness

test-suite tree-properties
import: test-deps, warnings
default-language: Haskell2010
Expand Down Expand Up @@ -456,19 +464,14 @@ test-suite map-strictness-properties
main-is: map-strictness.hs
type: exitcode-stdio-1.0
build-depends:
ChasingBottoms
test-utils
, ChasingBottoms

ghc-options: -Wall
other-extensions:
BangPatterns
CPP

other-modules:
Utils.ArbitrarySetMap
Utils.MergeFunc
Utils.NubSorted
Utils.Strictness

test-suite intmap-strictness-properties
import: test-deps, warnings
default-language: Haskell2010
Expand All @@ -480,15 +483,11 @@ test-suite intmap-strictness-properties
CPP

build-depends:
ChasingBottoms
test-utils
, ChasingBottoms

ghc-options: -Wall

other-modules:
Utils.MergeFunc
Utils.NubSorted
Utils.Strictness

test-suite set-strictness-properties
import: test-deps, warnings
default-language: Haskell2010
Expand All @@ -500,15 +499,11 @@ test-suite set-strictness-properties
CPP

build-depends:
ChasingBottoms
test-utils
, ChasingBottoms

ghc-options: -Wall

other-modules:
Utils.ArbitrarySetMap
Utils.NubSorted
Utils.Strictness

test-suite intset-strictness-properties
import: test-deps, warnings
default-language: Haskell2010
Expand All @@ -520,14 +515,11 @@ test-suite intset-strictness-properties
CPP

build-depends:
ChasingBottoms
test-utils
, ChasingBottoms

ghc-options: -Wall

other-modules:
Utils.NubSorted
Utils.Strictness

test-suite listutils-properties
import: test-deps, warnings
default-language: Haskell2010
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Data.List (intercalate, elemIndex)
import Data.IntSet.Internal.IntTreeCommons (Prefix(..), nomatch)
import Data.IntMap.Internal
import Numeric (showHex)
import Test.Tasty.QuickCheck (Property, counterexample, property, (.&&.))
import Test.QuickCheck (Property, counterexample, property, (.&&.))

{--------------------------------------------------------------------
Assertions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Data.IntSet.Internal.IntTreeCommons (Prefix(..), nomatch)
import Data.IntSet.Internal
import Data.List (intercalate)
import Numeric (showHex)
import Test.Tasty.QuickCheck (Property, counterexample, property, (.&&.))
import Test.QuickCheck (Property, counterexample, property, (.&&.))

#include "containers.h"

Expand Down