Remove newline from branchCoverage

Messes up ternary statements
uport
Alex Rea 8 years ago
parent 6f433e1e47
commit 22cdaa16ec
  1. 2
      instrumentSolidity.js

@ -383,7 +383,7 @@ module.exports = function(pathToFile, instrumentingActive){
}else if (injection.type==='callFunctionEvent'){
contract = contract.slice(0, injectionPoint) + "FunctionCoverage('" + fileName + "'," + injection.fnId + ");\n" + contract.slice(injectionPoint);
}else if (injection.type==='callBranchEvent'){
contract = contract.slice(0, injectionPoint) + (injection.openBracket? '{' : '') + "BranchCoverage('" + fileName + "'," + injection.branchId + "," + injection.locationIdx + ")" + (injection.comma ? ',' : ";") + "\n" + contract.slice(injectionPoint);
contract = contract.slice(0, injectionPoint) + (injection.openBracket? '{' : '') + "BranchCoverage('" + fileName + "'," + injection.branchId + "," + injection.locationIdx + ")" + (injection.comma ? ',' : ";") + contract.slice(injectionPoint);
}else if (injection.type==='callEmptyBranchEvent'){
contract = contract.slice(0, injectionPoint) + "else { BranchCoverage('" + fileName + "'," + injection.branchId + "," + injection.locationIdx + ");}\n" + contract.slice(injectionPoint);
}else if (injection.type==='openParen'){

Loading…
Cancel
Save