Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Line Coverage

Line Coverage

Ratings:
(0)
|Views: 1|Likes:
Published by Ankur Singh

More info:

Published by: Ankur Singh on Dec 13, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

12/13/2011

pdf

text

original

 
Line Coverage
Here's some Java code I wrote recently (or, rather, cribbed from Wirth's Algorithms + Data Structures = Programs):1.private Expr orArgument() throws ParseError {2.Expr retval = factor();3.while (tokenType == AND) {4.getsym();5.retval = new ExprAnd(retval, factor());6.}7.tr.debugm(retval.toString());8.return retval;9.}I have a testsuitefor the application in which this code lives. Suppose I ran that test suite. A line coverage tool could thentell me which of these lines of code had never been reached by the execution of any of my tests."Line 4 in file Parser.java was never executed."(If you're familiar with source-leveldebuggers,think of breakpoints. A line coverage tool essentially puts a breakpoint on

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->