Skip to main content

test_main

Macro test_main 

Source
macro_rules! test_main {
    () => { ... };
}
Expand description

(E16) the jfgui_main a program’s main! defines, for the test binary of a library crate with std and without main! (a style crate’s cargo test): plat’s start of a std program refers to it, so without it the tests do not link. Never called (the test harness has its own main); no panic check (tests unwind). #[cfg(test)] ui::test_main!(); in the crate’s lib.rs, also under #![forbid(unsafe_code)] (the expansion allows no lint: unsafe_code skips external macros). A crate with main! needs none: its main!’s jfgui_main links the tests