for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. The Package Manager will be released with Swift 3 and is currently only available with the Swift 3 development snapshots. — Swift.org - Package Manager
• Handling version-specific logic • ಛఆͷSwiftόʔδϣϯ͚ͷόʔδϣχϯάɻ࠷৽όʔδϣϯ͚ʹ͏͖Ͱͳ͍ɻ • Version-specific tag selection: 1.2.0@swift-3 • Version-specific manifest selection: [email protected] It is not expected the packages would ever use this feature unless absolutely necessary to support existing clients. In particular, packages should not adopt this syntax for tagging versions supporting the latest GM Swift version.
8ͷxcodebuild test-without-buildingͱҰॹ ☺ • swift test -l (--list-tests) • ςετϝιουͷϦετΛग़ྗ͢Δ • SwiftPMDemoTests.SwiftPMDemoTests/testExample • swift test -s, --specifier <test-module>.<test-case> • swift test -s, --specifier <test-module>.<test-case>/<test> • ಛఆͷςετΫϥεɺςετϝιου͚ͩΛ࣮ߦ͢Δ • swift test -s SwiftPMDemoTests.SwiftPMDemoTests/testExample
XCTestCase { func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. XCTAssertEqual(SwiftPMDemo().text, "Hello, World!") } static var allTests : [(String, (SwiftPMDemoTests) -> () throws -> Void)] { return [ ("testExample", testExample), ] } }
at 2016-09-14 00:01:00.333 Test Suite 'SwiftPMDemoPackageTests.xctest' started at 2016-09-14 00:01:00.334 Test Suite 'SwiftPMDemoTests' started at 2016-09-14 00:01:00.334 Test Case '-[SwiftPMDemoTests.SwiftPMDemoTests testExample]' started. Test Case '-[SwiftPMDemoTests.SwiftPMDemoTests testExample]' passed (0.001 seconds). Test Suite 'SwiftPMDemoTests' passed at 2016-09-14 00:01:00.335. Executed 1 test, with 0 failures (0 unexpected) in 0.001 (0.001) seconds Test Suite 'SwiftPMDemoPackageTests.xctest' passed at 2016-09-14 00:01:00.335. Executed 1 test, with 0 failures (0 unexpected) in 0.001 (0.001) seconds Test Suite 'All tests' passed at 2016-09-14 00:01:00.335. Executed 1 test, with 0 failures (0 unexpected) in 0.001 (0.002) seconds