package junit

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val error : ?message:string -> typ:string -> name:string -> classname:string -> time:float -> string -> t

Creates an error element.

Indicates that the test errored. An errored test is one that had an unanticipated problem. e.g., an unchecked throwable; or a problem with the implementation of the test. Contains as a text node relevant data for the error, e.g., a stack trace.

  • parameter message

    The error message. e.g., if a java exception is thrown, the return value of getMessage().

  • parameter typ

    The type of error that occured. e.g., if a java execption is thrown the full class name of the exception.

  • parameter description

    Description of the error.

  • parameter name

    Name of the test method.

  • parameter classname

    Full class name for the class the test method is in.

  • parameter time

    Time taken (in seconds) to execute the test.

val failure : ?message:string -> typ:string -> name:string -> classname:string -> time:float -> string -> t

Creates a failure element.

Indicates that the test failed. A failure is a test which the code has explicitly failed by using the mechanisms for that purpose. e.g., via an assertEquals. Contains as a text node relevant data for the failure, e.g., a stack trace.

  • parameter message

    The message specified in the assert.

  • parameter typ

    The type of the assert.

  • parameter description

    Description of the failure.

  • parameter name

    Name of the test method.

  • parameter classname

    Full class name for the class the test method is in.

  • parameter time

    Time taken (in seconds) to execute the test.

val skipped : name:string -> classname:string -> time:float -> t

Creates a skipped element.

Indicates that the test has not been launched.

  • parameter name

    Name of the test method.

  • parameter classname

    Full class name for the class the test method is in.

  • parameter time

    Time taken (in seconds) to execute the test.

val pass : name:string -> classname:string -> time:float -> t

Creates a pass element.

Indicates that the test is a success.

  • parameter name

    Name of the test method.

  • parameter classname

    Full class name for the class the test method is in.

  • parameter time

    Time taken (in seconds) to execute the test.

OCaml

Innovation. Community. Security.