Update tests for solc 0.7.x (#582)
parent
add4702034
commit
93214db07c
@ -1,23 +0,0 @@ |
||||
pragma solidity >=0.4.21 <0.6.0; |
||||
|
||||
contract Migrations { |
||||
address public owner; |
||||
uint public last_completed_migration; |
||||
|
||||
constructor() public { |
||||
owner = msg.sender; |
||||
} |
||||
|
||||
modifier restricted() { |
||||
if (msg.sender == owner) _; |
||||
} |
||||
|
||||
function setCompleted(uint completed) public restricted { |
||||
last_completed_migration = completed; |
||||
} |
||||
|
||||
function upgrade(address new_address) public restricted { |
||||
Migrations upgraded = Migrations(new_address); |
||||
upgraded.setCompleted(last_completed_migration); |
||||
} |
||||
} |
@ -1,3 +1,3 @@ |
||||
pragma solidity >=0.4.21 <0.6.0; |
||||
pragma solidity >=0.4.21 <0.8.0; |
||||
|
||||
import "package/AnotherImport.sol"; |
||||
|
@ -1,5 +0,0 @@ |
||||
const Migrations = artifacts.require("Migrations"); |
||||
|
||||
module.exports = function(deployer) { |
||||
deployer.deploy(Migrations); |
||||
}; |
2
test/integration/projects/import-paths/node_modules/package/NodeModulesImport.sol
generated
vendored
2
test/integration/projects/import-paths/node_modules/package/NodeModulesImport.sol
generated
vendored
@ -1,23 +0,0 @@ |
||||
pragma solidity >=0.4.21 <0.6.0; |
||||
|
||||
contract Migrations { |
||||
address public owner; |
||||
uint public last_completed_migration; |
||||
|
||||
constructor() public { |
||||
owner = msg.sender; |
||||
} |
||||
|
||||
modifier restricted() { |
||||
if (msg.sender == owner) _; |
||||
} |
||||
|
||||
function setCompleted(uint completed) public restricted { |
||||
last_completed_migration = completed; |
||||
} |
||||
|
||||
function upgrade(address new_address) public restricted { |
||||
Migrations upgraded = Migrations(new_address); |
||||
upgraded.setCompleted(last_completed_migration); |
||||
} |
||||
} |
@ -1,23 +0,0 @@ |
||||
pragma solidity >=0.4.21 <0.6.0; |
||||
|
||||
contract Migrations { |
||||
address public owner; |
||||
uint public last_completed_migration; |
||||
|
||||
constructor() public { |
||||
owner = msg.sender; |
||||
} |
||||
|
||||
modifier restricted() { |
||||
if (msg.sender == owner) _; |
||||
} |
||||
|
||||
function setCompleted(uint completed) public restricted { |
||||
last_completed_migration = completed; |
||||
} |
||||
|
||||
function upgrade(address new_address) public restricted { |
||||
Migrations upgraded = Migrations(new_address); |
||||
upgraded.setCompleted(last_completed_migration); |
||||
} |
||||
} |
@ -1,5 +0,0 @@ |
||||
const Migrations = artifacts.require("Migrations"); |
||||
|
||||
module.exports = function(deployer) { |
||||
deployer.deploy(Migrations); |
||||
}; |
@ -1,23 +0,0 @@ |
||||
pragma solidity >=0.4.21 <0.6.0; |
||||
|
||||
contract Migrations { |
||||
address public owner; |
||||
uint public last_completed_migration; |
||||
|
||||
constructor() public { |
||||
owner = msg.sender; |
||||
} |
||||
|
||||
modifier restricted() { |
||||
if (msg.sender == owner) _; |
||||
} |
||||
|
||||
function setCompleted(uint completed) public restricted { |
||||
last_completed_migration = completed; |
||||
} |
||||
|
||||
function upgrade(address new_address) public restricted { |
||||
Migrations upgraded = Migrations(new_address); |
||||
upgraded.setCompleted(last_completed_migration); |
||||
} |
||||
} |
@ -1,4 +1,4 @@ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
contract Empty { |
||||
} |
@ -1,12 +1,12 @@ |
||||
/** |
||||
* This contract contains a single function that is accessed using method.call |
||||
* With an unpatched testrpc it should not generate any events. |
||||
* With an unpatched testrpc it should not generate any events. |
||||
*/ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
contract OnlyCall { |
||||
function addTwo(uint val) public pure returns (uint){ |
||||
val = val + 2; |
||||
return val; |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,6 +1,6 @@ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
contract Owned { |
||||
constructor() public { owner = msg.sender; } |
||||
address owner; |
||||
} |
||||
} |
||||
|
@ -1,6 +1,6 @@ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
contract Test { |
||||
contract Test { |
||||
address a; |
||||
address a; |
||||
} |
||||
address a; |
||||
} |
||||
|
@ -1,11 +1,11 @@ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
contract Test { |
||||
function a() public { |
||||
bool x = false; |
||||
bool y = false; |
||||
(x) |
||||
? y = false |
||||
(x) |
||||
? y = false |
||||
: y = false; |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,11 +1,11 @@ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
contract Test { |
||||
function a() public { |
||||
bool x = true; |
||||
bool y = false; |
||||
(x) |
||||
? y = false |
||||
(x) |
||||
? y = false |
||||
: y = false; |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,5 +1,5 @@ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
contract Test { |
||||
function abstractFn(uint x) public; |
||||
} |
||||
abstract contract Test { |
||||
function abstractFn(uint x) virtual public; |
||||
} |
||||
|
@ -1,12 +1,11 @@ |
||||
pragma solidity ^0.5.0; |
||||
|
||||
// This is for a test that verifies solcover can instrument a |
||||
pragma solidity ^0.7.0; |
||||
// This is for a test that verifies solcover can instrument a |
||||
// chained constructor/method call invoked by the new operator. |
||||
contract Chainable { |
||||
function chainWith(uint y, uint z) public {} |
||||
} |
||||
contract Test { |
||||
function a() public { |
||||
new Chainable().chainWith(3, 4); |
||||
new Chainable().chainWith(3, 4); |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,12 +1,12 @@ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
// This is for a test that verifies solcover can instrument a |
||||
// This is for a test that verifies solcover can instrument a |
||||
// another kind of long CallExpression chain |
||||
contract Test { |
||||
function paySomeone(address x, address y) public payable { |
||||
} |
||||
|
||||
function a() public payable { |
||||
Test(0x00).paySomeone.value(msg.value)(0x0000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000); |
||||
Test(0x00).paySomeone{value: msg.value}(0x0000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000); |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,11 +1,11 @@ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
// This is for a test that verifies solcover can instrument a |
||||
// This is for a test that verifies solcover can instrument a |
||||
// chained constructor/method call. |
||||
contract Test { |
||||
function chainWith(uint y, uint z) public {} |
||||
|
||||
|
||||
function a() public { |
||||
Test(0x00).chainWith(3, 4); |
||||
Test(0x00).chainWith(3, 4); |
||||
} |
||||
} |
||||
|
@ -1,5 +1,5 @@ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
contract Test { |
||||
contract Test { |
||||
function emptyBody(uint x) public {} |
||||
} |
||||
|
@ -1,9 +1,9 @@ |
||||
pragma solidity ^0.5.0; |
||||
pragma solidity ^0.7.0; |
||||
|
||||
// This test verifies that an invoked function gets logged as a statement |
||||
contract Test { |
||||
contract Test { |
||||
function loggedAsStatement(uint x) public {} |
||||
function a() public { |
||||
loggedAsStatement(5); |
||||
} |
||||
} |
||||
} |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue