From 20d357971ada4cc5b714e12d7726873ffaa0370b Mon Sep 17 00:00:00 2001 From: cgewecke Date: Tue, 23 Jul 2019 17:46:49 -0700 Subject: [PATCH] Update returns tests (move to generic expressions) --- test/units/expressions.js | 7 ++++++- test/units/return.js | 14 -------------- 2 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 test/units/return.js diff --git a/test/units/expressions.js b/test/units/expressions.js index c6c8619..b007c29 100644 --- a/test/units/expressions.js +++ b/test/units/expressions.js @@ -1,7 +1,7 @@ const assert = require('assert'); const util = require('./../util/util.js'); -describe('generic expressions', () => { +describe('generic expressions / misc', () => { it('should compile after instrumenting a single binary expression', () => { const info = util.instrumentAndCompile('expressions/single-binary-expression'); util.report(info.solcOutput.errors); @@ -11,4 +11,9 @@ describe('generic expressions', () => { const info = util.instrumentAndCompile('expressions/new-expression'); util.report(info.solcOutput.errors); }); + + it('should compile after instrumenting function that returns true', () => { + const info = util.instrumentAndCompile('return/return'); + util.report(info.solcOutput.errors); + }); }); diff --git a/test/units/return.js b/test/units/return.js deleted file mode 100644 index b8bcaf8..0000000 --- a/test/units/return.js +++ /dev/null @@ -1,14 +0,0 @@ -/* eslint-env node, mocha */ - -/*const solc = require('solc'); -const getInstrumentedVersion = require('./../lib/instrumentSolidity.js'); -const util = require('./util/util.js'); - -describe('return statements', () => { - it('should compile after instrumenting function that returns true', () => { - const contract = util.getCode('return/return.sol'); - const info = getInstrumentedVersion(contract, 'test.sol'); - const output = JSON.parse(solc.compile(util.codeToCompilerInput(info.contract))); - util.report(output.errors); - }); -});*/