Skip to content

Commit 96fe8ef

Browse files
authored
[test] Limit the macOS-specific parts of objc_init.swift (#12313)
...rather than using a blanket "REQUIRES: OS=macosx". This isn't really even macOS-specific, but having to keep availability information up to date in a fake version of AppKit for non-macOS platforms seems silly. rdar://problem/19452886
1 parent 0a2cf99 commit 96fe8ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/ClangImporter/objc_init.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify
22

33
// REQUIRES: objc_interop
4-
// REQUIRES: OS=macosx
5-
// FIXME: <rdar://problem/19452886> test/ClangModules/objc_init.swift should not require REQUIRES: OS=macosx
64

75
import AppKit
86
import objc_ext
@@ -59,7 +57,10 @@ class MyDocument3 : NSAwesomeDocument {
5957

6058
func createMyDocument3(_ url: NSURL) {
6159
var md = MyDocument3()
60+
#if os(macOS)
61+
// Limit this particular test to macOS; it depends on availability.
6262
md = try! MyDocument3(contentsOf: url as URL, ofType:"")
63+
#endif
6364
_ = md
6465
}
6566

0 commit comments

Comments
 (0)