diff --git a/.travis.yml b/.travis.yml index cbfec1a7..62769a51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,3 @@ language: objective-c -osx_image: xcode7.3 +osx_image: xcode9.2 script: make ci diff --git a/Cartfile.resolved b/Cartfile.resolved index 42f5e9f1..9012d6e8 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ -github "Quick/Nimble" "v4.0.1" -github "specta/expecta" "v1.0.5" +github "Quick/Nimble" "v7.0.3" +github "specta/expecta" "v1.0.6" diff --git a/Classes/Core/KWExample.h b/Classes/Core/KWExample.h index 58777f61..1c7cf0c7 100644 --- a/Classes/Core/KWExample.h +++ b/Classes/Core/KWExample.h @@ -141,7 +141,7 @@ void pendingWithCallSite(KWCallSite *aCallSite, NSString *aDescription, void (^b */ void let(id name, id (^block)(void)); // coax Xcode into autocompleting #define let(var, ...) \ - __block __typeof__((__VA_ARGS__)()) var = nil; \ + __block __typeof__((__VA_ARGS__)()) var; \ let_(KW_LET_REF(var), #var, __VA_ARGS__) #define PRAGMA(x) _Pragma (#x) diff --git a/Classes/Core/KWFutureObject.m b/Classes/Core/KWFutureObject.m index 52c654b5..f1c98f36 100644 --- a/Classes/Core/KWFutureObject.m +++ b/Classes/Core/KWFutureObject.m @@ -16,7 +16,7 @@ @interface KWFutureObject() @implementation KWFutureObject -+ (id)objectWithObjectPointer:(id *)pointer { ++ (id)objectWithObjectPointer:(id __autoreleasing *)pointer { return [self futureObjectWithBlock:^{ return *pointer; }]; } diff --git a/Classes/Core/KWSpec.m b/Classes/Core/KWSpec.m index 3e845170..53fcea71 100644 --- a/Classes/Core/KWSpec.m +++ b/Classes/Core/KWSpec.m @@ -48,7 +48,7 @@ + (NSArray *)testInvocations { // Only return invocation if the receiver is a concrete spec that has overridden -buildExampleGroups. if ([self methodForSelector:buildExampleGroups] == [KWSpec methodForSelector:buildExampleGroups]) - return nil; + return @[]; KWExampleSuite *exampleSuite = [[KWExampleSuiteBuilder sharedExampleSuiteBuilder] buildExampleSuite:^{ [self buildExampleGroups]; diff --git a/Classes/Matchers/KWChangeMatcher.h b/Classes/Matchers/KWChangeMatcher.h index 89d37d68..6aa19e42 100644 --- a/Classes/Matchers/KWChangeMatcher.h +++ b/Classes/Matchers/KWChangeMatcher.h @@ -8,7 +8,7 @@ #import "KWMatcher.h" -typedef NSInteger (^KWChangeMatcherCountBlock)(); +typedef NSInteger (^KWChangeMatcherCountBlock)(void); @interface KWChangeMatcher : KWMatcher diff --git a/Classes/Matchers/KWUserDefinedMatcher.h b/Classes/Matchers/KWUserDefinedMatcher.h index 85a62fc8..ef16ca6a 100644 --- a/Classes/Matchers/KWUserDefinedMatcher.h +++ b/Classes/Matchers/KWUserDefinedMatcher.h @@ -9,7 +9,10 @@ #import #import "KWMatcher.h" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" typedef BOOL (^KWUserDefinedMatcherBlock)(); +#pragma clang diagnostic pop @interface KWUserDefinedMatcher : KWMatcher diff --git a/Kiwi.podspec b/Kiwi.podspec index b95b46fa..7dd7d6c0 100644 --- a/Kiwi.podspec +++ b/Kiwi.podspec @@ -16,8 +16,8 @@ Pod::Spec.new do |s| 'Adam Sharp' => 'adsharp@me.com', } - s.ios.deployment_target = '5.1.1' - s.osx.deployment_target = '10.7' + s.ios.deployment_target = '8.0' + s.osx.deployment_target = '10.8' s.framework = 'XCTest' s.source_files = 'Classes/**/*.{h,m}' @@ -25,4 +25,3 @@ Pod::Spec.new do |s| s.prefix_header_contents = '#import ' end - diff --git a/Kiwi.xcodeproj/project.pbxproj b/Kiwi.xcodeproj/project.pbxproj index 510c03a5..90e8797f 100755 --- a/Kiwi.xcodeproj/project.pbxproj +++ b/Kiwi.xcodeproj/project.pbxproj @@ -247,8 +247,8 @@ 4AE030C81AEB494400556381 /* KWValueTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F5C6FD2311782A290068BBC8 /* KWValueTest.m */; }; 4AE030C91AEB494400556381 /* NSNumber_KiwiAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9C69F7190CA6EE002C4DC0 /* NSNumber_KiwiAdditionsTests.m */; }; 4AE030CA1AEB4DCF00556381 /* NSObject+KiwiSpyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F982CD916A802920030A0B1 /* NSObject+KiwiSpyAdditions.m */; }; - 50ACAF651BBA28D000F29B0F /* DoNotUseMe.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ACAF641BBA28D000F29B0F /* DoNotUseMe.m */; settings = {ASSET_TAGS = (); }; }; - 50ACAF661BBA28D000F29B0F /* DoNotUseMe.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ACAF641BBA28D000F29B0F /* DoNotUseMe.m */; settings = {ASSET_TAGS = (); }; }; + 50ACAF651BBA28D000F29B0F /* DoNotUseMe.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ACAF641BBA28D000F29B0F /* DoNotUseMe.m */; }; + 50ACAF661BBA28D000F29B0F /* DoNotUseMe.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ACAF641BBA28D000F29B0F /* DoNotUseMe.m */; }; CE0736B41B8577140023EBEA /* Expecta.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE0736B31B8577140023EBEA /* Expecta.framework */; }; CE0736B61B85771E0023EBEA /* Expecta.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE0736B51B85771E0023EBEA /* Expecta.framework */; }; CE0736B81B8577490023EBEA /* KWExpectaTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CE0736B71B8577490023EBEA /* KWExpectaTests.m */; }; @@ -1665,7 +1665,7 @@ attributes = { LastSwiftUpdateCheck = 0700; LastTestingUpgradeCheck = 0600; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0920; ORGANIZATIONNAME = "Allen Ding"; TargetAttributes = { 4AE02FBC1AEB45EB00556381 = { @@ -2121,7 +2121,7 @@ INFOPLIST_FILE = "Supporting Files/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.8; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(KIWI_PRODUCT_NAME)"; @@ -2165,7 +2165,7 @@ INFOPLIST_FILE = "Supporting Files/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.8; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(KIWI_PRODUCT_NAME)"; SDKROOT = macosx; @@ -2211,6 +2211,7 @@ PRODUCT_NAME = "$(KIWI_TESTS_PRODUCT_NAME)"; SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -2243,17 +2244,27 @@ MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(KIWI_TESTS_PRODUCT_NAME)"; SDKROOT = macosx; + SWIFT_VERSION = 4.0; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ENABLE_BITCODE = NO; @@ -2271,9 +2282,10 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; KIWI_PRODUCT_NAME = Kiwi; KIWI_TESTS_PRODUCT_NAME = KiwiTests; + MACOSX_DEPLOYMENT_TARGET = 10.8; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = "org.kiwi-bdd.$(PRODUCT_NAME:rfc1034identifier)"; RUN_CLANG_STATIC_ANALYZER = YES; @@ -2286,11 +2298,20 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ENABLE_BITCODE = NO; @@ -2306,12 +2327,14 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; KIWI_PRODUCT_NAME = Kiwi; KIWI_TESTS_PRODUCT_NAME = KiwiTests; + MACOSX_DEPLOYMENT_TARGET = 10.8; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PRODUCT_BUNDLE_IDENTIFIER = "org.kiwi-bdd.$(PRODUCT_NAME:rfc1034identifier)"; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; WARNING_CFLAGS = "-Wall"; }; @@ -2327,7 +2350,7 @@ CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -2371,7 +2394,7 @@ CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -2433,6 +2456,7 @@ MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = "$(KIWI_TESTS_PRODUCT_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -2462,6 +2486,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(KIWI_TESTS_PRODUCT_NAME)"; + SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/Kiwi.xcodeproj/xcshareddata/xcschemes/Kiwi-OSX.xcscheme b/Kiwi.xcodeproj/xcshareddata/xcschemes/Kiwi-OSX.xcscheme index 6976526d..357eca07 100644 --- a/Kiwi.xcodeproj/xcshareddata/xcschemes/Kiwi-OSX.xcscheme +++ b/Kiwi.xcodeproj/xcshareddata/xcschemes/Kiwi-OSX.xcscheme @@ -1,6 +1,6 @@