Add test for secp256k1_fe_half
This commit is contained in:
parent
925f78d55e
commit
9cc5c257ed
|
@ -2548,6 +2548,14 @@ void run_field_misc(void) {
|
|||
secp256k1_fe_add(&q, &x);
|
||||
CHECK(check_fe_equal(&y, &z));
|
||||
CHECK(check_fe_equal(&q, &y));
|
||||
/* Check secp256k1_fe_half. */
|
||||
z = x;
|
||||
secp256k1_fe_half(&z);
|
||||
secp256k1_fe_add(&z, &z);
|
||||
CHECK(check_fe_equal(&x, &z));
|
||||
secp256k1_fe_add(&z, &z);
|
||||
secp256k1_fe_half(&z);
|
||||
CHECK(check_fe_equal(&x, &z));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue