Skip to content

Commit dabbdce

Browse files
committed
Fix nit in bit count support and add test for that
1 parent 32daa49 commit dabbdce

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl error::Error for Error {
102102
/// mnemonic from all the supported languages. (Languages have to be explicitly enabled using
103103
/// the Cargo features.)
104104
///
105-
/// Supported number of words are 6, 12, 18 and 24.
105+
/// Supported number of words are 12, 18 and 24.
106106
#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
107107
pub struct Mnemonic(String);
108108
// The content of the mnemonic is ensured to be NFKD-normalized UTF-8.
@@ -367,6 +367,14 @@ mod tests {
367367

368368
use bitcoin_hashes::hex::FromHex;
369369

370+
#[cfg(feature = "rand")]
371+
#[test]
372+
fn test_bit_counts() {
373+
let _ = Mnemonic::generate(12).unwrap();
374+
let _ = Mnemonic::generate(18).unwrap();
375+
let _ = Mnemonic::generate(24).unwrap();
376+
}
377+
370378
#[cfg(feature = "rand")]
371379
#[test]
372380
fn test_language_of() {

0 commit comments

Comments
 (0)