10
10
11
11
// no-pretty-expanded FIXME #15189
12
12
// ignore-android FIXME #17520
13
- // ignore-msvc FIXME #28133
13
+ // compile-flags:-g
14
14
15
15
use std:: env;
16
16
use std:: process:: { Command , Stdio } ;
17
17
use std:: str;
18
- use std:: ops:: { Drop , FnMut , FnOnce } ;
19
18
20
19
#[ inline( never) ]
21
20
fn foo ( ) {
@@ -52,7 +51,7 @@ fn runtest(me: &str) {
52
51
let out = p. wait_with_output ( ) . unwrap ( ) ;
53
52
assert ! ( !out. status. success( ) ) ;
54
53
let s = str:: from_utf8 ( & out. stderr ) . unwrap ( ) ;
55
- assert ! ( s. contains( "stack backtrace" ) && s. contains( "foo::h " ) ,
54
+ assert ! ( s. contains( "stack backtrace" ) && s. contains( " - foo" ) ,
56
55
"bad output: {}" , s) ;
57
56
58
57
// Make sure the stack trace is *not* printed
@@ -62,7 +61,7 @@ fn runtest(me: &str) {
62
61
let out = p. wait_with_output ( ) . unwrap ( ) ;
63
62
assert ! ( !out. status. success( ) ) ;
64
63
let s = str:: from_utf8 ( & out. stderr ) . unwrap ( ) ;
65
- assert ! ( !s. contains( "stack backtrace" ) && !s. contains( "foo::h " ) ,
64
+ assert ! ( !s. contains( "stack backtrace" ) && !s. contains( " - foo" ) ,
66
65
"bad output2: {}" , s) ;
67
66
68
67
// Make sure a stack trace is printed
@@ -72,7 +71,7 @@ fn runtest(me: &str) {
72
71
let s = str:: from_utf8 ( & out. stderr ) . unwrap ( ) ;
73
72
// loosened the following from double::h to double:: due to
74
73
// spurious failures on mac, 32bit, optimized
75
- assert ! ( s. contains( "stack backtrace" ) && s. contains( "double:: " ) ,
74
+ assert ! ( s. contains( "stack backtrace" ) && s. contains( " - double" ) ,
76
75
"bad output3: {}" , s) ;
77
76
78
77
// Make sure a stack trace isn't printed too many times
@@ -89,8 +88,11 @@ fn runtest(me: &str) {
89
88
"bad output4: {}" , s) ;
90
89
}
91
90
92
- #[ cfg( not( all( windows, target_arch = "x86" ) ) ) ]
93
91
fn main ( ) {
92
+ if cfg ! ( windows) && cfg ! ( target_arch = "x86" ) && cfg ! ( target_env = "gnu" ) {
93
+ return
94
+ }
95
+
94
96
let args: Vec < String > = env:: args ( ) . collect ( ) ;
95
97
if args. len ( ) >= 2 && args[ 1 ] == "fail" {
96
98
foo ( ) ;
@@ -100,7 +102,3 @@ fn main() {
100
102
runtest ( & args[ 0 ] ) ;
101
103
}
102
104
}
103
-
104
- // See issue 28218
105
- #[ cfg( all( windows, target_arch = "x86" ) ) ]
106
- fn main ( ) { }
0 commit comments