@@ -886,8 +886,7 @@ mod tests {
886886 use key:: { SecretKey , PublicKey } ;
887887 use super :: { from_hex, to_hex} ;
888888 use super :: constants;
889- use super :: { Secp256k1 , Signature , Message } ;
890- use super :: Error :: { InvalidMessage , IncorrectSignature , InvalidSignature } ;
889+ use super :: { Secp256k1 , Signature , Message , Error } ;
891890 use ffi:: { self , types:: AlignedType } ;
892891 use context:: * ;
893892
@@ -1193,20 +1192,20 @@ mod tests {
11931192 let mut msg = [ 0u8 ; 32 ] ;
11941193 thread_rng ( ) . fill_bytes ( & mut msg) ;
11951194 let msg = Message :: from_slice ( & msg) . unwrap ( ) ;
1196- assert_eq ! ( s. verify( & msg, & sig, & pk) , Err ( IncorrectSignature ) ) ;
1195+ assert_eq ! ( s. verify( & msg, & sig, & pk) , Err ( Error :: IncorrectSignature ) ) ;
11971196 }
11981197
11991198 #[ test]
12001199 fn test_bad_slice ( ) {
12011200 assert_eq ! ( Signature :: from_der( & [ 0 ; constants:: MAX_SIGNATURE_SIZE + 1 ] ) ,
1202- Err ( InvalidSignature ) ) ;
1201+ Err ( Error :: InvalidSignature ) ) ;
12031202 assert_eq ! ( Signature :: from_der( & [ 0 ; constants:: MAX_SIGNATURE_SIZE ] ) ,
1204- Err ( InvalidSignature ) ) ;
1203+ Err ( Error :: InvalidSignature ) ) ;
12051204
12061205 assert_eq ! ( Message :: from_slice( & [ 0 ; constants:: MESSAGE_SIZE - 1 ] ) ,
1207- Err ( InvalidMessage ) ) ;
1206+ Err ( Error :: InvalidMessage ) ) ;
12081207 assert_eq ! ( Message :: from_slice( & [ 0 ; constants:: MESSAGE_SIZE + 1 ] ) ,
1209- Err ( InvalidMessage ) ) ;
1208+ Err ( Error :: InvalidMessage ) ) ;
12101209 assert ! ( Message :: from_slice( & [ 0 ; constants:: MESSAGE_SIZE ] ) . is_ok( ) ) ;
12111210 assert ! ( Message :: from_slice( & [ 1 ; constants:: MESSAGE_SIZE ] ) . is_ok( ) ) ;
12121211 }
@@ -1253,7 +1252,7 @@ mod tests {
12531252 let msg = Message :: from_slice ( & msg[ ..] ) . unwrap ( ) ;
12541253
12551254 // without normalization we expect this will fail
1256- assert_eq ! ( secp. verify( & msg, & sig, & pk) , Err ( IncorrectSignature ) ) ;
1255+ assert_eq ! ( secp. verify( & msg, & sig, & pk) , Err ( Error :: IncorrectSignature ) ) ;
12571256 // after normalization it should pass
12581257 sig. normalize_s ( ) ;
12591258 assert_eq ! ( secp. verify( & msg, & sig, & pk) , Ok ( ( ) ) ) ;
0 commit comments