From 7868039e98fb0c82b33eb4c47561514612488ad6 Mon Sep 17 00:00:00 2001 From: Tiago de Paula Date: Wed, 30 Aug 2023 22:25:58 -0300 Subject: [PATCH] build: rename test and bench Rename test binary to 'test', benchmark binary to 'bench' and place 'test-lib' inside the 'MCSP' module. --- bench/Bench.hs | 3 +-- package.yaml | 12 ++++++------ test/lib/{ => MCSP}/TestLib/Heuristics.hs | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) rename test/lib/{ => MCSP}/TestLib/Heuristics.hs (97%) diff --git a/bench/Bench.hs b/bench/Bench.hs index cb769d7..4b733e0 100644 --- a/bench/Bench.hs +++ b/bench/Bench.hs @@ -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 diff --git a/package.yaml b/package.yaml index f6732f8..1fb2528 100644 --- a/package.yaml +++ b/package.yaml @@ -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 @@ -106,7 +106,7 @@ executables: - MCSP-Algorithms tests: - MCSP-Algorithms-test: + spec: main: Spec.hs source-dirs: test ghc-options: @@ -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: @@ -129,5 +129,5 @@ benchmarks: - -with-rtsopts=-N dependencies: - MCSP-Algorithms - - MCSP-Algorithms-test-lib + - mcsp-test-lib - criterion >= 1.6.3.0 && < 2 diff --git a/test/lib/TestLib/Heuristics.hs b/test/lib/MCSP/TestLib/Heuristics.hs similarity index 97% rename from test/lib/TestLib/Heuristics.hs rename to test/lib/MCSP/TestLib/Heuristics.hs index 18ee72d..43cc9da 100644 --- a/test/lib/TestLib/Heuristics.hs +++ b/test/lib/MCSP/TestLib/Heuristics.hs @@ -1,4 +1,4 @@ -module TestLib.Heuristics ( +module MCSP.TestLib.Heuristics ( MCSPHeuristic, StringParameters (..), genStringPair,