Files
swift-mirror/test/SymbolGraph/Symbols/Unavailable.swift
Ashley Garland 58edd83f37 [SymbolGraph] Completely filter unavailable/obsoleted symbols
Symbol graph files are processed per platform--documentation for symbols that
are unconditionally unavailable or obsoleted on a platform shouldn't be shown
for that same platform.

Also, removes `isUnconditionallyUnavailable` from the JSON format. If it's
unconditionally unavailable, it won't show up at all.

rdar://60193675
2020-03-18 09:43:08 -07:00

38 lines
933 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift %s -module-name Unavailable -emit-module -emit-module-path %t/
// RUN: %target-swift-symbolgraph-extract -module-name Unavailable -I %t -pretty-print -output-dir %t
// RUN: %FileCheck %s --input-file %t/Unavailable.symbols.json
// REQUIRES: OS=macosx
public struct ShouldAppear {}
// CHECK-NOT: OSXUnavailable
@available(OSX, unavailable)
public struct OSXUnavailable {}
@available(OSX, unavailable)
extension ShouldAppear {
public func shouldntAppear1() {}
}
// CHECK-NOT: OSXObsoleted
@available(OSX, obsoleted: 10.9)
public struct OSXObsoleted {}
@available(OSX, obsoleted: 10.9)
extension ShouldAppear {
public func shouldntAppear2() {}
}
// CHECK-NOT: SwiftObsoleted
@available(swift, obsoleted: 1.0)
public struct SwiftObsoleted {}
@available(swift, obsoleted: 1.0)
extension ShouldAppear {
public func shouldntAppear3() {}
}
// CHECK-NOT: shouldntAppear