INNER CODE UNIT · Rust

fuzz_strict_sample_range

ZenGo-X/curv · src/arithmetic/mod.rs:227

    fn fuzz_strict_sample_range() {
        let a = BigInt::from(500);
        let b = &a * &a;

        for _ in 0..100 {
            let n = BigInt::strict_sample_range(&a, &b);
            assert!(
                a <= n && n < b,
                "assertion failed: {:?} < {:?} < {:?}",
                a,
                n,
                b
            );
        }
    }

    #[test]
    fn sample_below() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…