????????????:gcc-o autosell -fprofile-arcs -ftest-coverage autosell.c

??????г???(./autosell)????????Щ????????:

??????????:

??????????帲????:gcov autosell.c
????File'autosell.c'
????Linesexecuted:94.55% of 55
????Creating'autosell.c.gcov'

??????????????????:gcov-f autosell.c
????Function'process'
????Linesexecuted:90.00% of 20
????Function'pushbutton'
????Linesexecuted:100.00% of 9
????Function'getcoin'
????Linesexecuted:100.00% of 9
????Function'nochange'
????Linesexecuted:75.00% of 4
????Function'welcome'
????Linesexecuted:100.00% of 4
????Function'main'
????Linesexecuted:100.00% of 9
????File'autosell.c'
????Linesexecuted:94.55% of 55
????Creating'autosell.c.gcov'

?????????????:gcov-b autosell.c
????File'autosell.c'
????Linesexecuted:94.55% of 55
????Branchesexecuted:100.00% of 28
????Takenat least once:92.86% of 28
????Callsexecuted:87.50% of 24
????Creating'autosell.c.gcov'

?????????autosell.c.gcov??????в?

?????ο?????:

????[1]????????????????/?????? ?廩????????磬 2009.11

????[2]???????????????????????EclEmma????????:http://liangruijun.blog.51cto.com/3061169/803473

????[3]???Eclemma???и??????:http://www.ibm.com/developerworks/cn/java/j-lo-eclemma/