Slide 11
Slide 11 text
Statement level coverage vs Branch
round 2, fight!
!
Statements covered : 100 %
Branches covered : 50 %
def testMe(cond1:Boolean, cond2:Boolean) = {
if (cond1) line1()
if (cond2) line2()
}
If your test only goes in the cond1 being true and cond2 being true:
You would have:
In order to get 100%
branches covered, you
will have
to add a test with
cond1 and cond2 as
false