File tree Expand file tree Collapse file tree 1 file changed +22
-9
lines changed
test/Interop/Cxx/foreign-reference Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Original file line number Diff line number Diff line change 1
- // RUN: %target-run-simple-swift(-cxx-interoperability-mode=default -Xfrontend -disable-availability-checking - I %S/Inputs) | %FileCheck %s
1
+ // RUN: %target-run-simple-swift(-cxx-interoperability-mode=default -I %S/Inputs) | %FileCheck %s
2
2
3
3
// REQUIRES: executable_test
4
4
12
12
import Printed
13
13
14
14
func printCxxImmortalFRT( ) {
15
- let s = ImmortalFRT ( )
16
- print ( s)
15
+ if #available( SwiftStdlib 6 . 2 , * ) {
16
+ let s = ImmortalFRT ( )
17
+ print ( s)
18
+ } else {
19
+ print ( " runtime too old " )
20
+ }
17
21
}
18
22
23
+ @available ( SwiftStdlib 5 . 9 , * )
19
24
extension FRTCustomStringConvertible : CustomStringConvertible {
20
25
public var description : String {
21
26
return " FRTCustomStringConvertible(publ: \( publ) ) "
22
27
}
23
28
}
24
29
25
30
func printCxxFRTCustomStringConvertible( ) {
26
- let s = FRTCustomStringConvertible ( )
27
- print ( s)
31
+ if #available( SwiftStdlib 5 . 9 , * ) {
32
+ let s = FRTCustomStringConvertible ( )
33
+ print ( s)
34
+ } else {
35
+ print ( " runtime too old " )
36
+ }
28
37
}
29
38
30
39
func printCxxFRType( ) {
31
- let s = FRType ( )
32
- print ( s)
40
+ if #available( SwiftStdlib 6 . 2 , * ) {
41
+ let s = FRType ( )
42
+ print ( s)
43
+ } else {
44
+ print ( " runtime too old " )
45
+ }
33
46
}
34
47
35
48
printCxxImmortalFRT ( )
36
- // CHECK: ImmortalFRT()
49
+ // CHECK: {{ ImmortalFRT()|runtime too old}}
37
50
38
51
printCxxFRTCustomStringConvertible ( )
39
52
// CHECK: FRTCustomStringConvertible(publ: 2)
40
53
41
54
printCxxFRType ( )
42
- // CHECK: FRType()
55
+ // CHECK: {{ FRType()|runtime too old}}
You can’t perform that action at this time.
0 commit comments