Update tests for solc 0.7.x (#582)
parent
bdc6f91275
commit
7f85a0c2c8
@ -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"; |
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 { |
contract Empty { |
||||||
} |
} |
@ -1,12 +1,12 @@ |
|||||||
/** |
/** |
||||||
* This contract contains a single function that is accessed using method.call |
* 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 { |
contract OnlyCall { |
||||||
function addTwo(uint val) public pure returns (uint){ |
function addTwo(uint val) public pure returns (uint){ |
||||||
val = val + 2; |
val = val + 2; |
||||||
return val; |
return val; |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,6 +1,6 @@ |
|||||||
pragma solidity ^0.5.0; |
pragma solidity ^0.7.0; |
||||||
|
|
||||||
contract Owned { |
contract Owned { |
||||||
constructor() public { owner = msg.sender; } |
constructor() public { owner = msg.sender; } |
||||||
address owner; |
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; |
address a; |
||||||
} |
} |
||||||
|
@ -1,11 +1,11 @@ |
|||||||
pragma solidity ^0.5.0; |
pragma solidity ^0.7.0; |
||||||
|
|
||||||
contract Test { |
contract Test { |
||||||
function a() public { |
function a() public { |
||||||
bool x = false; |
bool x = false; |
||||||
bool y = false; |
bool y = false; |
||||||
(x) |
(x) |
||||||
? y = false |
? y = false |
||||||
: y = false; |
: y = false; |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,11 +1,11 @@ |
|||||||
pragma solidity ^0.5.0; |
pragma solidity ^0.7.0; |
||||||
|
|
||||||
contract Test { |
contract Test { |
||||||
function a() public { |
function a() public { |
||||||
bool x = true; |
bool x = true; |
||||||
bool y = false; |
bool y = false; |
||||||
(x) |
(x) |
||||||
? y = false |
? y = false |
||||||
: y = false; |
: y = false; |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,5 +1,5 @@ |
|||||||
pragma solidity ^0.5.0; |
pragma solidity ^0.7.0; |
||||||
|
|
||||||
contract Test { |
abstract contract Test { |
||||||
function abstractFn(uint x) public; |
function abstractFn(uint x) virtual public; |
||||||
} |
} |
||||||
|
@ -1,12 +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 invoked by the new operator. |
// chained constructor/method call invoked by the new operator. |
||||||
contract Chainable { |
contract Chainable { |
||||||
function chainWith(uint y, uint z) public {} |
function chainWith(uint y, uint z) public {} |
||||||
} |
} |
||||||
contract Test { |
contract Test { |
||||||
function a() public { |
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 |
// another kind of long CallExpression chain |
||||||
contract Test { |
contract Test { |
||||||
function paySomeone(address x, address y) public payable { |
function paySomeone(address x, address y) public payable { |
||||||
} |
} |
||||||
|
|
||||||
function a() 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. |
// chained constructor/method call. |
||||||
contract Test { |
contract Test { |
||||||
function chainWith(uint y, uint z) public {} |
function chainWith(uint y, uint z) public {} |
||||||
|
|
||||||
function a() 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 {} |
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 |
// This test verifies that an invoked function gets logged as a statement |
||||||
contract Test { |
contract Test { |
||||||
function loggedAsStatement(uint x) public {} |
function loggedAsStatement(uint x) public {} |
||||||
function a() public { |
function a() public { |
||||||
loggedAsStatement(5); |
loggedAsStatement(5); |
||||||
} |
} |
||||||
} |
} |
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue