rand test
This commit is contained in:
parent
beead2b394
commit
ced473027a
1 changed files with 8 additions and 0 deletions
|
|
@ -76,6 +76,14 @@ impl From<U256> for Secret {
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
#[cfg(feature = "rand")]
|
||||||
|
#[test]
|
||||||
|
fn random_secret() {
|
||||||
|
let secret = Secret::random();
|
||||||
|
|
||||||
|
assert_ne!(secret.0, U256::ZERO);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn public_key_derivation() {
|
fn public_key_derivation() {
|
||||||
let a = Secret(U256::from_u8(3));
|
let a = Secret(U256::from_u8(3));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue