It depends on the test from the bench

I have a test project

test-suite spec
  ...

benchmark bench
  build-depends:
    library-test-spec

... how can I depend on the test suite code from the test? The above does not work because the package named library-test-specdoes not exist.

+4
source share
2 answers

Starting with Cabal 2.0, you can put the general code in the named “internal library”, on which both the test suite and the standard depend. According to the documentation :

Cabal 2.0 " ", ( ). , , , . , .

:

library foo-internal
    exposed-modules: Foo.Internal
    build-depends: base

, .

(, ) ( ).

cabal-version: >=2 .cabal .

+3

test-suite . - , test-suite , library. , , , , library . , ​​.

- .

+2

Source: https://habr.com/ru/post/1692100/


All Articles