INNER CODE UNIT · Rust

sample_within_invalid_range_should_panic

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

    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() {
        assert_eq!(BigInt::sample(0), BigInt::zero());
        assert_eq!(BigInt::strict_sample(0), BigInt::zero());
    }

    #[test]
    fn fuzz_sample_returns_number_not_more_than_n_bits_length() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…