File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,12 @@ void run_context_tests(int use_preallocated) {
188188 secp256k1_context_set_error_callback (sign , counting_illegal_callback_fn , NULL );
189189 CHECK (vrfy -> error_callback .fn != sign -> error_callback .fn );
190190
191+ /* check if sizes for cloning are consistent */
192+ CHECK (secp256k1_context_preallocated_clone_size (none ) == secp256k1_context_preallocated_size (SECP256K1_CONTEXT_NONE ));
193+ CHECK (secp256k1_context_preallocated_clone_size (sign ) == secp256k1_context_preallocated_size (SECP256K1_CONTEXT_SIGN ));
194+ CHECK (secp256k1_context_preallocated_clone_size (vrfy ) == secp256k1_context_preallocated_size (SECP256K1_CONTEXT_VERIFY ));
195+ CHECK (secp256k1_context_preallocated_clone_size (both ) == secp256k1_context_preallocated_size (SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY ));
196+
191197 /*** clone and destroy all of them to make sure cloning was complete ***/
192198 {
193199 secp256k1_context * ctx_tmp ;
You can’t perform that action at this time.
0 commit comments