INNER CODE UNIT · Rust
display_bigint_returns_decimal_representation
ZenGo-X/curv · src/arithmetic/mod.rs:355
fn display_bigint_returns_decimal_representation() {
let s = BigInt::from(12345).to_string();
assert_eq!(s, "12345")
}
proptest::proptest! {
#[test]
fn fuzz_searching_next_prime(n in 1u64..) {
test_find_next_prime(n)
}
}
fn test_find_next_prime(n: u64) {
let n = BigInt::from(n);
let prime = n.next_prime();
assert!(n < prime);
assert!(prime.is_probable_prime(20));
}