mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-02 19:45:46 +00:00
18 lines
272 B
Rust
18 lines
272 B
Rust
|
#[macro_use]
|
||
|
extern crate cfg_if;
|
||
|
|
||
|
cfg_if! {
|
||
|
if #[cfg(foo)] {
|
||
|
fn works() -> bool { false }
|
||
|
} else if #[cfg(test)] {
|
||
|
fn works() -> bool { true }
|
||
|
} else {
|
||
|
fn works() -> bool { false }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn smoke() {
|
||
|
assert!(works());
|
||
|
}
|