@@ -80,7 +80,7 @@ pub fn wasm_bindgen_test(
80
80
None => quote ! { :: core:: option:: Option :: None } ,
81
81
} ;
82
82
83
- let ignore = match ignore {
83
+ let ignore_par = match & ignore {
84
84
Some ( Some ( lit) ) => {
85
85
quote ! { :: core:: option:: Option :: Some ( :: core:: option:: Option :: Some ( #lit) ) }
86
86
}
@@ -89,9 +89,9 @@ pub fn wasm_bindgen_test(
89
89
} ;
90
90
91
91
let test_body = if attributes. r#async {
92
- quote ! { cx. execute_async( test_name, #ident, #should_panic_par, #ignore ) ; }
92
+ quote ! { cx. execute_async( test_name, #ident, #should_panic_par, #ignore_par ) ; }
93
93
} else {
94
- quote ! { cx. execute_sync( test_name, #ident, #should_panic_par, #ignore ) ; }
94
+ quote ! { cx. execute_sync( test_name, #ident, #should_panic_par, #ignore_par ) ; }
95
95
} ;
96
96
97
97
// We generate a `#[no_mangle]` with a known prefix so the test harness can
@@ -130,6 +130,18 @@ pub fn wasm_bindgen_test(
130
130
quote ! { #[ cfg_attr( not( all( target_arch = "wasm32" , any( target_os = "unknown" , target_os = "none" ) ) ) , #should_panic) ] }
131
131
)
132
132
}
133
+
134
+ if let Some ( ignore) = ignore {
135
+ let ignore = if let Some ( lit) = ignore {
136
+ quote ! { ignore = #lit }
137
+ } else {
138
+ quote ! { ignore }
139
+ } ;
140
+
141
+ tokens. extend (
142
+ quote ! { #[ cfg_attr( not( all( target_arch = "wasm32" , any( target_os = "unknown" , target_os = "none" ) ) ) , #ignore) ] }
143
+ )
144
+ }
133
145
}
134
146
135
147
tokens. extend ( leading_tokens) ;
0 commit comments