You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
874 B
23 lines
874 B
/* eslint-env node, mocha */
|
|
|
|
const solc = require('solc');
|
|
const getInstrumentedVersion = require('./../lib/instrumentSolidity.js');
|
|
const util = require('./util/util.js');
|
|
|
|
describe('return statements', () => {
|
|
before(() => process.env.NO_EVENTS_FILTER = true);
|
|
|
|
it('should compile after instrumenting function that returns true', () => {
|
|
const contract = util.getCode('return/return.sol');
|
|
const info = getInstrumentedVersion(contract, 'test.sol');
|
|
const output = solc.compile(info.contract, 1);
|
|
util.report(output.errors);
|
|
});
|
|
|
|
it('should compile after instrumenting function that returns without specifying val (null)', () => {
|
|
const contract = util.getCode('return/return-null.sol');
|
|
const info = getInstrumentedVersion(contract, 'test.sol');
|
|
const output = solc.compile(info.contract, 1);
|
|
util.report(output.errors);
|
|
});
|
|
});
|
|
|