Debian Codegraph @

debian/rust-vendor/zerocopy-derive/tests/ui.rs

raw
1 // Copyright 2019 The Fuchsia Authors
2 //
3 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4 // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5 // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6 // This file may not be copied, modified, or distributed except according to
7 // those terms.
8
9 use testutil::UiTestRunner;
10
11 #[test]
12 #[cfg_attr(miri, ignore)]
13 fn ui() {
14 // This tests the behavior when `--cfg zerocopy_derive_union_into_bytes` is
15 // present.
16 UiTestRunner::new()
17 .rustc_arg("--cfg=zerocopy_derive_union_into_bytes")
18 .rustc_arg("--cfg=zerocopy_unstable_linux")
19 .rustc_arg("-Wwarnings") // To ensure .stderr files reflect typical user encounter
20 .run();
21
22 // This tests the behavior when various `--cfg` flags are not present.
23 UiTestRunner::new()
24 .subdir("cfgs")
25 .rustc_arg("-Wwarnings") // To ensure .stderr files reflect typical user encounter
26 .run();
27 }