Add CSGetDebugLoggingLevel along with a semi-real test for it

This commit is contained in:
Matt 2021-11-20 10:28:38 -05:00
parent b2cf533744
commit 3c192cc3f2
No known key found for this signature in database
GPG Key ID: CC209CE203F23602
3 changed files with 26 additions and 1 deletions

View File

@ -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]
)
)

View File

@ -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);

View File

@ -0,0 +1,10 @@
import XCTest
@testable import CoreSymbolication
final class CoreSymbolicationTests: XCTestCase {
func testLoggingLevelAvailability() {
if #available(macOS 12.0, *) {
_ = CSGetDebugLoggingLevel()
}
}
}