Split invalid derivation path test
The test tests two sperate things. Split the test into invalid path and out of range.
This commit is contained in:
parent
76dd6100a2
commit
015fb1be3b
|
@ -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::<DerivationPath>(),
|
||||
Err(ParseChildNumberError::ParseInt(..)),
|
||||
|
@ -1115,6 +1115,10 @@ mod tests {
|
|||
"0h/0x".parse::<DerivationPath>(),
|
||||
Err(ParseChildNumberError::ParseInt(..)),
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_derivation_path_out_of_range() {
|
||||
assert_eq!(
|
||||
"2147483648".parse::<DerivationPath>(),
|
||||
Err(ParseChildNumberError::IndexOutOfRange(IndexOutOfRangeError { index: 2147483648 })),
|
||||
|
|
Loading…
Reference in New Issue