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/libs/remix-tests/tests/examples_0/assert_greaterThan_test.sol

28 lines
925 B

import "remix_tests.sol"; // this import is automatically injected by Remix.
contract AssertGreaterThanTest {
function greaterThanUintPassTest() public {
Assert.greaterThan(uint(5), uint(2), "greaterThanUintPassTest passes");
}
function greaterThanUintFailTest() public {
Assert.greaterThan(uint(1), uint(4), "greaterThanUintFailTest fails");
}
function greaterThanIntPassTest() public {
Assert.greaterThan(int(-1), int(-2), "greaterThanIntPassTest passes");
}
function greaterThanIntFailTest() public {
Assert.greaterThan(int(-1), int(1), "greaterThanIntFailTest fails");
}
function greaterThanUintIntPassTest() public {
Assert.greaterThan(uint(1), int(-2), "greaterThanUintIntPassTest passes");
}
function greaterThanUintIntFailTest() public {
Assert.greaterThan(uint(1), int(2), "greaterThanUintIntFailTest fails");
}
}