Skip to content

Commit 1b7bb49

Browse files
committed
StringOptimization: fix a test for linux and windows.
1 parent ea81e26 commit 1b7bb49

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/SILOptimizer/string_optimization.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,14 @@ printEmbeeded(testUnqualifiedLocalType())
105105
printEmbeeded(testQualifiedLocalType())
106106

107107
#if _runtime(_ObjC)
108-
// CHECK-OUTPUT: <NSObject>
109-
printEmbeeded(testObjcClassName(qualified: false))
110-
// CHECK-OUTPUT: <NSObject>
111-
printEmbeeded(testObjcClassName(qualified: true))
108+
109+
// Can't use check-output here, because for non ObjC runtimes it would not match.
110+
if testObjcClassName(qualified: false) != "NSObject" {
111+
fatalError()
112+
}
113+
if testObjcClassName(qualified: true) != "NSObject" {
114+
fatalError()
115+
}
116+
112117
#endif
113118

0 commit comments

Comments
 (0)