package octez-libs

  1. Overview
  2. Docs
A package that contains multiple base libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.0.tar.gz
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13

doc/octez-libs.tezt-wrapper/Tezt_wrapper/Uses/index.html

Module Tezt_wrapper.UsesSource

Test dependencies.

Test.register and Regression.register take an optional argument ?uses that allows to declare that the test uses a given file.

For instance, you can define:

  let data = Uses.make ~tag:"data" ~path:"data/file.dat"

You would then:

  • declare your test with ~uses:[data];
  • use Uses.path data to get the path to your file.

~uses:[data] adds the tag of data to the test tags.

Uses.path data checks that the current test was declared with data in its ~uses. And when you declare a test with ~uses:[data], the test checks, at the end, that Uses.path data was called. This helps to maintain the invariant that a test that uses a given file has a given tag.

Sourcetype t

Test dependencies.

Sourceval make : tag:string -> path:string -> t

Make a test dependency.

Multiple paths can be associated with the same tag, and the same paths can be associated with different tags.

Sourceval path : t -> string

Get the path of a test dependency.

Sourceval tag : t -> string

Get the tag of a test dependency.

OCaml

Innovation. Community. Security.