@@ -56,40 +56,52 @@ macro_rules! console_log {
56
56
#[ macro_export]
57
57
macro_rules! wasm_bindgen_test_configure {
58
58
( run_in_browser $( $others: tt) * ) => (
59
- #[ link_section = "__wasm_bindgen_test_unstable" ]
60
- #[ cfg( target_arch = "wasm32" ) ]
61
- pub static __WBG_TEST_RUN_IN_BROWSER: [ u8 ; 1 ] = [ 0x01 ] ;
62
- $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
59
+ const _: ( ) = {
60
+ #[ link_section = "__wasm_bindgen_test_unstable" ]
61
+ #[ cfg( target_arch = "wasm32" ) ]
62
+ pub static __WBG_TEST_RUN_IN_BROWSER: [ u8 ; 1 ] = [ 0x01 ] ;
63
+ $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
64
+ } ;
63
65
) ;
64
66
( run_in_worker $( $others: tt) * ) => (
65
- #[ link_section = "__wasm_bindgen_test_unstable" ]
66
- #[ cfg( target_arch = "wasm32" ) ]
67
- pub static __WBG_TEST_RUN_IN_DEDICATED_WORKER: [ u8 ; 1 ] = [ 0x02 ] ;
68
- $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
67
+ const _: ( ) = {
68
+ #[ link_section = "__wasm_bindgen_test_unstable" ]
69
+ #[ cfg( target_arch = "wasm32" ) ]
70
+ pub static __WBG_TEST_RUN_IN_DEDICATED_WORKER: [ u8 ; 1 ] = [ 0x02 ] ;
71
+ $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
72
+ } ;
69
73
) ;
70
74
( run_in_dedicated_worker $( $others: tt) * ) => (
71
- #[ link_section = "__wasm_bindgen_test_unstable" ]
72
- #[ cfg( target_arch = "wasm32" ) ]
73
- pub static __WBG_TEST_RUN_IN_DEDICATED_WORKER: [ u8 ; 1 ] = [ 0x02 ] ;
74
- $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
75
+ const _: ( ) = {
76
+ #[ link_section = "__wasm_bindgen_test_unstable" ]
77
+ #[ cfg( target_arch = "wasm32" ) ]
78
+ pub static __WBG_TEST_RUN_IN_DEDICATED_WORKER: [ u8 ; 1 ] = [ 0x02 ] ;
79
+ $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
80
+ } ;
75
81
) ;
76
82
( run_in_shared_worker $( $others: tt) * ) => (
77
- #[ link_section = "__wasm_bindgen_test_unstable" ]
78
- #[ cfg( target_arch = "wasm32" ) ]
79
- pub static __WBG_TEST_RUN_IN_SHARED_WORKER: [ u8 ; 1 ] = [ 0x03 ] ;
80
- $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
83
+ const _: ( ) = {
84
+ #[ link_section = "__wasm_bindgen_test_unstable" ]
85
+ #[ cfg( target_arch = "wasm32" ) ]
86
+ pub static __WBG_TEST_RUN_IN_SHARED_WORKER: [ u8 ; 1 ] = [ 0x03 ] ;
87
+ $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
88
+ } ;
81
89
) ;
82
90
( run_in_service_worker $( $others: tt) * ) => (
83
- #[ link_section = "__wasm_bindgen_test_unstable" ]
84
- #[ cfg( target_arch = "wasm32" ) ]
85
- pub static __WBG_TEST_RUN_IN_SERVICE_WORKER: [ u8 ; 1 ] = [ 0x04 ] ;
86
- $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
91
+ const _: ( ) = {
92
+ #[ link_section = "__wasm_bindgen_test_unstable" ]
93
+ #[ cfg( target_arch = "wasm32" ) ]
94
+ pub static __WBG_TEST_RUN_IN_SERVICE_WORKER: [ u8 ; 1 ] = [ 0x04 ] ;
95
+ $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
96
+ } ;
87
97
) ;
88
98
( run_in_node_experimental $( $others: tt) * ) => (
89
- #[ link_section = "__wasm_bindgen_test_unstable" ]
90
- #[ cfg( target_arch = "wasm32" ) ]
91
- pub static __WBG_TEST_run_in_node_experimental: [ u8 ; 1 ] = [ 0x05 ] ;
92
- $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
99
+ const _: ( ) = {
100
+ #[ link_section = "__wasm_bindgen_test_unstable" ]
101
+ #[ cfg( target_arch = "wasm32" ) ]
102
+ pub static __WBG_TEST_run_in_node_experimental: [ u8 ; 1 ] = [ 0x05 ] ;
103
+ $crate:: wasm_bindgen_test_configure!( $( $others) * ) ;
104
+ } ;
93
105
) ;
94
106
( ) => ( )
95
107
}
0 commit comments