alexfertel / bulloak

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

Bulloak scaffold panics when `,` in the leaf #58

Closed matmilbury closed 4 months ago

matmilbury commented 4 months ago

Given the following tree:

DynamicIds_createMintId
└── it hashes the payload, zeros last 16 bytes and returns a number

Actual result: bulloak scaffold panics:

thread 'main' panicked at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bulloak-0.6.3/src/scaffold/mod.rs:119:38:
should format the emitted solidity code: Fmt(Error)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected result: bulloak removes the , character(s) and generates test_HashesThePayloadZerosLast16BytesAndReturnsANumber test.

bulloak 0.6.4

alexfertel commented 4 months ago

Okay, fixed in v0.6.5! This time I brought a crate in so that now we use the same rules as solang-parser for identifiers. Hopefully, bugs of this kind are no longer possible 🤞🏻

Lmk if you find anything else!