Debian Codegraph @

third_party/rust/displaydoc/tests/compile_tests.rs

raw
1 #[allow(unused_attributes)]
2 #[rustversion::attr(not(nightly), ignore)]
3 #[test]
4 fn no_std() {
5 let t = trybuild::TestCases::new();
6 #[cfg(not(feature = "std"))]
7 t.compile_fail("tests/no_std/without.rs");
8 #[cfg(not(feature = "std"))]
9 t.compile_fail("tests/no_std/multi_line.rs");
10 #[cfg(not(feature = "std"))]
11 t.pass("tests/no_std/multi_line_allow.rs");
12 #[cfg(not(feature = "std"))]
13 t.compile_fail("tests/no_std/enum_prefix_missing.rs");
14 #[cfg(not(feature = "std"))]
15 t.pass("tests/no_std/enum_prefix.rs");
16 #[cfg(feature = "std")]
17 t.compile_fail("tests/std/without.rs");
18 #[cfg(feature = "std")]
19 t.compile_fail("tests/std/multi_line.rs");
20 #[cfg(feature = "std")]
21 t.pass("tests/std/multi_line_allow.rs");
22 #[cfg(feature = "std")]
23 t.compile_fail("tests/std/enum_prefix_missing.rs");
24 #[cfg(feature = "std")]
25 t.pass("tests/std/enum_prefix.rs");
26 #[cfg(feature = "std")]
27 t.pass("tests/std/multiple.rs");
28 t.pass("tests/no_std/with.rs");
29 }