ecl-logo Documentation

DefineTests

DefineTests[collection,symbol,tests]Null

defines a set of tests for a given symbol. The information is stored in the given collection.

DefineTests[collection,string,tests]Null

defines a set of tests for a given string. The information is stored in the given collection.

DefineTests[symbol,tests]Null

defines a set of tests for a given symbol. The information is stored in the default collection.

DefineTests[string,tests]Null

defines a set of tests for a given string. The information is stored in the default collection.

Details

  • Stubs defined at the individual Test/Example level will take precedence over stubs defined at the DefineTests level.
  • Input
    General Options
    Attributes
  • HoldAll
  • Messages
  • NullWarning, Null encountered in test list for `1` (`2`): check for extra comma.
    TimesWarning, _Times encountered in test list for `1` (`2`): check for missing comma.

Examples

Basic Examples  (2)

Define tests for a given string:

Define tests for a given symbol:

Options  (9)

Platform  (1)

Flag a symbol as having tests which only run on Windows:

SetUp  (1)

Specify an expression to be run before every Test:

Skip  (1)

Flag a symbol to have its tests skipped with a description of why:

Stubs  (1)

Specify stubs to be used in every Test:

SymbolSetUp  (1)

Specify an expression to be run once before all tests:

SymbolTearDown  (1)

Specify an expression to be run once after all tests:

TearDown  (1)

Specify an expression to be run after every Test:

Variables  (2)

Specify common symbols to be used throughout all Tests:

Specify common stubs to be used throughout all Tests:

Attributes  (1)

HoldAll  (1)

Arguments are not evaluated:

Messages  (2)

Null  (1)

Throws a warning message if extra Nulls in the input list:

Times  (1)

Throws a warning message if extra Times appears in input list: