Files
Notes/notes-service/vendor/defmt/tests/ui.rs
T
2026-08-01 16:11:49 +03:00

19 lines
558 B
Rust

#[test]
fn ui() {
// Run UI tests with logging enabled
std::env::set_var("DEFMT_LOG", "trace");
// only test error messages on the stable channel (nightly may change too often)
if rustc_version::version_meta()
.map(|meta| meta.channel == rustc_version::Channel::Stable)
.unwrap_or(false)
&& std::env::var_os("SKIP_UI_TESTS").is_none()
{
let t = trybuild::TestCases::new();
t.compile_fail("tests/ui/*.rs");
t.pass("tests/basic_usage.rs");
t.pass("tests/derive-bounds.rs");
}
}