File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed
crates/iota-sdk-types/src Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -133,18 +133,15 @@ macro_rules! impl_base64_helper {
133133 }
134134 }
135135
136- #[ cfg( test) ]
136+ #[ cfg( all ( feature = "proptest" , test) ) ]
137137 mod $test_module {
138- #[ cfg( feature = "proptest" ) ]
139138 use test_strategy:: proptest;
140139 #[ cfg( target_arch = "wasm32" ) ]
141140 use wasm_bindgen_test:: wasm_bindgen_test as test;
142141
143- #[ cfg( feature = "proptest" ) ]
144142 use super :: { $display, $fromstr} ;
145143
146144 #[ proptest]
147- #[ cfg( feature = "proptest" ) ]
148145 fn roundtrip_display_fromstr( array: $fromstr) {
149146 let s = $display( & array. 0 ) . to_string( ) ;
150147 let a = s. parse:: <$fromstr>( ) . unwrap( ) ;
Original file line number Diff line number Diff line change @@ -385,8 +385,8 @@ mod test {
385385 assert_eq ! ( seed. unpadded( ) , [ 1 ; 31 ] . as_slice( ) ) ;
386386 }
387387
388- #[ proptest]
389388 #[ cfg( feature = "proptest" ) ]
389+ #[ proptest]
390390 fn dont_crash_on_large_inputs (
391391 #[ strategy( proptest:: collection:: vec( any:: <u8 >( ) , 33 ..1024 ) ) ] bytes : Vec < u8 > ,
392392 ) {
@@ -397,8 +397,8 @@ mod test {
397397 let _ = Bn254FieldElement :: from_str ( & radix10) ;
398398 }
399399
400- #[ proptest]
401400 #[ cfg( feature = "proptest" ) ]
401+ #[ proptest]
402402 fn valid_address_seeds (
403403 #[ strategy( proptest:: collection:: vec( any:: <u8 >( ) , 1 ..=32 ) ) ] bytes : Vec < u8 > ,
404404 ) {
Original file line number Diff line number Diff line change @@ -347,18 +347,15 @@ impl_digest!(EffectsAuxiliaryDataDigest);
347347// serialized
348348pub type SigningDigest = [ u8 ; Digest :: LENGTH ] ;
349349
350- #[ cfg( test) ]
350+ #[ cfg( all ( feature = "proptest" , test) ) ]
351351mod test {
352- #[ cfg( feature = "proptest" ) ]
353352 use test_strategy:: proptest;
354353 #[ cfg( target_arch = "wasm32" ) ]
355354 use wasm_bindgen_test:: wasm_bindgen_test as test;
356355
357- #[ cfg( feature = "proptest" ) ]
358356 use super :: * ;
359357
360358 #[ proptest]
361- #[ cfg( feature = "proptest" ) ]
362359 fn roundtrip_display_fromstr ( digest : Digest ) {
363360 let s = digest. to_string ( ) ;
364361 let d = s. parse :: < Digest > ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments