Skip to content
Tarn W. Burton edited this page Jun 10, 2023 · 7 revisions

ANSI tests

After building from source the complete ANSI test suite can be by executing the following:

ninja -C build ansi-test

A suite of tests can be run by using the ANSI_TEST_SUITE environment variable. For example to run the printer tests:

ANSI_TEST_SUITE=printer ninja -C build ansi-test

The following suites are available:

  • symbols
  • eval-and-compile
  • data-and-control-flow
  • iteration
  • objects
  • conditions
  • cons
  • arrays
  • hash-tables
  • packages
  • numbers
  • sequences
  • structures
  • types-and-classes
  • strings
  • characters
  • pathnames
  • files
  • streams
  • printer
  • reader
  • system-construction
  • environment
  • misc

Random Tester

The random tester can be run by executing

ninja -C build test-random-integer

The tests can be configured with the RANDOM_INT_SIZE, RANDOM_INT_VARIABLES and RANDOM_INT_ITERATIONS environment variables. For example

RANDOM_INT_SIZE=100 RANDOM_INT_VARIABLES=4 RANDOM_INT_ITERATIONS=10000 ninja -C build test-random-integer
Clone this wiki locally