Closed cgewecke closed 7 years ago
if (x ==1 ) throw;
gets covered as:
StatementCoverage('test.sol',1); if (x == 1) {BranchCoverage('test.sol',1,0);throw;}else { BranchCoverage('test.sol',1,1);}
It should be the same as the bracketed version if(x==1){throw;}:
if(x==1){throw;}
StatementCoverage('test.sol',1); if (x == 1) {BranchCoverage('test.sol',1,0); StatementCoverage('test.sol',2); throw; }else { BranchCoverage('test.sol',1,1);}
Ditto
if (x == 1 ) y = 2;
currently covered as:
When the consequent is bracketed it gets statement and line coverage:
StatementCoverage('test.sol',1); if (x == 1){BranchCoverage('test.sol',1,0); Coverage('test.sol',6); StatementCoverage('test.sol',2); throw; }else { BranchCoverage('test.sol',1,1);}
Submitting a PR for this later today.
gets covered as:
It should be the same as the bracketed version
if(x==1){throw;}
:Ditto
currently covered as:
When the consequent is bracketed it gets statement and line coverage:
Submitting a PR for this later today.