Add test for spending_key panic on short seed

This commit is contained in:
Jack Grigg 2019-09-17 23:58:14 +01:00
parent 9377b78b35
commit 450087e280
No known key found for this signature in database
GPG Key ID: 9E8255172BBF9898
1 changed files with 11 additions and 0 deletions

View File

@ -30,3 +30,14 @@ pub fn spending_key(seed: &[u8], coin_type: u32, account: u32) -> ExtendedSpendi
],
)
}
#[cfg(test)]
mod tests {
use super::spending_key;
#[test]
#[should_panic]
fn spending_key_panics_on_short_seed() {
let _ = spending_key(&[0; 31][..], 0, 0);
}
}