Remove private_key_debug_is_obfuscated test
The private_key_debug_is_obfuscated test is removed because it belongs in the secp256k1 library, not in the bitcoin library. Keeping it here is redundant and creates unnecessary maintenance.
This commit is contained in:
parent
b11bd9a6b5
commit
7bff725494
|
@ -1515,26 +1515,4 @@ mod tests {
|
||||||
assert!(res.is_err());
|
assert!(res.is_err());
|
||||||
assert_eq!(res.unwrap_err(), ParsePublicKeyError::InvalidChar(103));
|
assert_eq!(res.unwrap_err(), ParsePublicKeyError::InvalidChar(103));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[cfg(feature = "std")]
|
|
||||||
fn private_key_debug_is_obfuscated() {
|
|
||||||
let sk =
|
|
||||||
"cVt4o7BGAig1UXywgGSmARhxMdzP5qvQsxKkSsc1XEkw3tDTQFpy".parse::<PrivateKey>().unwrap();
|
|
||||||
let want =
|
|
||||||
"PrivateKey { compressed: true, network: Test, inner: SecretKey(#32014e414fdce702) }";
|
|
||||||
let got = format!("{:?}", sk);
|
|
||||||
assert_eq!(got, want)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[cfg(not(feature = "std"))]
|
|
||||||
fn private_key_debug_is_obfuscated() {
|
|
||||||
let sk =
|
|
||||||
"cVt4o7BGAig1UXywgGSmARhxMdzP5qvQsxKkSsc1XEkw3tDTQFpy".parse::<PrivateKey>().unwrap();
|
|
||||||
// Why is this not shortened? In rust-secp256k1/src/secret it is printed with "#{:016x}"?
|
|
||||||
let want = "PrivateKey { compressed: true, network: Test, inner: SecretKey(#7217ac58fbad8880a91032107b82cb6c5422544b426c350ee005cf509f3dbf7b) }";
|
|
||||||
let got = format!("{:?}", sk);
|
|
||||||
assert_eq!(got, want)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue