Skip to content

Instantly share code, notes, and snippets.

@liu-peiwen
Created February 2, 2019 15:13
Show Gist options
  • Save liu-peiwen/977fdc05726989deeb24fc988d226c1f to your computer and use it in GitHub Desktop.
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=
pragma solidity 0.4.25;
contract SimpleStorage {
uint numChicken;
function set(uint x) public {
numChicken = x;
}
function get() public constant returns (uint) {
return numChicken;
}
}
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