Split derivation path test into valid and invalid
Make the tests separate to make tests smaller and easier to read. There are no logic changes.
This commit is contained in:
parent
a419fc9aa6
commit
76dd6100a2
|
@ -1098,7 +1098,7 @@ mod tests {
|
|||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn parse_derivation_path() {
|
||||
fn parse_derivation_path_invalid() {
|
||||
assert!(matches!(
|
||||
"n/0'/0".parse::<DerivationPath>(),
|
||||
Err(ParseChildNumberError::ParseInt(..)),
|
||||
|
@ -1119,7 +1119,10 @@ mod tests {
|
|||
"2147483648".parse::<DerivationPath>(),
|
||||
Err(ParseChildNumberError::IndexOutOfRange(IndexOutOfRangeError { index: 2147483648 })),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_derivation_path_valid() {
|
||||
assert_eq!(DerivationPath::master(), "".parse::<DerivationPath>().unwrap());
|
||||
assert_eq!(DerivationPath::master(), DerivationPath::default());
|
||||
|
||||
|
|
Loading…
Reference in New Issue