update "should terminate abnormally" test to trigger a different ARG_CHECK
We can no longer produce non-verification context objects, so instead produce an invalid public key.
This commit is contained in:
parent
8294ea3f50
commit
f3d48a298e
|
@ -650,10 +650,9 @@ mod tests {
|
||||||
#[ignore] // Panicking from C may trap (SIGILL) intentionally, so we test this manually.
|
#[ignore] // Panicking from C may trap (SIGILL) intentionally, so we test this manually.
|
||||||
#[cfg(any(feature = "alloc", feature = "std"))]
|
#[cfg(any(feature = "alloc", feature = "std"))]
|
||||||
fn test_panic_raw_ctx_should_terminate_abnormally() {
|
fn test_panic_raw_ctx_should_terminate_abnormally() {
|
||||||
let ctx_vrfy = Secp256k1::verification_only();
|
// Trying to use an all-zeros public key should cause an ARG_CHECK to trigger.
|
||||||
let raw_ctx_verify_as_full = unsafe {Secp256k1::from_raw_all(ctx_vrfy.ctx)};
|
let pk = PublicKey::from(unsafe { ffi::PublicKey::new() });
|
||||||
// Generating a key pair in verify context will panic (ARG_CHECK).
|
pk.serialize();
|
||||||
raw_ctx_verify_as_full.generate_keypair(&mut thread_rng());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in New Issue