From ca1e23b2bb2c10411dfa27cde01cf28414991d70 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 28 Mar 2022 19:36:42 -0700 Subject: [PATCH] Stop injecting statement coverage into conditionals --- lib/parse.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/parse.js b/lib/parse.js index e4128ba..210633c 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -33,16 +33,14 @@ parse.BinaryOperation = function(contract, expression, skipStatementRegistry) { // Free-floating ternary conditional if (expression.left && expression.left.type === 'Conditional'){ parse[expression.left.type](contract, expression.left, true); - register.statement(contract, expression); // Ternary conditional assignment } else if (expression.right && expression.right.type === 'Conditional'){ parse[expression.right.type](contract, expression.right, true); - register.statement(contract, expression); // Regular binary operation } else if(!skipStatementRegistry){ - register.statement(contract, expression); + // noop // LogicalOR condition search... } else { @@ -91,7 +89,7 @@ parse.FunctionCall = function(contract, expression, skipStatementRegistry) { parse.Conditional = function(contract, expression, skipStatementRegistry) { parse[expression.condition.type] && - parse[expression.condition.type](contract, expression.condition, skipStatementRegistry); + parse[expression.condition.type](contract, expression.condition, true); register.conditional(contract, expression); };