Add CSGetDebugLoggingLevel along with a semi-real test for it
This commit is contained in:
parent
b2cf533744
commit
3c192cc3f2
|
@ -13,6 +13,16 @@ let package = Package(
|
|||
],
|
||||
targets: [
|
||||
.systemLibrary(name: "CoreSymbolication"),
|
||||
.testTarget(name: "CoreSymbolicationTests",
|
||||
dependencies: ["CoreSymbolication"],
|
||||
linkerSettings: [
|
||||
.unsafeFlags([
|
||||
"-Xlinker", "-F",
|
||||
"-Xlinker", "/System/Library/PrivateFrameworks",
|
||||
"-Xlinker", "-framework",
|
||||
"-Xlinker", "CoreSymbolication",
|
||||
]),
|
||||
]),
|
||||
],
|
||||
swiftLanguageVersions: [.v5]
|
||||
)
|
||||
)
|
||||
|
|
|
@ -34,6 +34,11 @@ CSTypeRef CSRetain(CSTypeRef cs);
|
|||
void CSRelease(CSTypeRef cs);
|
||||
void CSShow(CSTypeRef cs);
|
||||
|
||||
typedef int CSDebugLogLevel;
|
||||
|
||||
CSDebugLogLevel CSGetDebugLoggingLevel() API_AVAILABLE(macosx(12.0));
|
||||
void CSSetDebugLoggingLevel(CSDebugLogLevel level) API_AVAILABLE(macosx(12.0));
|
||||
|
||||
typedef void (^CSSymbolicatorIterator)(CSSymbolicatorRef symbolicator);
|
||||
|
||||
void CSSymbolicatorForeachSymbolicatorWithURL(CFURLRef url, CSSymbolicatorIterator it);
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import XCTest
|
||||
@testable import CoreSymbolication
|
||||
|
||||
final class CoreSymbolicationTests: XCTestCase {
|
||||
func testLoggingLevelAvailability() {
|
||||
if #available(macOS 12.0, *) {
|
||||
_ = CSGetDebugLoggingLevel()
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue