mainGNU C Compiler - Support: sr #105666, gcov functionality should be a...

 
 

sr #105666: gcov functionality should be a library for use by unit test programs

Submitter:  None
Submitted:  Thu 09 Nov 2006 01:24:18 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  1 - Wish Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 09 Nov 2006 01:24:18 PM UTC, original submission:  

I'm using 'gcov' for code coverage with the 'check' suite for unit testing. It strikes me that both 'check', 'c-unit' and 'autounit'(?) could all use the functionality of 'gcov' if it was in a library to test if the amount of code execute was acceptable.

If the new library had a function call:-

int gcovget_coverage( const char *filename );


A new command for 'check' could be:-

fail_unless( gcovget_coverage( "func.c" ) >= 90, NULL );

which in 'check' speak would mean if the coverage of the source file 'func.c' tested was less than 90% then throw an error.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2006-11-09 None Carbon-Copy- Added -unavailable-

Back to the top

Powered by Savane 3.13-cf05.
Corresponding source code