www.delorie.com/gnu/docs/gcc/gccint_28.html   search  
 
Buy the book!


GNU Compiler Collection (GCC) Internals

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.4.2 C Language Test Suites

GCC contains the following C language test suites, in the `gcc/testsuite' directory:

`gcc.c-torture/compat'
FIXME: describe this.

This directory should probably not be used for new tests.

`gcc.c-torture/compile'
This test suite contains test cases that should compile, but do not need to link or run. These test cases are compiled with several different combinations of optimization options. All warnings are disabled for these test cases, so this directory is not suitable if you wish to test for the presence or absence of compiler warnings. While special options can be set, and tests disabled on specific platforms, by the use of `.x' files, mostly these test cases should not contain platform dependencies. FIXME: discuss how defines such as NO_LABEL_VALUES and STACK_SIZE are used.
`gcc.c-torture/execute'
This test suite contains test cases that should compile, link and run; otherwise the same comments as for `gcc.c-torture/compile' apply.
`gcc.c-torture/unsorted'
FIXME: describe this.

This directory should probably not be used for new tests.

`gcc.dg'
This test suite contains tests using the more modern `dg' harness. Magic comments determine whether the file is preprocessed, compiled, linked or run. In these tests, error and warning message texts are compared against expected texts or regular expressions given in comments. These tests are run with the options `-ansi -pedantic' unless other options are given in the test. Except as noted below they are not run with multiple optimization options.
`gcc.dg/cpp'
This subdirectory contains tests of the preprocessor.
`gcc.dg/debug'
This subdirectory contains tests for debug formats. Tests in this subdirectory are run for each debug format that the compiler supports.
`gcc.dg/format'
This subdirectory contains tests of the `-Wformat' format checking. Tests in this directory are run with and without `-DWIDE'.
`gcc.dg/noncompile'
This subdirectory contains tests of code that should not compile and does not need any special compilation options. They are run with multiple optimization options, since sometimes invalid code crashes the compiler with optimization.
`gcc.dg/special'
FIXME: describe this.
`gcc.c-torture/misc-tests'
FIXME: describe this, when it should be used for new tests and when it shouldn't.

FIXME: merge in `testsuite/README.gcc' and discuss the format of test cases and magic comments more.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003