@@ -500,18 +500,21 @@ mod tests {
500500 } ) ;
501501 }
502502
503- #[ test]
503+ #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
504+ #[ cfg_attr( not( target_arch = "wasm32" ) , test) ]
504505 fn zero_as_exponent ( ) {
505506 test_sets_as_base ( ALL , 0.0 , 1.0 ) ;
506507 test_sets_as_base ( ALL , -0.0 , 1.0 ) ;
507508 }
508509
509- #[ test]
510+ #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
511+ #[ cfg_attr( not( target_arch = "wasm32" ) , test) ]
510512 fn one_as_base ( ) {
511513 test_sets_as_exponent ( 1.0 , ALL , 1.0 ) ;
512514 }
513515
514- #[ test]
516+ #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
517+ #[ cfg_attr( not( target_arch = "wasm32" ) , test) ]
515518 fn nan_inputs ( ) {
516519 // NAN as the base:
517520 // (NAN ^ anything *but 0* should be NAN)
@@ -522,7 +525,8 @@ mod tests {
522525 test_sets_as_base ( & ALL [ ..( ALL . len ( ) - 2 ) ] , NAN , NAN ) ;
523526 }
524527
525- #[ test]
528+ #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
529+ #[ cfg_attr( not( target_arch = "wasm32" ) , test) ]
526530 fn infinity_as_base ( ) {
527531 // Positive Infinity as the base:
528532 // (+Infinity ^ positive anything but 0 and NAN should be +Infinity)
@@ -541,7 +545,8 @@ mod tests {
541545 test_sets ( ALL , & |v : f64 | pow ( NEG_INFINITY , v) , & |v : f64 | pow ( -0.0 , -v) ) ;
542546 }
543547
544- #[ test]
548+ #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
549+ #[ cfg_attr( not( target_arch = "wasm32" ) , test) ]
545550 fn infinity_as_exponent ( ) {
546551 // Positive/Negative base greater than 1:
547552 // (pos/neg > 1 ^ Infinity should be Infinity - note this excludes NAN as the base)
@@ -567,7 +572,8 @@ mod tests {
567572 test_sets_as_base ( & [ NEG_ONE , POS_ONE ] , NEG_INFINITY , 1.0 ) ;
568573 }
569574
570- #[ test]
575+ #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
576+ #[ cfg_attr( not( target_arch = "wasm32" ) , test) ]
571577 fn zero_as_base ( ) {
572578 // Positive Zero as the base:
573579 // (+0 ^ anything positive but 0 and NAN should be +0)
@@ -593,7 +599,8 @@ mod tests {
593599 test_sets_as_exponent ( -0.0 , & [ NEG_ODDS ] , NEG_INFINITY ) ;
594600 }
595601
596- #[ test]
602+ #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
603+ #[ cfg_attr( not( target_arch = "wasm32" ) , test) ]
597604 fn special_cases ( ) {
598605 // One as the exponent:
599606 // (anything ^ 1 should be anything - i.e. the base)
@@ -624,7 +631,8 @@ mod tests {
624631 } ) ;
625632 }
626633
627- #[ test]
634+ #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
635+ #[ cfg_attr( not( target_arch = "wasm32" ) , test) ]
628636 fn normal_cases ( ) {
629637 assert_eq ! ( pow( 2.0 , 20.0 ) , ( 1 << 20 ) as f64 ) ;
630638 assert_eq ! ( pow( -1.0 , 9.0 ) , -1.0 ) ;
0 commit comments