Skip to content

Commit

Permalink
Merge pull request #428 from ethereum/abstract-test
Browse files Browse the repository at this point in the history
Fix test for abstract contracts on 0.6.0
  • Loading branch information
leonardoalt committed Dec 9, 2019
2 parents 33fb32c + ec7c5da commit a96ff26
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,12 @@ function runTests (solc, versionText) {
}

var isVersion6 = semver.gt(solc.semver(), '0.5.99');
var source;
if (isVersion6) {
source = 'abstract contract C { function f() public virtual; }';
} else {
source = 'contract C { function f() public; }';
}

var input = {
'language': 'Solidity',
Expand All @@ -525,7 +531,7 @@ function runTests (solc, versionText) {
},
'sources': {
'c.sol': {
'content': (isVersion6 ? 'abstract ' : '') + 'contract C { function f() public; }'
'content': source
}
}
};
Expand Down

0 comments on commit a96ff26

Please sign in to comment.