Skip to content

Commit 547d690

Browse files
committed
Add assembly if regression test
1 parent de73865 commit 547d690

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

test/assembly.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,11 @@ describe('generic expressions', () => {
2020
util.report(output.errors);
2121
});
2222

23+
it('should compile after instrumenting an assembly if statement', () => {
24+
const contract = util.getCode('assembly/if.sol');
25+
const info = getInstrumentedVersion(contract, filePath);
26+
const output = JSON.parse(solc.compile(util.codeToCompilerInput(info.contract)));
27+
util.report(output.errors);
28+
});
29+
2330
});

test/sources/assembly/if.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ contract Test {
1313
returns (bool _isWhitelisted)
1414
{
1515
bytes4 _signature = bytes4(keccak256("whitelisted(address)"));
16-
address _whitelistContract = getContractAddress("Whitelist");
16+
address _whitelistContract = address(this);
1717

1818
assembly {
1919
let _pointer := mload(0x40) // Set _pointer to free memory pointer

0 commit comments

Comments
 (0)