Remove newline condition for statement coverage

uport
cgewecke 8 years ago
parent f0c5f08f09
commit fe151dacba
  1. 5
      instrumentSolidity.js

@ -74,11 +74,8 @@ module.exports = function(contract, fileName, instrumentingActive){
function instrumentStatement(expression){
canCover = false;
//Can only instrument here if this is a self-contained statement
//So if this is the start of the line, we're good
if ( contract.slice(contract.slice(0,expression.start).lastIndexOf('\n'), expression.start).trim().length===0 ){
canCover=true;
}
//If it's preceeded by a '{', we're good
if ( contract.slice(contract.slice(0,expression.start).lastIndexOf('{')+1, expression.start).trim().length===0 ){
canCover=true;

Loading…
Cancel
Save