Commit 5a84ccc5 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

All good.

parents
all:
gcc -g -O0 -fprofile-arcs -ftest-coverage coverage_demo.c
report:
gcov -pcb coverage_demo.c
cat coverage_demo.c.gcov
clean:
rm -f coverage_demo.c.gcov coverage_demo.gcda coverage_demo.gcno a.out
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
uint32_t t1 = atoi(argv[1]);
uint32_t t2 = t1 < 8 && t1 > 2;
if (t1 < 7 && t1 > 3)
printf("3<%d<7 was true\n", t1);
else
printf("3<%d<7 was false\n", t1);
return 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment