summaryrefslogtreecommitdiffstats
path: root/library/test/src/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/test/src/tests.rs')
-rw-r--r--library/test/src/tests.rs200
1 files changed, 200 insertions, 0 deletions
diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs
index 44776fb0a..5ffdbf73f 100644
--- a/library/test/src/tests.rs
+++ b/library/test/src/tests.rs
@@ -63,6 +63,16 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
name: StaticTestName("1"),
ignore: true,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -75,6 +85,16 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
name: StaticTestName("2"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -95,6 +115,16 @@ pub fn do_not_run_ignored_tests() {
name: StaticTestName("whatever"),
ignore: true,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -118,6 +148,16 @@ pub fn ignored_tests_result_in_ignored() {
name: StaticTestName("whatever"),
ignore: true,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -143,6 +183,16 @@ fn test_should_panic() {
name: StaticTestName("whatever"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::Yes,
compile_fail: false,
no_run: false,
@@ -168,6 +218,16 @@ fn test_should_panic_good_message() {
name: StaticTestName("whatever"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::YesWithMessage("error message"),
compile_fail: false,
no_run: false,
@@ -198,6 +258,16 @@ fn test_should_panic_bad_message() {
name: StaticTestName("whatever"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::YesWithMessage(expected),
compile_fail: false,
no_run: false,
@@ -232,6 +302,16 @@ fn test_should_panic_non_string_message_type() {
name: StaticTestName("whatever"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::YesWithMessage(expected),
compile_fail: false,
no_run: false,
@@ -260,6 +340,16 @@ fn test_should_panic_but_succeeds() {
name: StaticTestName("whatever"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic,
compile_fail: false,
no_run: false,
@@ -288,6 +378,16 @@ fn report_time_test_template(report_time: bool) -> Option<TestExecTime> {
name: StaticTestName("whatever"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -325,6 +425,16 @@ fn time_test_failure_template(test_type: TestType) -> TestResult {
name: StaticTestName("whatever"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -364,6 +474,16 @@ fn typed_test_desc(test_type: TestType) -> TestDesc {
name: StaticTestName("whatever"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -476,6 +596,16 @@ pub fn exclude_should_panic_option() {
name: StaticTestName("3"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::Yes,
compile_fail: false,
no_run: false,
@@ -500,6 +630,16 @@ pub fn exact_filter_match() {
name: StaticTestName(name),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -591,6 +731,16 @@ fn sample_tests() -> Vec<TestDescAndFn> {
name: DynTestName((*name).clone()),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -720,6 +870,16 @@ pub fn test_bench_no_iter() {
name: StaticTestName("f"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -743,6 +903,16 @@ pub fn test_bench_iter() {
name: StaticTestName("f"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -759,6 +929,16 @@ fn should_sort_failures_before_printing_them() {
name: StaticTestName("a"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -769,6 +949,16 @@ fn should_sort_failures_before_printing_them() {
name: StaticTestName("b"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,
@@ -816,6 +1006,16 @@ fn test_dyn_bench_returning_err_fails_when_run_as_test() {
name: StaticTestName("whatever"),
ignore: false,
ignore_message: None,
+ #[cfg(not(bootstrap))]
+ source_file: "",
+ #[cfg(not(bootstrap))]
+ start_line: 0,
+ #[cfg(not(bootstrap))]
+ start_col: 0,
+ #[cfg(not(bootstrap))]
+ end_line: 0,
+ #[cfg(not(bootstrap))]
+ end_col: 0,
should_panic: ShouldPanic::No,
compile_fail: false,
no_run: false,