remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
remix-project/remix-tests/examples/simple_storage_test.sol

28 lines
524 B

pragma solidity ^0.5.0;
7 years ago
import "./simple_storage.sol";
contract MyTest {
SimpleStorage storage foo;
uint storage i = 0;
7 years ago
function beforeAll() public {
7 years ago
foo = new SimpleStorage();
}
function beforeEach() public {
if (i == 1) {
foo.set(200);
}
i += 1;
}
function initialValueShouldBe100() public {
Assert.equal(foo.get(), 100, "initial value is not correct");
7 years ago
}
function initialValueShouldBe200() public {
Assert.equal(foo.get(), 200, "initial value is not correct");
7 years ago
}
}