mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-11-02 12:27:02 +00:00
ff: PrimeField::{is_even, is_odd}
This commit is contained in:
@@ -950,6 +950,18 @@ fn test_fr_display() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_fr_is_odd() {
|
||||
assert!(!Fr::from(0).is_odd());
|
||||
assert!(Fr::from(0).is_even());
|
||||
assert!(Fr::from(1).is_odd());
|
||||
assert!(!Fr::from(1).is_even());
|
||||
assert!(!Fr::from(324834872).is_odd());
|
||||
assert!(Fr::from(324834872).is_even());
|
||||
assert!(Fr::from(324834873).is_odd());
|
||||
assert!(!Fr::from(324834873).is_even());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_fr_num_bits() {
|
||||
assert_eq!(Fr::NUM_BITS, 255);
|
||||
|
Reference in New Issue
Block a user