next | previous | forward | backward | up | top | index | toc | directory | Macaulay 2 web site
Macaulay2Doc > The Macaulay 2 language > packages > creating a package > check

check -- perform tests of a package

Synopsis

Description

It is important for package authors to provide tests to insure that the package is functioning properly. One provides tests using TEST in the beginDocumentation section.

Synopsis

  • Usage:
    check P
  • Inputs:
  • Consequences:
    • The tests in the package
    • P
    • are run (in separate Macaulay 2 processes), and any errors are reported.

For example, to run the tests for the LLLBases package (Lenstra-Lenstra-Lovasz bases) do the following.

installPackage "LLLBases"
check LLLBases

Alternatively, if the package is already installed somewhere accessible, one can do the following.

check "LLLBases"

Synopsis

  • Usage:
    check(i,P)
  • Inputs:
  • Consequences:
    • The i-th test in the package P is run (in separate Macaulay 2 processes), and any errors are reported.

For example, to run the tests for the LLLBases package (Lenstra-Lenstra-Lovasz bases) do the following.

installPackage "LLLBases"
check LLLBases

Alternatively, if the package is already installed somewhere accessible, one can do the following.

check "LLLBases"

Caveat

Currently, if the package was only partially loaded because the documentation was obtainable from a database (see beginDocumentation), then the package will be reloaded, this time completely, to ensure that all tests are considered; this may affect user objects of types declared by the package, as they may be not usable by the new instance of the package. In a future version, either the tests and the documentation will both be cached, or neither will.

See also

Ways to use check :