Skip to content

Commit cf0b21d

Browse files
committed
Adjust directive order and add needs-threads
Signed-off-by: xizheyin <[email protected]>
1 parent 0a6e378 commit cf0b21d

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

tests/ui/test-attrs/test-should-panic-failed-show-span.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
//@ no-prefer-dynamic
2+
//@ compile-flags: --test
3+
//@ run-flags: --test-threads=1
14
//@ run-fail
25
//@ check-run-results
3-
//@ compile-flags: --test
46
//@ exec-env:RUST_BACKTRACE=0
57
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
6-
//@ run-flags: --test-threads=1
8+
//@ needs-threads
79

810
#[test]
911
#[should_panic]

tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ test should_panic_with_substring_panics_with_non_string_value - should panic ...
1010
failures:
1111

1212
---- should_panic_with_any_message_does_not_panic stdout ----
13-
note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:22:4
13+
note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:24:4
1414
---- should_panic_with_message_does_not_panic stdout ----
15-
note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:28:4
15+
note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:30:4
1616
---- should_panic_with_substring_panics_with_incorrect_string stdout ----
1717

18-
thread 'should_panic_with_substring_panics_with_incorrect_string' panicked at $DIR/test-should-panic-failed-show-span.rs:35:5:
18+
thread 'should_panic_with_substring_panics_with_incorrect_string' panicked at $DIR/test-should-panic-failed-show-span.rs:37:5:
1919
ZOMGWTFBBQ
2020
note: panic did not contain expected string
2121
panic message: `"ZOMGWTFBBQ"`,
2222
expected substring: `"message"`
2323
---- should_panic_with_substring_panics_with_non_string_value stdout ----
2424

25-
thread 'should_panic_with_substring_panics_with_non_string_value' panicked at $DIR/test-should-panic-failed-show-span.rs:41:5:
25+
thread 'should_panic_with_substring_panics_with_non_string_value' panicked at $DIR/test-should-panic-failed-show-span.rs:43:5:
2626
Box<dyn Any>
2727
note: expected panic with string value,
2828
found non-string value: `TypeId(0x56ced5e4a15bd89050bb9674fa2df013)`

tests/ui/test-attrs/test-should-panic-failed-show-span.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: panic message is not a string literal
2-
--> $DIR/test-should-panic-failed-show-span.rs:41:12
2+
--> $DIR/test-should-panic-failed-show-span.rs:43:12
33
|
44
LL | panic!(123);
55
| ^^^

0 commit comments

Comments
 (0)