summaryrefslogtreecommitdiffstats
path: root/third_party/rust/tracing/tests/macro_imports.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/tracing/tests/macro_imports.rs')
-rw-r--r--third_party/rust/tracing/tests/macro_imports.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/third_party/rust/tracing/tests/macro_imports.rs b/third_party/rust/tracing/tests/macro_imports.rs
new file mode 100644
index 0000000000..2d0a9d6528
--- /dev/null
+++ b/third_party/rust/tracing/tests/macro_imports.rs
@@ -0,0 +1,23 @@
+use tracing::Level;
+
+#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
+#[test]
+fn prefixed_span_macros() {
+ tracing::span!(Level::DEBUG, "foo");
+ tracing::trace_span!("foo");
+ tracing::debug_span!("foo");
+ tracing::info_span!("foo");
+ tracing::warn_span!("foo");
+ tracing::error_span!("foo");
+}
+
+#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
+#[test]
+fn prefixed_event_macros() {
+ tracing::event!(Level::DEBUG, "foo");
+ tracing::trace!("foo");
+ tracing::debug!("foo");
+ tracing::info!("foo");
+ tracing::warn!("foo");
+ tracing::error!("foo");
+}