PLEX86  x86- Virtual Machine (VM) Program
 CVS  |  Mailing List  |  Download  |  Newsgroups

Thou shalt have no other gods before the ANSI C standard 1605


Your Ad Here

Your Ad Here

Jean-Marc Bourguet

Thou shalt have no other gods before the ANSI C standard 1606
Douglas A. Gwyn How does that work again? I don't see how you can deduce path coverage...

Usually I use source-line usage counters, as in the following Makefile target which exploits "ctrace":

Thou shalt have no other gods before the ANSI C standard 1607
Trevor L. Jackson, III Agreed. Why do we need to know whether our development methodology is good enough (absolute criteria) to eliminate all buffer overruns? Because if...

$(PCFILES): $(HFILES) $(CFILES) $(OBJS) $(TEST).o # $(CFILES) is overkill o=`basename $$c .c`.o; $(CC) -c T.$$c; mv $$o B.$$o && mv T.$$o $$o; $(CC) $(LDFLAGS) -o $(TEST) $(TEST).o $(OBJS) $(TLIBES); rm -f $(TEST) T.$$o && mv B.$$o $$o; sed 's-^ *-(1-90-9*-).*--1-' rm -f X.$$c; ( echo ',x-tct-("----n *1-90-9*{'; echo 'x-1-90-9*-p-n---n-p'; echo '}-nq-n' ( echo f P.$$c; echo ',x-^-c-'; uniq -c L.$$c sed 's;^-( *1-90-9*-)(1-90-9*-);-2i--1-;'; uniq L.$$c comm -13 - A.$$c sed 's;.*;&i 0-;'; echo 'w-nq-n' ) sam -d $$c; rm -f ALT.$$c )

I'd split it up into if ( a b ) g1(); which should show separate counters for both conditions.

I look for the number of ends of the controlled expression (g1() or g2()) being less than the number of ends of the controlling condition (a). Another method is to always code explicitly the other branch: if ( a ) g1(); else ; etc. Anyway, the coverage tests are devised by looking at the source code, so it is rare that usage counters show that some branch has not been exercised.



Your Ad Here

List | Previous | Next

Thou shalt have no other gods before the ANSI C standard 1606

Alt Folklore Computers from Newsgroups

The #1 Usenet Provider on the Internet

Thou shalt have no other gods before the ANSI C standard 1604