INNER CODE UNIT · Rust

sample_below_zero_should_panic

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

    fn sample_below_zero_should_panic() {
        BigInt::sample_below(&BigInt::from(-1));
    }

    #[test]
    #[should_panic]
    fn sample_within_invalid_range_should_panic() {
        BigInt::sample_range(&BigInt::from(9), &BigInt::from(3));
    }

    #[test]
    #[should_panic]
    fn strict_sample_within_invalid_range_should_panic() {
        BigInt::sample_range(&BigInt::from(5), &BigInt::from(5));
    }

    #[test]
    fn sample_on_zero_bits_returns_zero() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…