starknet_transaction_prover: make RPC error spec test exhaustive via enum#14051
starknet_transaction_prover: make RPC error spec test exhaustive via enum#14051avi-starkware wants to merge 1 commit into
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryLow Risk Overview Each variant maps to a spec key via Reviewed by Cursor Bugbot for commit dd1dfa1. Bugbot is set up for automated code reviews on this repo. Configure here. |
b062874 to
1d6f06e
Compare
3457808 to
ac2d30f
Compare
1d6f06e to
6377a5b
Compare
ac2d30f to
cb3ebef
Compare
6377a5b to
6a4087a
Compare
cb3ebef to
93accf4
Compare
6a4087a to
44827d2
Compare
…enum Replaces the ad-hoc test_cases vec in test_error_responses_match_spec with a KnownRpcError test-only enum whose spec_key and sample_error_object matches are exhaustive — adding a new variant forces both matches to be updated, and the bidirectional set-equality check between KnownRpcError::ALL and the spec's components/errors keys guarantees the enum and the OpenRPC spec stay in sync. Drops the pre-existing 'TODO(Avi): Add an error enum to make this test exhaustive' tag.
93accf4 to
dd1dfa1
Compare

Replaces the ad-hoc test_cases vec in test_error_responses_match_spec
with a KnownRpcError test-only enum whose spec_key and
sample_error_object matches are exhaustive — adding a new variant
forces both matches to be updated, and the bidirectional set-equality
check between KnownRpcError::ALL and the spec's components/errors
keys guarantees the enum and the OpenRPC spec stay in sync.
Drops the pre-existing 'TODO(Avi): Add an error enum to make this
test exhaustive' tag.