Skip to content

Commit

Permalink
add test case with zero
Browse files Browse the repository at this point in the history
  • Loading branch information
capossele committed Feb 1, 2024
1 parent 4543230 commit c01fd11
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/BonsaiStarter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,18 @@ contract EvenNumberTest is BonsaiTest {
assertEq(evenNumber.get(), 0);
}

function test_Set() public {
function test_Set_Even() public {
set(12345678);
}

function testFail_Set() public {
function testFail_Set_Odd() public {
set(123456789);
}

function testFail_Set_Zero() public {
set(0);
}

function set(uint256 number) internal {
(bytes memory journal, bytes32 post_state_digest, bytes memory seal) =
queryImageOutputAndSeal(imageId, abi.encode(number));
Expand Down

0 comments on commit c01fd11

Please sign in to comment.