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