Skip to content

Commit

Permalink
feat: support natspec annotations (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
daejunpark committed Jul 21, 2023
1 parent 9233311 commit 0b92223
Show file tree
Hide file tree
Showing 12 changed files with 563 additions and 288 deletions.
3 changes: 3 additions & 0 deletions examples/test/Example.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity >=0.8.0 <0.9.0;

import "../src/Example.sol";

/// @custom:halmos --solver-fresh
contract ExampleTest is Example {

function testTotalPriceBuggy(uint96 price, uint32 quantity) public pure {
Expand All @@ -27,6 +28,7 @@ contract ExampleTest is Example {
assert(result1 == result2);
}

/// @custom:halmos --loop 256
function testIsPowerOfTwo(uint256 x) public pure {
bool result1 = isPowerOfTwo(x);
bool result2 = false;
Expand All @@ -39,6 +41,7 @@ contract ExampleTest is Example {
assert(result1 == result2);
}

/// @custom:halmos --loop 256
function testIsPowerOfTwoEq(uint x) public pure {
bool result1 = isPowerOfTwo(x);
bool result2 = isPowerOfTwoIter(x);
Expand Down
Loading

0 comments on commit 0b92223

Please sign in to comment.