From 015fb1be3b74c406ed7b7ff158634f4e6fa6dcef Mon Sep 17 00:00:00 2001 From: jamillambert Date: Tue, 3 Jun 2025 11:11:29 +0100 Subject: [PATCH] Split invalid derivation path test The test tests two sperate things. Split the test into invalid path and out of range. --- bitcoin/src/bip32.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bitcoin/src/bip32.rs b/bitcoin/src/bip32.rs index 8854e28d5..316419ed3 100644 --- a/bitcoin/src/bip32.rs +++ b/bitcoin/src/bip32.rs @@ -1098,7 +1098,7 @@ mod tests { use super::*; #[test] - fn parse_derivation_path_invalid() { + fn parse_derivation_path_invalid_format() { assert!(matches!( "n/0'/0".parse::(), Err(ParseChildNumberError::ParseInt(..)), @@ -1115,6 +1115,10 @@ mod tests { "0h/0x".parse::(), Err(ParseChildNumberError::ParseInt(..)), )); + } + + #[test] + fn parse_derivation_path_out_of_range() { assert_eq!( "2147483648".parse::(), Err(ParseChildNumberError::IndexOutOfRange(IndexOutOfRangeError { index: 2147483648 })),