Skip to content

Commit

Permalink
Fix ics23 spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
seanchen1991 committed Sep 19, 2024
1 parent d1ac0d2 commit 919c7ae
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions ibc-core/ics23-commitment/types/src/specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@ mod tests {
#[case(0, 0)]
#[case(2, 2)]
#[case(5, 6)]
#[should_panic(expected = "InvalidRange")]
#[should_panic(expected = "InvalidRawData")]
#[case(-3,3)]
#[should_panic(expected = "InvalidRange")]
#[should_panic(expected = "InvalidRawData")]
#[case(2,-6)]
#[should_panic(expected = "InvalidRange")]
#[should_panic(expected = "InvalidRawData")]
#[case(-2,-6)]
#[should_panic(expected = "InvalidRange")]
#[should_panic(expected = "InvalidRawData")]
#[case(-6,-2)]
#[should_panic(expected = "InvalidRange")]
#[should_panic(expected = "InvalidRawData")]
#[case(5, 3)]
fn test_proof_specs_try_from(#[case] min_depth: i32, #[case] max_depth: i32) {
let raw_proof_spec = RawProofSpec {
Expand All @@ -230,15 +230,15 @@ mod tests {
#[case(0, 0)]
#[case(1, 2)]
#[case(2, 2)]
#[should_panic(expected = "InvalidRange")]
#[should_panic(expected = "InvalidRawData")]
#[case(2, 1)]
#[should_panic(expected = "InvalidRange")]
#[should_panic(expected = "InvalidRawData")]
#[case(-2,1)]
#[should_panic(expected = "InvalidRange")]
#[should_panic(expected = "InvalidRawData")]
#[case(2,-1)]
#[should_panic(expected = "InvalidRange")]
#[should_panic(expected = "InvalidRawData")]
#[case(-2,-1)]
#[should_panic(expected = "InvalidRange")]
#[should_panic(expected = "InvalidRawData")]
#[case(-1,-2)]
fn test_inner_specs_try_from(#[case] min_prefix_length: i32, #[case] max_prefix_length: i32) {
let raw_inner_spec = RawInnerSpec {
Expand All @@ -255,21 +255,21 @@ mod tests {
#[rstest]
#[case(0, 0, 0, 0)]
#[case(9, 9, 9, 8)]
#[should_panic(expected = "InvalidHashOp")]
#[should_panic(expected = "leaf op hash")]
#[case(-1, 4, 4, 4)]
#[should_panic(expected = "InvalidHashOp")]
#[should_panic(expected = "leaf op hash")]
#[case(10, 4, 4, 4)]
#[should_panic(expected = "InvalidHashOp")]
#[should_panic(expected = "leaf op prehash key")]
#[case(4, -1, 4, 4)]
#[should_panic(expected = "InvalidHashOp")]
#[should_panic(expected = "leaf op prehash key")]
#[case(4, 10, 4, 4)]
#[should_panic(expected = "InvalidHashOp")]
#[should_panic(expected = "leaf op prehash value")]
#[case(4, 4, -1, 4)]
#[should_panic(expected = "InvalidHashOp")]
#[should_panic(expected = "leaf op prehash value")]
#[case(4, 4, 10, 4)]
#[should_panic(expected = "InvalidLengthOp")]
#[should_panic(expected = "leaf op length")]
#[case(4, 4, 4, -1)]
#[should_panic(expected = "InvalidLengthOp")]
#[should_panic(expected = "leaf op length")]
#[case(4, 4, 4, 9)]
fn test_leaf_op_try_from(
#[case] hash: i32,
Expand Down

0 comments on commit 919c7ae

Please sign in to comment.