Code coverage for Solidity smart-contracts
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.
solidity-coverage/test/return.js

20 lines
790 B

8 years ago
var solc = require('solc');
var getInstrumentedVersion = require('./../instrumentSolidity.js');
var util = require('./util/util.js');
describe('return statements', function(){
it('should compile after instrumenting function that returns true',function(){
var contract = util.getCode('return/return.sol');
var info = getInstrumentedVersion(contract, "test.sol", true);
var output = solc.compile(info.contract, 1);
util.report(output.errors);
})
it('should compile after instrumenting function that returns without specifying val (null)',function(){
var contract = util.getCode('return/return-null.sol');
var info = getInstrumentedVersion(contract, "test.sol", true);
var output = solc.compile(info.contract, 1);
util.report(output.errors);
})
})