Skip to content

Commit 6639211

Browse files
[tests] Adjust tests in validation suit
1 parent 5bba527 commit 6639211

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

validation-test/stdlib/AssertDiagnosticsSIL.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
func assertionFailure_isNotNoreturn() -> Int {
44
_ = 0 // Don't implicitly return the assertionFailure call.
55
assertionFailure("")
6-
} // expected-error {{missing return in function expected to return 'Int'}}
6+
} // expected-error {{missing return in global function expected to return 'Int'}}
77

validation-test/stdlib/BoolDiagnostics_Dataflow.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,49 @@ func test_constantFoldAnd1() -> Int {
88
return 42
99
}
1010
// FIXME: this is a false positive.
11-
} // expected-error {{missing return in function expected to return 'Int'}}
11+
} // expected-error {{missing return in global function expected to return 'Int'}}
1212

1313
func test_constantFoldAnd2() -> Int {
1414
while true && false {
1515
return 42
1616
}
17-
} // expected-error {{missing return in function expected to return 'Int'}}
17+
} // expected-error {{missing return in global function expected to return 'Int'}}
1818

1919
func test_constantFoldAnd3() -> Int {
2020
while false && true {
2121
return 42
2222
}
23-
} // expected-error {{missing return in function expected to return 'Int'}}
23+
} // expected-error {{missing return in global function expected to return 'Int'}}
2424

2525
func test_constantFoldAnd4() -> Int {
2626
while false && false {
2727
return 42
2828
}
29-
} // expected-error {{missing return in function expected to return 'Int'}}
29+
} // expected-error {{missing return in global function expected to return 'Int'}}
3030

3131
func test_constantFoldOr1() -> Int {
3232
while true || true {
3333
return 42
3434
}
3535
// FIXME: this is a false positive.
36-
} // expected-error {{missing return in function expected to return 'Int'}}
36+
} // expected-error {{missing return in global function expected to return 'Int'}}
3737

3838
func test_constantFoldOr2() -> Int {
3939
while true || false {
4040
return 42
4141
}
4242
// FIXME: this is a false positive.
43-
} // expected-error {{missing return in function expected to return 'Int'}}
43+
} // expected-error {{missing return in global function expected to return 'Int'}}
4444

4545
func test_constantFoldOr3() -> Int {
4646
while false || true {
4747
return 42
4848
}
4949
// FIXME: this is a false positive.
50-
} // expected-error {{missing return in function expected to return 'Int'}}
50+
} // expected-error {{missing return in global function expected to return 'Int'}}
5151

5252
func test_constantFoldOr4() -> Int {
5353
while false || false {
5454
return 42
5555
}
56-
} // expected-error {{missing return in function expected to return 'Int'}}
56+
} // expected-error {{missing return in global function expected to return 'Int'}}

0 commit comments

Comments
 (0)