You've already forked gnatcoverage
mirror of
https://github.com/AdaCore/gnatcoverage.git
synced 2026-02-12 12:44:55 -08:00
printf/puts may not be available with some bareboard runtimes. Adapt the testcase to run even on such restricted configurations.
20 lines
337 B
C
20 lines
337 B
C
extern void dummy_puts (const char *msg);
|
|
|
|
#define PRINT_HW dummy_puts ("Hello world!\n");
|
|
|
|
/* Thanks to macro_stmts_enabled returning 0, macro_stmts is never executed,
|
|
and thus we get coverage violations inside macro expansion. */
|
|
|
|
int
|
|
macro_stmts_enabled (void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
void
|
|
macro_stmts (void)
|
|
{
|
|
PRINT_HW;
|
|
PRINT_HW;
|
|
}
|