Next: , Previous: libgcj Tests, Up: Testsuites  6.4.6 Support
for testing gcov  Language-independent support for testing gcov,
and for checking that branch profiling produces expected values,
is provided by the expect file gcov.exp. gcov tests also rely on
procedures in gcc.dg.exp to compile and run the test program. A
typical gcov test contains the following DejaGnu commands within
comments:       { dg-options "-fprofile-arcs -ftest-coverage" }
{ dg-do run { target native } }      { dg-final { run-gcov
sourcefile } }  Checks of gcov output can include line counts,
branch percentages, and call return percentages. All of these
checks are requested via commands that appear in comments in the
test's source file. Commands to check line counts are processed
by default. Commands to check branch percentages and call return
percentages are processed if the run-gcov command has arguments
branches or calls, respectively. For example, the following
specifies checking both, as well as passing -b to gcov:       {
dg-