Audit scope: whole-repo, commit 7aa85a4
Dimension 4 (code quality) · low
Locations:
test/src/lib/LibCodeGen.filePrefix.t.sol:15-17test/src/lib/LibHexString.bytesToHex.t.sol:74-79
Path note: PR #56 is open and unmerged as of filing. On main today these files are test/lib/LibCodeGen.filePrefix.t.sol and test/lib/LibHexString.bytesToHex.t.sol; they become test/src/lib/... after #56 merges.
Problem
testFilePrefixNamesNoScript asserts the prefix contains no .sol;
testFilePrefixExact (19-32) pins the prefix byte for byte, so nothing can fail
the first without failing the second. testBytesToHexHasNoPrefix asserts no x
in the output; testBytesToHexCharset (89-95) asserts every byte is in
[0-9a-f], which excludes x — and both spend 2048 fuzz runs. Neither test can
discriminate anything its sibling does not.
Proposed fix
Delete both bodies and fold their intent into the surviving sibling's
docstring (why no script may be named; why a surviving prefix character is
fatal).
Audit scope: whole-repo, commit 7aa85a4Dimension 4 (code quality) · low
Locations:
test/src/lib/LibCodeGen.filePrefix.t.sol:15-17test/src/lib/LibHexString.bytesToHex.t.sol:74-79Problem
testFilePrefixNamesNoScriptasserts the prefix contains no.sol;testFilePrefixExact(19-32) pins the prefix byte for byte, so nothing can failthe first without failing the second.
testBytesToHexHasNoPrefixasserts noxin the output;
testBytesToHexCharset(89-95) asserts every byte is in[0-9a-f], which excludesx— and both spend 2048 fuzz runs. Neither test candiscriminate anything its sibling does not.
Proposed fix
Delete both bodies and fold their intent into the surviving sibling's
docstring (why no script may be named; why a surviving prefix character is
fatal).