package osnap

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type mode =
  1. | Interactive
    (*

    Interactive mode, diffs will be displayed and ask for promote

    *)
  2. | Promote
    (*

    Promote mode, will promote every diff

    *)
  3. | Error
    (*

    Error mode, raises error on diff

    *)
type encoding =
  1. | Marshal
    (*

    Snapshot will be encoded using binaries with Marshal

    *)
  2. | Data_encoding
    (*

    Snapshot will be encoded using a JSON with the library Data_encoding

    *)
val run_tests : ?encoding:encoding -> ?mode:mode -> ?out:Format.formatter -> ?color:bool -> Test.t list -> int

run_tests tests runs suite of tests and print its results

  • returns

    an error code, 0 if all tests passed, 1 otherwise

  • parameter encoding,

    default is Marshal

  • parameter mode

    default is Error

  • parameter color,

    if true, colorful output

val run_tests_main : ?argv:string array -> Test.t list -> 'a

run_tests_main can be used as the main function of a test file. Exits with a non-0 code if the tests fail. It refers to run_tests for actually running tests after a CLI options have been parsed

The available options are:

  • "--mode <m>" (or "-m <m>") for running mode
  • "--color <b>" (or "-c <b>") for activating colors
  • "--encoding <e>" (or "-e <e>") for encoding mode
OCaml

Innovation. Community. Security.