Fix nit in bit count support and add test for that

This commit is contained in:
Steven Roose 2020-07-20 13:47:19 +02:00
parent 32daa49834
commit dabbdce4d5
No known key found for this signature in database
GPG Key ID: 2F2A88D7F8D68E87
1 changed files with 9 additions and 1 deletions

View File

@ -102,7 +102,7 @@ impl error::Error for Error {
/// mnemonic from all the supported languages. (Languages have to be explicitly enabled using
/// the Cargo features.)
///
/// Supported number of words are 6, 12, 18 and 24.
/// Supported number of words are 12, 18 and 24.
#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct Mnemonic(String);
// The content of the mnemonic is ensured to be NFKD-normalized UTF-8.
@ -367,6 +367,14 @@ mod tests {
use bitcoin_hashes::hex::FromHex;
#[cfg(feature = "rand")]
#[test]
fn test_bit_counts() {
let _ = Mnemonic::generate(12).unwrap();
let _ = Mnemonic::generate(18).unwrap();
let _ = Mnemonic::generate(24).unwrap();
}
#[cfg(feature = "rand")]
#[test]
fn test_language_of() {