mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Tests importing AppKit have a tendency to be flaky if they share a module cache with other builds using a different set of framework search flags. Make sure they use a local cache to avoid picking incompatible cached modules. Alternatively, we could align all builds using the same cache to have exactly the same framework search paths or enable explicit module builds. I picked the module cache as it's the most reliable solution in the short and long term. The 5 tests below import AppKit and have been known to be flaky. Adapting them to use a custom cache with require more care. For now, let's use them as control group to validate that the fix works. If these 5 fail without the fixed ones, we should extend the same corresponding fix to them. - Interpreter/SDK/GLKit.swift - Interpreter/SDK/cf_extensions.swift - Interpreter/SDK/cf_type_bridging.swift - Interpreter/SDK/mapkit_header_static.swift - Interpreter/SDK/objc_ns_enum.swift rdar://142296731
129 lines
3.5 KiB
Plaintext
129 lines
3.5 KiB
Plaintext
// REQUIRES: OS=macosx
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %empty-directory(%t/cache)
|
|
// RUN: %target-swift-frontend -c -update-code -swift-version 4 -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/remove_override.result.swift -o %t/rename-func-decl.swift.remap %api_diff_data_dir -module-cache-path %t/cache
|
|
// RUN: diff -u %S/remove_override.swift.expected %t/remove_override.result.swift
|
|
|
|
import AppKit
|
|
|
|
class AppDelegate: NSObject {
|
|
class func application(_ sender: NSApplication, delegateHandlesKey key: String) -> Bool {
|
|
|
|
return false
|
|
}
|
|
func application(_ sender: NSApplication, delegateHandlesKey key: String) -> Bool {
|
|
return super.application(sender, delegateHandlesKey: key)
|
|
}
|
|
class func changeColor(_ sender: Any?) {
|
|
|
|
}
|
|
func changeColor(_ sender: Any?) {
|
|
|
|
}
|
|
class func controlTextDidBeginEditing(_ obj: Notification) {
|
|
|
|
}
|
|
func controlTextDidBeginEditing(_ obj: Notification) {
|
|
|
|
}
|
|
class func controlTextDidEndEditing(_ obj: Notification) {
|
|
|
|
}
|
|
func controlTextDidEndEditing(_ obj: Notification) {
|
|
|
|
}
|
|
class func controlTextDidChange(_ obj: Notification) {
|
|
|
|
}
|
|
func controlTextDidChange(_ obj: Notification) {
|
|
|
|
}
|
|
class func changeFont(_ sender: Any?) {
|
|
|
|
}
|
|
func changeFont(_ sender: Any?) {
|
|
|
|
}
|
|
class func validModesForFontPanel(_ fontPanel: NSFontPanel) -> NSFontPanel.ModeMask {
|
|
return []
|
|
}
|
|
func validModesForFontPanel(_ fontPanel: NSFontPanel) -> NSFontPanel.ModeMask {
|
|
return []
|
|
}
|
|
class func discardEditing() {
|
|
|
|
}
|
|
func discardEditing() {
|
|
|
|
}
|
|
class func commitEditing() -> Bool {
|
|
return false
|
|
}
|
|
func commitEditing() -> Bool {
|
|
return false
|
|
}
|
|
class func commitEditing(withDelegate delegate: Any?, didCommit didCommitSelector: Selector?, contextInfo: UnsafeMutableRawPointer?) {
|
|
|
|
}
|
|
func commitEditing(withDelegate delegate: Any?, didCommit didCommitSelector: Selector?, contextInfo: UnsafeMutableRawPointer?) {
|
|
|
|
}
|
|
class func commitEditingAndReturnError() throws {
|
|
|
|
}
|
|
func commitEditingAndReturnError() throws {
|
|
|
|
}
|
|
class func objectDidBeginEditing(_ editor: Any) {
|
|
|
|
}
|
|
func objectDidBeginEditing(_ editor: Any) {
|
|
|
|
}
|
|
class func objectDidEndEditing(_ editor: Any) {
|
|
|
|
}
|
|
func objectDidEndEditing(_ editor: Any) {
|
|
|
|
}
|
|
class func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
|
return false
|
|
}
|
|
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
|
return false
|
|
}
|
|
class func pasteboard(_ sender: NSPasteboard, provideDataForType type: NSPasteboard.PasteboardType) {
|
|
|
|
}
|
|
func pasteboard(_ sender: NSPasteboard, provideDataForType type: NSPasteboard.PasteboardType) {
|
|
|
|
}
|
|
class func pasteboardChangedOwner(_ sender: NSPasteboard) {
|
|
|
|
}
|
|
func pasteboardChangedOwner(_ sender: NSPasteboard) {
|
|
|
|
}
|
|
class func layer(_ layer: CALayer, shouldInheritContentsScale newScale: CGFloat, from window: NSWindow) -> Bool {
|
|
return false
|
|
}
|
|
func layer(_ layer: CALayer, shouldInheritContentsScale newScale: CGFloat, from window: NSWindow) -> Bool {
|
|
return false
|
|
}
|
|
class func view(_ view: NSView, stringForToolTip tag: NSView.ToolTipTag, point: NSPoint, userData data: UnsafeMutableRawPointer?) -> String {
|
|
return ""
|
|
}
|
|
func view(_ view: NSView, stringForToolTip tag: NSView.ToolTipTag, point: NSPoint, userData data: UnsafeMutableRawPointer?) -> String {
|
|
return ""
|
|
}
|
|
}
|
|
|
|
// We shouldn't migrate further sub-class.
|
|
class MyAppDelegate: AppDelegate {
|
|
override func commitEditing() -> Bool {
|
|
super.commitEditing()
|
|
return false
|
|
}
|
|
}
|
|
|