Created
February 2, 2019 15:13
-
-
Save liu-peiwen/977fdc05726989deeb24fc988d226c1f to your computer and use it in GitHub Desktop.
Created using BlockTEST remix-ide: Realtime Ethereum Contract Compiler. Load this file by pasting this gists URL or ID at http://ec2-3-86-232-99.compute-1.amazonaws.com:8080/#version=soljson-v0.4.25+commit.59dbf8f1.js?user_id&optimize=false&gist=
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
pragma solidity 0.4.25; | |
contract SimpleStorage { | |
uint numChicken; | |
function set(uint x) public { | |
numChicken = x; | |
} | |
function get() public constant returns (uint) { | |
return numChicken; | |
} | |
} |
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
pragma solidity 0.4.25; | |
import "./SimpleStorage.sol"; | |
contract TestSimpleStorage is SimpleStorage { | |
function test1() public { | |
set(56); | |
assert(get() == 56); | |
} | |
function test2() public { | |
set(89); | |
assert(get() == 89); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment