From fe151dacba8990245f2e90e5c029ca10b026ad2f Mon Sep 17 00:00:00 2001 From: cgewecke Date: Fri, 9 Dec 2016 09:11:05 -0800 Subject: [PATCH] Remove newline condition for statement coverage --- instrumentSolidity.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/instrumentSolidity.js b/instrumentSolidity.js index 506edb7..27d4c62 100644 --- a/instrumentSolidity.js +++ b/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;