Support solc v0.4.x (#877)
parent
12436cc14d
commit
a20fbf7b11
@ -1,4 +1,8 @@ |
||||
// solc v0.4.21 will not compile using instrumentation technique for viaIR
|
||||
const skipFiles = process.env.VIA_IR ? ["ContractD1.sol"] : []; |
||||
|
||||
module.exports = { |
||||
"silent": false, |
||||
"istanbulReporter": [ "json-summary", "text"] |
||||
"istanbulReporter": [ "json-summary", "text"], |
||||
"skipFiles": skipFiles |
||||
} |
||||
|
@ -0,0 +1,15 @@ |
||||
pragma solidity 0.4.21; |
||||
|
||||
|
||||
contract ContractD { |
||||
uint x; |
||||
|
||||
function sendFn() public { |
||||
x = 5; |
||||
} |
||||
|
||||
function callFn() public pure returns (uint){ |
||||
uint y = 5; |
||||
return y; |
||||
} |
||||
} |
@ -0,0 +1,20 @@ |
||||
const ContractD = artifacts.require("ContractD"); |
||||
|
||||
contract("contractd", function(accounts) { |
||||
let instance; |
||||
|
||||
before(async () => instance = await ContractD.new()) |
||||
|
||||
it('sends', async function(){ |
||||
await instance.sendFn(); |
||||
}); |
||||
|
||||
it('calls', async function(){ |
||||
await instance.callFn(); |
||||
}) |
||||
|
||||
it('sends', async function(){ |
||||
await instance.sendFn(); |
||||
}); |
||||
|
||||
}); |
Loading…
Reference in new issue