rand test

This commit is contained in:
Neemek 2025-11-04 09:55:55 +01:00
parent beead2b394
commit ced473027a
Signed by: neemek
GPG key ID: 84FFE4D7D40AB25E

View file

@ -76,6 +76,14 @@ impl From<U256> for Secret {
mod tests {
use super::*;
#[cfg(feature = "rand")]
#[test]
fn random_secret() {
let secret = Secret::random();
assert_ne!(secret.0, U256::ZERO);
}
#[test]
fn public_key_derivation() {
let a = Secret(U256::from_u8(3));