]> git.lizzy.rs Git - rust.git/blobdiff - library/test/src/tests.rs
Rollup merge of #93400 - ChayimFriedman2:dont-suggest-using-const-with-bounds-unused...
[rust.git] / library / test / src / tests.rs
index d566dbc09f434bfd09f6318bffc287ae58b6736e..8329e9735d43dff78b1a282402f8bc5320954cfa 100644 (file)
@@ -61,12 +61,12 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
             desc: TestDesc {
                 name: StaticTestName("1"),
                 ignore: true,
+                #[cfg(not(bootstrap))]
+                ignore_message: None,
                 should_panic: ShouldPanic::No,
                 compile_fail: false,
                 no_run: false,
                 test_type: TestType::Unknown,
-                #[cfg(bootstrap)]
-                allow_fail: false,
             },
             testfn: DynTestFn(Box::new(move || {})),
         },
@@ -74,12 +74,12 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
             desc: TestDesc {
                 name: StaticTestName("2"),
                 ignore: false,
+                #[cfg(not(bootstrap))]
+                ignore_message: None,
                 should_panic: ShouldPanic::No,
                 compile_fail: false,
                 no_run: false,
                 test_type: TestType::Unknown,
-                #[cfg(bootstrap)]
-                allow_fail: false,
             },
             testfn: DynTestFn(Box::new(move || {})),
         },
@@ -95,12 +95,12 @@ fn f() {
         desc: TestDesc {
             name: StaticTestName("whatever"),
             ignore: true,
+            #[cfg(not(bootstrap))]
+            ignore_message: None,
             should_panic: ShouldPanic::No,
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -117,12 +117,12 @@ fn f() {}
         desc: TestDesc {
             name: StaticTestName("whatever"),
             ignore: true,
+            #[cfg(not(bootstrap))]
+            ignore_message: None,
             should_panic: ShouldPanic::No,
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -143,12 +143,12 @@ fn f() {
         desc: TestDesc {
             name: StaticTestName("whatever"),
             ignore: false,
+            #[cfg(not(bootstrap))]
+            ignore_message: None,
             should_panic: ShouldPanic::Yes,
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -169,12 +169,12 @@ fn f() {
         desc: TestDesc {
             name: StaticTestName("whatever"),
             ignore: false,
+            #[cfg(not(bootstrap))]
+            ignore_message: None,
             should_panic: ShouldPanic::YesWithMessage("error message"),
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -200,12 +200,12 @@ fn f() {
         desc: TestDesc {
             name: StaticTestName("whatever"),
             ignore: false,
+            #[cfg(not(bootstrap))]
+            ignore_message: None,
             should_panic: ShouldPanic::YesWithMessage(expected),
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -235,12 +235,12 @@ fn f() {
         desc: TestDesc {
             name: StaticTestName("whatever"),
             ignore: false,
+            #[cfg(not(bootstrap))]
+            ignore_message: None,
             should_panic: ShouldPanic::YesWithMessage(expected),
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -262,12 +262,12 @@ fn f() {}
             desc: TestDesc {
                 name: StaticTestName("whatever"),
                 ignore: false,
+                #[cfg(not(bootstrap))]
+                ignore_message: None,
                 should_panic,
                 compile_fail: false,
                 no_run: false,
                 test_type: TestType::Unknown,
-                #[cfg(bootstrap)]
-                allow_fail: false,
             },
             testfn: DynTestFn(Box::new(f)),
         };
@@ -297,12 +297,12 @@ fn f() {}
         desc: TestDesc {
             name: StaticTestName("whatever"),
             ignore: false,
+            #[cfg(not(bootstrap))]
+            ignore_message: None,
             should_panic: ShouldPanic::No,
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -333,12 +333,12 @@ fn f() {}
         desc: TestDesc {
             name: StaticTestName("whatever"),
             ignore: false,
+            #[cfg(not(bootstrap))]
+            ignore_message: None,
             should_panic: ShouldPanic::No,
             compile_fail: false,
             no_run: false,
             test_type,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(f)),
     };
@@ -373,12 +373,12 @@ fn typed_test_desc(test_type: TestType) -> TestDesc {
     TestDesc {
         name: StaticTestName("whatever"),
         ignore: false,
+        #[cfg(not(bootstrap))]
+        ignore_message: None,
         should_panic: ShouldPanic::No,
         compile_fail: false,
         no_run: false,
         test_type,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     }
 }
 
@@ -486,12 +486,12 @@ pub fn exclude_should_panic_option() {
         desc: TestDesc {
             name: StaticTestName("3"),
             ignore: false,
+            #[cfg(not(bootstrap))]
+            ignore_message: None,
             should_panic: ShouldPanic::Yes,
             compile_fail: false,
             no_run: false,
             test_type: TestType::Unknown,
-            #[cfg(bootstrap)]
-            allow_fail: false,
         },
         testfn: DynTestFn(Box::new(move || {})),
     });
@@ -511,12 +511,12 @@ fn tests() -> Vec<TestDescAndFn> {
                 desc: TestDesc {
                     name: StaticTestName(name),
                     ignore: false,
+                    #[cfg(not(bootstrap))]
+                    ignore_message: None,
                     should_panic: ShouldPanic::No,
                     compile_fail: false,
                     no_run: false,
                     test_type: TestType::Unknown,
-                    #[cfg(bootstrap)]
-                    allow_fail: false,
                 },
                 testfn: DynTestFn(Box::new(move || {})),
             })
@@ -601,12 +601,12 @@ fn testfn() {}
             desc: TestDesc {
                 name: DynTestName((*name).clone()),
                 ignore: false,
+                #[cfg(not(bootstrap))]
+                ignore_message: None,
                 should_panic: ShouldPanic::No,
                 compile_fail: false,
                 no_run: false,
                 test_type: TestType::Unknown,
-                #[cfg(bootstrap)]
-                allow_fail: false,
             },
             testfn: DynTestFn(Box::new(testfn)),
         };
@@ -753,12 +753,12 @@ fn f(_: &mut Bencher) {}
     let desc = TestDesc {
         name: StaticTestName("f"),
         ignore: false,
+        #[cfg(not(bootstrap))]
+        ignore_message: None,
         should_panic: ShouldPanic::No,
         compile_fail: false,
         no_run: false,
         test_type: TestType::Unknown,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     };
 
     crate::bench::benchmark(TestId(0), desc, tx, true, f);
@@ -776,12 +776,12 @@ fn f(b: &mut Bencher) {
     let desc = TestDesc {
         name: StaticTestName("f"),
         ignore: false,
+        #[cfg(not(bootstrap))]
+        ignore_message: None,
         should_panic: ShouldPanic::No,
         compile_fail: false,
         no_run: false,
         test_type: TestType::Unknown,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     };
 
     crate::bench::benchmark(TestId(0), desc, tx, true, f);
@@ -793,23 +793,23 @@ fn should_sort_failures_before_printing_them() {
     let test_a = TestDesc {
         name: StaticTestName("a"),
         ignore: false,
+        #[cfg(not(bootstrap))]
+        ignore_message: None,
         should_panic: ShouldPanic::No,
         compile_fail: false,
         no_run: false,
         test_type: TestType::Unknown,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     };
 
     let test_b = TestDesc {
         name: StaticTestName("b"),
         ignore: false,
+        #[cfg(not(bootstrap))]
+        ignore_message: None,
         should_panic: ShouldPanic::No,
         compile_fail: false,
         no_run: false,
         test_type: TestType::Unknown,
-        #[cfg(bootstrap)]
-        allow_fail: false,
     };
 
     let mut out = PrettyFormatter::new(OutputLocation::Raw(Vec::new()), false, 10, false, None);