Files
swift-mirror/test/stdlib/os.swift
Slava Pestov d1b7b3769e ClangImporter: Special-case class named OS_os_log for factory initializer treatment
This is horrible hack, see this commit for the backstory:

<c98ce0c770>.

Fixes <rdar://problem/29530506>.
2017-01-11 20:18:35 -08:00

24 lines
481 B
Swift

// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// REQUIRES: objc_interop
import os
import Foundation
import StdlibUnittest
defer { runAllTests() }
var osAPI = TestSuite("osAPI")
if #available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {
osAPI.test("log") {
os_log("test: %d", 42)
os_log("test2: %@", "test")
}
osAPI.test("newLog") {
let newLog = OSLog(subsystem: "com.apple.Swift", category: "Test")
os_log("test", log: newLog)
}
}