Skip to content

Commit 2924f6e

Browse files
test: add IllegalContractName aac as unreachable, #6627
1 parent 5a1b8c3 commit 2924f6e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

stackslib/src/chainstate/tests/parse_tests.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ fn variant_coverage_report(variant: ParseErrors) {
4444
Ignored,
4545
// Covered by consensus tests
4646
Tested,
47-
48-
TODO,
4947
}
5048

5149
use ParseErrors::*;
@@ -57,7 +55,7 @@ fn variant_coverage_report(variant: ParseErrors) {
5755
CostBalanceExceeded(_, _) => Unreachable_Functionally, // due to epoch runtime epoch limits configuration.
5856
MemoryBalanceExceeded(_, _) => Unreachable_NotUsed,
5957
CostComputationFailed(_) => Unreachable_ExpectLike,
60-
ExecutionTimeExpired => Unreachable_NotUsed, // To re-check
58+
ExecutionTimeExpired => Unreachable_NotUsed,
6159

6260
TooManyExpressions => Unreachable_ExpectLike,
6361
ExpressionStackDepthTooDeep => Tested,
@@ -78,17 +76,17 @@ fn variant_coverage_report(variant: ParseErrors) {
7876
ExpectedTraitIdentifier => Tested,
7977
ExpectedWhitespace => Tested,
8078
FailedParsingUIntValue(_) => Tested,
81-
IllegalTraitName(_) => Unreachable_Functionally, // prevented by Lexer checks returning lexer errors
79+
IllegalTraitName(_) => Unreachable_Functionally, // prevented by Lexer checks returning `Lexer` variant
8280
InvalidPrincipalLiteral => Tested,
8381
InvalidBuffer => Unreachable_Functionally, // prevented by both Lexer checks, and StacksTransaction::consensus_serialize with MAX_TRASACTION_LEN (panic)
8482
NameTooLong(_) => Tested,
8583
UnexpectedToken(_) => Tested,
8684
TupleColonExpectedv2 => Tested,
8785
TupleCommaExpectedv2 => Tested,
8886
TupleValueExpected => Tested,
89-
IllegalClarityName(_) => Unreachable_Functionally, // prevented by Lexer checks returning lexer errors
87+
IllegalClarityName(_) => Unreachable_Functionally, // prevented by Lexer checks returning `Lexer` variant
9088
IllegalASCIIString(_) => Tested,
91-
IllegalContractName(_) => TODO,
89+
IllegalContractName(_) => Unreachable_Functionally, // prevented by Lexer checks returning `Lexer` variant or Parser by MAX_CONTRACT_NAME_LEN returning `ContractNameTooLong` variant
9290
NoteToMatchThis(_) => Tested,
9391
UnexpectedParserFailure => Unreachable_ExpectLike,
9492
InterpreterFailure => Unreachable_ExpectLike, // currently cause block rejection

0 commit comments

Comments
 (0)