alexfertel / bulloak

A Solidity test generator based on the Branching Tree Technique.
Apache License 2.0
225 stars 13 forks source link

feature request: automated tree file formatting #46

Open stevenvaleri opened 9 months ago

stevenvaleri commented 9 months ago

Automatically convert from

VS Code has a nice tree generator: Ascii Tree Generator plug in, but even using that can be a bit tedious converting to and from tree syntax. Bulloak doing this conversion for you would be quite nice.

The plugin allows you to use hashtags for tree structures and automatically converts it into the nice tree.

# when there is a condition
## it should revert
# when there isn't the condition
## when sender is authorized
### it should update the state
matmilbury commented 5 months ago

IMO this would be more readable:

HashPairTest
  It should never revert.
  When first arg is smaller than second arg
    It should match the result of `keccak256(abi.encodePacked(a,b))`.
  When first arg is bigger than second arg
    It should match the result of `keccak256(abi.encodePacked(b,a))`.

than that:

HashPairTest
# It should never revert.
# When first arg is smaller than second arg
## It should match the result of `keccak256(abi.encodePacked(a,b))`.
# When first arg is bigger than second arg
## It should match the result of `keccak256(abi.encodePacked(b,a))`.

Essentially if we could have bulloak tree working like thisEseconFargA43match%20the%20resulBof%20%60-.A4WheEfirsBarg%20is%200keccak256%7Babi.encodePacked%7B34IBshoulF4%20%207!false8er%209%7D%7D%60A%5CnBt%20Csource!En%20Fd%20G8tha%01GFECBA987430-), all pain points related to the tree formatting would be gone :sparkles: