Created
May 2, 2022 19:44
-
-
Save StErMi/e9884269d5adcacee7dfa8ac655c8108 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: Unlicense | |
pragma solidity ^0.8.13; | |
contract Require { | |
event Logme(); | |
constructor() {} | |
function test1(uint256 r) external { | |
require(r != 0, "nope"); | |
emit Logme(); | |
} | |
function test2(uint256 r) external { | |
require(r > 0, "nope"); | |
emit Logme(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: Unlicense | |
pragma solidity ^0.8.13; | |
import "forge-std/Test.sol"; | |
import "../src/Require.sol"; | |
contract TestRequire is Test { | |
Require c; | |
function setUp() public { | |
c = new Require(); | |
} | |
function test1() external { | |
c.test1(1); | |
} | |
function test2() external { | |
c.test2(1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment