From c01fd11a93d842c82539c6d58257c0ca731f5e24 Mon Sep 17 00:00:00 2001 From: capossele Date: Thu, 1 Feb 2024 22:34:25 +0000 Subject: [PATCH] add test case with zero --- tests/BonsaiStarter.t.sol | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/BonsaiStarter.t.sol b/tests/BonsaiStarter.t.sol index c1aad6fd..ea18d744 100644 --- a/tests/BonsaiStarter.t.sol +++ b/tests/BonsaiStarter.t.sol @@ -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));