编译:
运行:
最后运行:
即可
gcc -fprofile-arcs -ftest-coverage -o test a.c
运行:
./test
最后运行:
gcov a.c
即可
gcc -fprofile-arcs -ftest-coverage -o test a.c
./test
gcov a.c