Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
build: rename test and bench
Browse files Browse the repository at this point in the history
Rename test binary to 'test', benchmark binary to 'bench' and place
'test-lib' inside the 'MCSP' module.
  • Loading branch information
marmitar committed Aug 31, 2023
1 parent 5597d4d commit 7868039
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions bench/Bench.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import Data.String qualified as Text
import MCSP.Data.String (String)
import MCSP.Heuristics.Combine (combineHeuristic, combineHeuristicS)
import MCSP.System.Random (generate)

import TestLib.Heuristics (MCSPHeuristic, StringParameters (..), genStringPair, testHeuristic)
import MCSP.TestLib.Heuristics (MCSPHeuristic, StringParameters (..), genStringPair, testHeuristic)

-- | Create a benchmark for one heuristic and one sample.
createBench :: [(String a, String a)] -> Text.String -> MCSPHeuristic a -> Benchmark
Expand Down
12 changes: 6 additions & 6 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ library:
- MCSP.System.Random

internal-libraries:
MCSP-Algorithms-test-lib:
mcsp-test-lib:
source-dirs: test/lib
exposed-modules:
- TestLib.Heuristics
- MCSP.TestLib.Heuristics
dependencies:
- MCSP-Algorithms

Expand All @@ -106,7 +106,7 @@ executables:
- MCSP-Algorithms

tests:
MCSP-Algorithms-test:
spec:
main: Spec.hs
source-dirs: test
ghc-options:
Expand All @@ -116,10 +116,10 @@ tests:
- -with-rtsopts=-N
dependencies:
- MCSP-Algorithms
- MCSP-Algorithms-test-lib
- mcsp-test-lib

benchmarks:
MCSP-Algorithms-bench:
bench:
main: Bench.hs
source-dirs: bench
ghc-options:
Expand All @@ -129,5 +129,5 @@ benchmarks:
- -with-rtsopts=-N
dependencies:
- MCSP-Algorithms
- MCSP-Algorithms-test-lib
- mcsp-test-lib
- criterion >= 1.6.3.0 && < 2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module TestLib.Heuristics (
module MCSP.TestLib.Heuristics (
MCSPHeuristic,
StringParameters (..),
genStringPair,
Expand Down

0 comments on commit 7868039

Please sign in to comment.