Add assembly if regression test

pull/339/head
cgewecke 5 years ago
parent de73865eb3
commit 547d6906c2
  1. 7
      test/assembly.js
  2. 2
      test/sources/assembly/if.sol

@ -20,4 +20,11 @@ describe('generic expressions', () => {
util.report(output.errors);
});
it('should compile after instrumenting an assembly if statement', () => {
const contract = util.getCode('assembly/if.sol');
const info = getInstrumentedVersion(contract, filePath);
const output = JSON.parse(solc.compile(util.codeToCompilerInput(info.contract)));
util.report(output.errors);
});
});

@ -13,7 +13,7 @@ contract Test {
returns (bool _isWhitelisted)
{
bytes4 _signature = bytes4(keccak256("whitelisted(address)"));
address _whitelistContract = getContractAddress("Whitelist");
address _whitelistContract = address(this);
assembly {
let _pointer := mload(0x40) // Set _pointer to free memory pointer

Loading…
Cancel
Save