From 07fc20f65c3cfd4b15855e14748562e0fe2cb300 Mon Sep 17 00:00:00 2001 From: Yuta Koshizawa Date: Wed, 26 Sep 2018 01:22:21 +0900 Subject: [PATCH 1/7] Update for Xcode 10 --- PromiseK.xcodeproj/project.pbxproj | 16 +++++++++++----- .../xcshareddata/xcschemes/PromiseK-iOS.xcscheme | 4 +--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/PromiseK.xcodeproj/project.pbxproj b/PromiseK.xcodeproj/project.pbxproj index 7fec3f9..88a88a1 100644 --- a/PromiseK.xcodeproj/project.pbxproj +++ b/PromiseK.xcodeproj/project.pbxproj @@ -167,15 +167,17 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0910; - LastUpgradeCheck = 0910; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = koherent.org; TargetAttributes = { D62C6CA11FB4AE6900E7DF02 = { CreatedOnToolsVersion = 9.1; + LastSwiftMigration = 1000; ProvisioningStyle = Automatic; }; D62C6CA91FB4AE6900E7DF02 = { CreatedOnToolsVersion = 9.1; + LastSwiftMigration = 1000; ProvisioningStyle = Automatic; }; }; @@ -258,6 +260,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -265,6 +268,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -318,6 +322,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -325,6 +330,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -373,7 +379,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; PRODUCT_NAME = PromiseK; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -394,7 +400,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; PRODUCT_NAME = PromiseK; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -409,7 +415,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseKTests; PRODUCT_NAME = PromiseKTests; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -424,7 +430,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseKTests; PRODUCT_NAME = PromiseKTests; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-iOS.xcscheme b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-iOS.xcscheme index c07b23f..82f73dd 100644 --- a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-iOS.xcscheme +++ b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-iOS.xcscheme @@ -1,6 +1,6 @@ Date: Wed, 26 Sep 2018 01:24:01 +0900 Subject: [PATCH 2/7] Make tests available with `-c release` Removed `@testable`. --- Tests/PromiseKTests/PromiseKTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/PromiseKTests/PromiseKTests.swift b/Tests/PromiseKTests/PromiseKTests.swift index c1274a9..271dbb9 100644 --- a/Tests/PromiseKTests/PromiseKTests.swift +++ b/Tests/PromiseKTests/PromiseKTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import PromiseK +import PromiseK class PromiseKTests: XCTestCase { func testMap() { From db930d9d08acada3b1ba3b699aaa4ecfcc48ebb3 Mon Sep 17 00:00:00 2001 From: Yuta Koshizawa Date: Wed, 26 Sep 2018 01:31:36 +0900 Subject: [PATCH 3/7] Update Package.swift for Swift 4.2 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index e914018..1535106 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:4.0 +// swift-tools-version:4.2 import PackageDescription From 95d6a61c4396b43999f1ef42dc1b400d8f1c0d02 Mon Sep 17 00:00:00 2001 From: Yuta Koshizawa Date: Wed, 26 Sep 2018 01:44:55 +0900 Subject: [PATCH 4/7] Support macOS, tvOS and watchOS --- PromiseK.xcodeproj/project.pbxproj | 575 +++++++++++++++++- .../xcschemes/PromiseK-macOS.xcscheme | 99 +++ .../xcschemes/PromiseK-tvOS.xcscheme | 99 +++ .../xcschemes/PromiseK-watchOS.xcscheme | 80 +++ Sources/PromiseK/PromiseK.h | 2 +- 5 files changed, 851 insertions(+), 4 deletions(-) create mode 100644 PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-macOS.xcscheme create mode 100644 PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-tvOS.xcscheme create mode 100644 PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-watchOS.xcscheme diff --git a/PromiseK.xcodeproj/project.pbxproj b/PromiseK.xcodeproj/project.pbxproj index 88a88a1..52f8370 100644 --- a/PromiseK.xcodeproj/project.pbxproj +++ b/PromiseK.xcodeproj/project.pbxproj @@ -12,6 +12,19 @@ D62C6CBB1FB4AF1B00E7DF02 /* Throws.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62C6C901FB4AD0100E7DF02 /* Throws.swift */; }; D62C6CBC1FB4AF7D00E7DF02 /* PromiseKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62C6C991FB4AD2900E7DF02 /* PromiseKTests.swift */; }; D62C6CBD1FB4AFE200E7DF02 /* PromiseK.h in Headers */ = {isa = PBXBuildFile; fileRef = D62C6C8F1FB4AD0100E7DF02 /* PromiseK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D6E7454E215A9ADD00547DFD /* PromiseK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6E74545215A9ADD00547DFD /* PromiseK.framework */; }; + D6E7456A215A9AFB00547DFD /* PromiseK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6E74561215A9AFB00547DFD /* PromiseK.framework */; }; + D6E74585215A9CA000547DFD /* PromiseKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62C6C991FB4AD2900E7DF02 /* PromiseKTests.swift */; }; + D6E74586215A9CA100547DFD /* PromiseKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62C6C991FB4AD2900E7DF02 /* PromiseKTests.swift */; }; + D6E74587215A9CAD00547DFD /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62C6C8E1FB4AD0100E7DF02 /* Promise.swift */; }; + D6E74588215A9CAE00547DFD /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62C6C8E1FB4AD0100E7DF02 /* Promise.swift */; }; + D6E74589215A9CAF00547DFD /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62C6C8E1FB4AD0100E7DF02 /* Promise.swift */; }; + D6E7458A215A9CB400547DFD /* PromiseK.h in Headers */ = {isa = PBXBuildFile; fileRef = D62C6C8F1FB4AD0100E7DF02 /* PromiseK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D6E7458B215A9CB600547DFD /* PromiseK.h in Headers */ = {isa = PBXBuildFile; fileRef = D62C6C8F1FB4AD0100E7DF02 /* PromiseK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D6E7458C215A9CB700547DFD /* PromiseK.h in Headers */ = {isa = PBXBuildFile; fileRef = D62C6C8F1FB4AD0100E7DF02 /* PromiseK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D6E7458D215A9CD900547DFD /* Throws.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62C6C901FB4AD0100E7DF02 /* Throws.swift */; }; + D6E7458E215A9CDA00547DFD /* Throws.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62C6C901FB4AD0100E7DF02 /* Throws.swift */; }; + D6E7458F215A9CDC00547DFD /* Throws.swift in Sources */ = {isa = PBXBuildFile; fileRef = D62C6C901FB4AD0100E7DF02 /* Throws.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -22,6 +35,20 @@ remoteGlobalIDString = D62C6CA11FB4AE6900E7DF02; remoteInfo = "PromiseK-iOS"; }; + D6E7454F215A9ADD00547DFD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D62C6C681FB4AC9100E7DF02 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D6E74544215A9ADD00547DFD; + remoteInfo = "PromiseK-macOS"; + }; + D6E7456B215A9AFB00547DFD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D62C6C681FB4AC9100E7DF02 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D6E74560215A9AFB00547DFD; + remoteInfo = "PromiseK-tvOS"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -34,6 +61,11 @@ D62C6C991FB4AD2900E7DF02 /* PromiseKTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseKTests.swift; sourceTree = ""; }; D62C6CA21FB4AE6900E7DF02 /* PromiseK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D62C6CAA1FB4AE6900E7DF02 /* PromiseKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PromiseKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D6E74545215A9ADD00547DFD /* PromiseK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D6E7454D215A9ADD00547DFD /* PromiseKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PromiseKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D6E74561215A9AFB00547DFD /* PromiseK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D6E74569215A9AFB00547DFD /* PromiseKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PromiseKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D6E7457D215A9B0B00547DFD /* PromiseK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -52,6 +84,43 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D6E74542215A9ADD00547DFD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E7454A215A9ADD00547DFD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E7454E215A9ADD00547DFD /* PromiseK.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E7455E215A9AFB00547DFD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E74566215A9AFB00547DFD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E7456A215A9AFB00547DFD /* PromiseK.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E7457A215A9B0B00547DFD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -69,6 +138,11 @@ children = ( D62C6CA21FB4AE6900E7DF02 /* PromiseK.framework */, D62C6CAA1FB4AE6900E7DF02 /* PromiseKTests.xctest */, + D6E74545215A9ADD00547DFD /* PromiseK.framework */, + D6E7454D215A9ADD00547DFD /* PromiseKTests.xctest */, + D6E74561215A9AFB00547DFD /* PromiseK.framework */, + D6E74569215A9AFB00547DFD /* PromiseKTests.xctest */, + D6E7457D215A9B0B00547DFD /* PromiseK.framework */, ); name = Products; sourceTree = ""; @@ -121,6 +195,30 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D6E74540215A9ADD00547DFD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E7458A215A9CB400547DFD /* PromiseK.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E7455C215A9AFB00547DFD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E7458B215A9CB600547DFD /* PromiseK.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E74578215A9B0B00547DFD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E7458C215A9CB700547DFD /* PromiseK.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -160,13 +258,103 @@ productReference = D62C6CAA1FB4AE6900E7DF02 /* PromiseKTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + D6E74544215A9ADD00547DFD /* PromiseK-macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = D6E74556215A9ADD00547DFD /* Build configuration list for PBXNativeTarget "PromiseK-macOS" */; + buildPhases = ( + D6E74540215A9ADD00547DFD /* Headers */, + D6E74541215A9ADD00547DFD /* Sources */, + D6E74542215A9ADD00547DFD /* Frameworks */, + D6E74543215A9ADD00547DFD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PromiseK-macOS"; + productName = "PromiseK-macOS"; + productReference = D6E74545215A9ADD00547DFD /* PromiseK.framework */; + productType = "com.apple.product-type.framework"; + }; + D6E7454C215A9ADD00547DFD /* PromiseKTests-macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = D6E74559215A9ADD00547DFD /* Build configuration list for PBXNativeTarget "PromiseKTests-macOS" */; + buildPhases = ( + D6E74549215A9ADD00547DFD /* Sources */, + D6E7454A215A9ADD00547DFD /* Frameworks */, + D6E7454B215A9ADD00547DFD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D6E74550215A9ADD00547DFD /* PBXTargetDependency */, + ); + name = "PromiseKTests-macOS"; + productName = "PromiseK-macOSTests"; + productReference = D6E7454D215A9ADD00547DFD /* PromiseKTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + D6E74560215A9AFB00547DFD /* PromiseK-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = D6E74572215A9AFB00547DFD /* Build configuration list for PBXNativeTarget "PromiseK-tvOS" */; + buildPhases = ( + D6E7455C215A9AFB00547DFD /* Headers */, + D6E7455D215A9AFB00547DFD /* Sources */, + D6E7455E215A9AFB00547DFD /* Frameworks */, + D6E7455F215A9AFB00547DFD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PromiseK-tvOS"; + productName = "PromiseK-tvOS"; + productReference = D6E74561215A9AFB00547DFD /* PromiseK.framework */; + productType = "com.apple.product-type.framework"; + }; + D6E74568215A9AFB00547DFD /* PromiseKTests-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = D6E74575215A9AFB00547DFD /* Build configuration list for PBXNativeTarget "PromiseKTests-tvOS" */; + buildPhases = ( + D6E74565215A9AFB00547DFD /* Sources */, + D6E74566215A9AFB00547DFD /* Frameworks */, + D6E74567215A9AFB00547DFD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D6E7456C215A9AFB00547DFD /* PBXTargetDependency */, + ); + name = "PromiseKTests-tvOS"; + productName = "PromiseK-tvOSTests"; + productReference = D6E74569215A9AFB00547DFD /* PromiseKTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + D6E7457C215A9B0B00547DFD /* PromiseK-watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = D6E74582215A9B0B00547DFD /* Build configuration list for PBXNativeTarget "PromiseK-watchOS" */; + buildPhases = ( + D6E74578215A9B0B00547DFD /* Headers */, + D6E74579215A9B0B00547DFD /* Sources */, + D6E7457A215A9B0B00547DFD /* Frameworks */, + D6E7457B215A9B0B00547DFD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PromiseK-watchOS"; + productName = "PromiseK-watchOS"; + productReference = D6E7457D215A9B0B00547DFD /* PromiseK.framework */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ D62C6C681FB4AC9100E7DF02 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0910; + LastSwiftUpdateCheck = 1000; LastUpgradeCheck = 1000; ORGANIZATIONNAME = koherent.org; TargetAttributes = { @@ -180,6 +368,26 @@ LastSwiftMigration = 1000; ProvisioningStyle = Automatic; }; + D6E74544215A9ADD00547DFD = { + CreatedOnToolsVersion = 10.0; + ProvisioningStyle = Automatic; + }; + D6E7454C215A9ADD00547DFD = { + CreatedOnToolsVersion = 10.0; + ProvisioningStyle = Automatic; + }; + D6E74560215A9AFB00547DFD = { + CreatedOnToolsVersion = 10.0; + ProvisioningStyle = Automatic; + }; + D6E74568215A9AFB00547DFD = { + CreatedOnToolsVersion = 10.0; + ProvisioningStyle = Automatic; + }; + D6E7457C215A9B0B00547DFD = { + CreatedOnToolsVersion = 10.0; + ProvisioningStyle = Automatic; + }; }; }; buildConfigurationList = D62C6C6B1FB4AC9100E7DF02 /* Build configuration list for PBXProject "PromiseK" */; @@ -196,6 +404,11 @@ targets = ( D62C6CA11FB4AE6900E7DF02 /* PromiseK-iOS */, D62C6CA91FB4AE6900E7DF02 /* PromiseKTests-iOS */, + D6E74544215A9ADD00547DFD /* PromiseK-macOS */, + D6E7454C215A9ADD00547DFD /* PromiseKTests-macOS */, + D6E74560215A9AFB00547DFD /* PromiseK-tvOS */, + D6E74568215A9AFB00547DFD /* PromiseKTests-tvOS */, + D6E7457C215A9B0B00547DFD /* PromiseK-watchOS */, ); }; /* End PBXProject section */ @@ -215,6 +428,41 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D6E74543215A9ADD00547DFD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E7454B215A9ADD00547DFD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E7455F215A9AFB00547DFD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E74567215A9AFB00547DFD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E7457B215A9B0B00547DFD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -235,6 +483,49 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D6E74541215A9ADD00547DFD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E7458D215A9CD900547DFD /* Throws.swift in Sources */, + D6E74587215A9CAD00547DFD /* Promise.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E74549215A9ADD00547DFD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E74585215A9CA000547DFD /* PromiseKTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E7455D215A9AFB00547DFD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E7458E215A9CDA00547DFD /* Throws.swift in Sources */, + D6E74588215A9CAE00547DFD /* Promise.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E74565215A9AFB00547DFD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E74586215A9CA100547DFD /* PromiseKTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D6E74579215A9B0B00547DFD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D6E7458F215A9CDC00547DFD /* Throws.swift in Sources */, + D6E74589215A9CAF00547DFD /* Promise.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -243,6 +534,16 @@ target = D62C6CA11FB4AE6900E7DF02 /* PromiseK-iOS */; targetProxy = D62C6CAC1FB4AE6A00E7DF02 /* PBXContainerItemProxy */; }; + D6E74550215A9ADD00547DFD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D6E74544215A9ADD00547DFD /* PromiseK-macOS */; + targetProxy = D6E7454F215A9ADD00547DFD /* PBXContainerItemProxy */; + }; + D6E7456C215A9AFB00547DFD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D6E74560215A9AFB00547DFD /* PromiseK-tvOS */; + targetProxy = D6E7456B215A9AFB00547DFD /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -277,7 +578,6 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; @@ -339,7 +639,6 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -435,6 +734,231 @@ }; name = Release; }; + D6E74557215A9ADD00547DFD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = Sources/PromiseK/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; + PRODUCT_NAME = PromiseK; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + }; + name = Debug; + }; + D6E74558215A9ADD00547DFD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = Sources/PromiseK/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; + PRODUCT_NAME = PromiseK; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + }; + name = Release; + }; + D6E7455A215A9ADD00547DFD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Tests/PromiseKTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseKTests; + PRODUCT_NAME = PromiseKTests; + SDKROOT = macosx; + SWIFT_VERSION = 4.2; + }; + name = Debug; + }; + D6E7455B215A9ADD00547DFD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Tests/PromiseKTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseKTests; + PRODUCT_NAME = PromiseKTests; + SDKROOT = macosx; + SWIFT_VERSION = 4.2; + }; + name = Release; + }; + D6E74573215A9AFB00547DFD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Sources/PromiseK/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; + PRODUCT_NAME = PromiseK; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Debug; + }; + D6E74574215A9AFB00547DFD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Sources/PromiseK/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; + PRODUCT_NAME = PromiseK; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Release; + }; + D6E74576215A9AFB00547DFD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = Tests/PromiseKTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseKTests; + PRODUCT_NAME = PromiseKTests; + SDKROOT = appletvos; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + }; + name = Debug; + }; + D6E74577215A9AFB00547DFD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = Tests/PromiseKTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseKTests; + PRODUCT_NAME = PromiseKTests; + SDKROOT = appletvos; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + }; + name = Release; + }; + D6E74583215A9B0B00547DFD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Sources/PromiseK/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; + PRODUCT_NAME = PromiseK; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Debug; + }; + D6E74584215A9B0B00547DFD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Sources/PromiseK/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; + PRODUCT_NAME = PromiseK; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -465,6 +989,51 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + D6E74556215A9ADD00547DFD /* Build configuration list for PBXNativeTarget "PromiseK-macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D6E74557215A9ADD00547DFD /* Debug */, + D6E74558215A9ADD00547DFD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D6E74559215A9ADD00547DFD /* Build configuration list for PBXNativeTarget "PromiseKTests-macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D6E7455A215A9ADD00547DFD /* Debug */, + D6E7455B215A9ADD00547DFD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D6E74572215A9AFB00547DFD /* Build configuration list for PBXNativeTarget "PromiseK-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D6E74573215A9AFB00547DFD /* Debug */, + D6E74574215A9AFB00547DFD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D6E74575215A9AFB00547DFD /* Build configuration list for PBXNativeTarget "PromiseKTests-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D6E74576215A9AFB00547DFD /* Debug */, + D6E74577215A9AFB00547DFD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D6E74582215A9B0B00547DFD /* Build configuration list for PBXNativeTarget "PromiseK-watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D6E74583215A9B0B00547DFD /* Debug */, + D6E74584215A9B0B00547DFD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = D62C6C681FB4AC9100E7DF02 /* Project object */; diff --git a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-macOS.xcscheme b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-macOS.xcscheme new file mode 100644 index 0000000..c12039f --- /dev/null +++ b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-macOS.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-tvOS.xcscheme b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-tvOS.xcscheme new file mode 100644 index 0000000..20bbfee --- /dev/null +++ b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-tvOS.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-watchOS.xcscheme b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-watchOS.xcscheme new file mode 100644 index 0000000..3a5d851 --- /dev/null +++ b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-watchOS.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/PromiseK/PromiseK.h b/Sources/PromiseK/PromiseK.h index 19f566d..f8b9758 100644 --- a/Sources/PromiseK/PromiseK.h +++ b/Sources/PromiseK/PromiseK.h @@ -1,4 +1,4 @@ -#import +#import //! Project version number for PromiseK. FOUNDATION_EXPORT double PromiseKVersionNumber; From 25ad0b7a82e4be28ad6ca9ed92691d9924acb950 Mon Sep 17 00:00:00 2001 From: Yuta Koshizawa Date: Wed, 26 Sep 2018 01:50:38 +0900 Subject: [PATCH 5/7] Add .travis.yml --- .travis.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a4f7ac3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +matrix: + include: + - os: osx + language: objective-c + osx_image: xcode10 + script: + - set -o pipefail + - xcodebuild test -scheme PromiseK-macOS -configuration Debug | xcpretty -c + - xcodebuild test -scheme PromiseK-iOS -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone XS" | xcpretty -c + - xcodebuild test -scheme PromiseK-tvOS -configuration Debug -sdk appletvsimulator -destination "platform=tvOS Simulator,name=Apple TV 4K" | xcpretty -c + - xcodebuild build -scheme PromiseK-watchOS -configuration Debug -sdk watchsimulator -destination "platform=watchOS Simulator,name=Apple Watch Series 4 - 44mm" | xcpretty -c + - os: osx + language: generic + osx_image: xcode10 + script: + - swift --version + - swift build + - swift test + - os: linux + language: generic + sudo: required + env: SWIFT_VERSION=4.2 + install: + - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" + script: + - swift --version + - swift build + - swift test From d050923f827c93c6f1536d166433448d6e36f407 Mon Sep 17 00:00:00 2001 From: Yuta Koshizawa Date: Wed, 26 Sep 2018 01:56:23 +0900 Subject: [PATCH 6/7] Replace `arc4random` with a new random API --- Tests/PromiseKTests/PromiseKTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/PromiseKTests/PromiseKTests.swift b/Tests/PromiseKTests/PromiseKTests.swift index 271dbb9..8572a37 100644 --- a/Tests/PromiseKTests/PromiseKTests.swift +++ b/Tests/PromiseKTests/PromiseKTests.swift @@ -296,7 +296,7 @@ func asyncGetOrFail(_ value: Int, _ fails: Bool) -> Promise<() throws -> Int> { } func asyncFailable(_ value: Int) -> Promise<() throws -> Int> { - return asyncGetOrFail(value, arc4random() % 2 == 0) + return asyncGetOrFail(value, Bool.random()) } struct FooError: Error { From 7998a468bcf9e8123ee3141ddb5c8d62455b6d28 Mon Sep 17 00:00:00 2001 From: Yuta Koshizawa Date: Wed, 26 Sep 2018 02:14:16 +0900 Subject: [PATCH 7/7] Generate tests for Linux --- PromiseK.xcodeproj/project.pbxproj | 2 -- Tests/LinuxMain.swift | 10 ++++++---- Tests/PromiseKTests/XCTestManifests.swift | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 Tests/PromiseKTests/XCTestManifests.swift diff --git a/PromiseK.xcodeproj/project.pbxproj b/PromiseK.xcodeproj/project.pbxproj index 52f8370..97ec3be 100644 --- a/PromiseK.xcodeproj/project.pbxproj +++ b/PromiseK.xcodeproj/project.pbxproj @@ -56,7 +56,6 @@ D62C6C8E1FB4AD0100E7DF02 /* Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Promise.swift; sourceTree = ""; }; D62C6C8F1FB4AD0100E7DF02 /* PromiseK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PromiseK.h; sourceTree = ""; }; D62C6C901FB4AD0100E7DF02 /* Throws.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Throws.swift; sourceTree = ""; }; - D62C6C961FB4AD2900E7DF02 /* LinuxMain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = ""; }; D62C6C981FB4AD2900E7DF02 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D62C6C991FB4AD2900E7DF02 /* PromiseKTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseKTests.swift; sourceTree = ""; }; D62C6CA21FB4AE6900E7DF02 /* PromiseK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -169,7 +168,6 @@ D62C6C951FB4AD2900E7DF02 /* Tests */ = { isa = PBXGroup; children = ( - D62C6C961FB4AD2900E7DF02 /* LinuxMain.swift */, D62C6C971FB4AD2900E7DF02 /* PromiseKTests */, ); path = Tests; diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index f12c409..4f1281d 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -1,6 +1,8 @@ import XCTest -@testable import PromiseKTests -XCTMain([ - testCase(PromiseKTests.allTests), -]) +import PromiseKTests + +var tests = [XCTestCaseEntry]() +tests += PromiseKTests.__allTests() + +XCTMain(tests) diff --git a/Tests/PromiseKTests/XCTestManifests.swift b/Tests/PromiseKTests/XCTestManifests.swift new file mode 100644 index 0000000..eb4c997 --- /dev/null +++ b/Tests/PromiseKTests/XCTestManifests.swift @@ -0,0 +1,23 @@ +import XCTest + +extension PromiseKTests { + static let __allTests = [ + ("testDescription", testDescription), + ("testFailableFlatMap", testFailableFlatMap), + ("testFailableMap", testFailableMap), + ("testFlatMap", testFlatMap), + ("testGet", testGet), + ("testKeepingFulfill", testKeepingFulfill), + ("testMap", testMap), + ("testSample", testSample), + ("testSynchronization", testSynchronization), + ] +} + +#if !os(macOS) +public func __allTests() -> [XCTestCaseEntry] { + return [ + testCase(PromiseKTests.__allTests), + ] +} +#endif