1#![cfg_attr(not(feature = "std"), no_std)]
6#![cfg_attr(target_feature = "atomics", feature(thread_local))]
7#![deny(missing_docs)]
8
9extern crate alloc;
10
11pub use wasm_bindgen_test_macro::{wasm_bindgen_bench, wasm_bindgen_test};
12
13#[cfg(all(test, feature = "gg-alloc"))]
16#[global_allocator]
17static A: gg_alloc::GgAlloc<std::alloc::System> = gg_alloc::GgAlloc::new(std::alloc::System);
18
19#[macro_export]
22macro_rules! console_error {
23 ($($arg:tt)*) => (
24 $crate::__rt::console_error(&format_args!($($arg)*))
25 )
26}
27
28#[macro_export]
31macro_rules! console_log {
32 ($($arg:tt)*) => (
33 $crate::__rt::console_log(&format_args!($($arg)*))
34 )
35}
36
37#[macro_export]
61macro_rules! wasm_bindgen_test_configure {
62 (run_in_browser $($others:tt)*) => (
63 const _: () = {
64 #[link_section = "__wasm_bindgen_test_unstable"]
65 #[cfg(target_arch = "wasm32")]
66 pub static __WBG_TEST_RUN_IN_BROWSER: [u8; 1] = [0x01];
67 $crate::wasm_bindgen_test_configure!($($others)*);
68 };
69 );
70 (run_in_worker $($others:tt)*) => (
71 const _: () = {
72 #[link_section = "__wasm_bindgen_test_unstable"]
73 #[cfg(target_arch = "wasm32")]
74 pub static __WBG_TEST_RUN_IN_DEDICATED_WORKER: [u8; 1] = [0x02];
75 $crate::wasm_bindgen_test_configure!($($others)*);
76 };
77 );
78 (run_in_dedicated_worker $($others:tt)*) => (
79 const _: () = {
80 #[link_section = "__wasm_bindgen_test_unstable"]
81 #[cfg(target_arch = "wasm32")]
82 pub static __WBG_TEST_RUN_IN_DEDICATED_WORKER: [u8; 1] = [0x02];
83 $crate::wasm_bindgen_test_configure!($($others)*);
84 };
85 );
86 (run_in_shared_worker $($others:tt)*) => (
87 const _: () = {
88 #[link_section = "__wasm_bindgen_test_unstable"]
89 #[cfg(target_arch = "wasm32")]
90 pub static __WBG_TEST_RUN_IN_SHARED_WORKER: [u8; 1] = [0x03];
91 $crate::wasm_bindgen_test_configure!($($others)*);
92 };
93 );
94 (run_in_service_worker $($others:tt)*) => (
95 const _: () = {
96 #[link_section = "__wasm_bindgen_test_unstable"]
97 #[cfg(target_arch = "wasm32")]
98 pub static __WBG_TEST_RUN_IN_SERVICE_WORKER: [u8; 1] = [0x04];
99 $crate::wasm_bindgen_test_configure!($($others)*);
100 };
101 );
102 (run_in_node_experimental $($others:tt)*) => (
103 const _: () = {
104 #[link_section = "__wasm_bindgen_test_unstable"]
105 #[cfg(target_arch = "wasm32")]
106 pub static __WBG_TEST_run_in_node_experimental: [u8; 1] = [0x05];
107 $crate::wasm_bindgen_test_configure!($($others)*);
108 };
109 );
110 () => ()
111}
112
113#[path = "rt/mod.rs"]
114pub mod __rt;
115
116#[cfg(target_arch = "wasm32")]
120mod coverage;
121
122pub use __rt::criterion::Criterion;