From 58b30d59e92b1e291663eafad9d58616eb4b1bc4 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Wed, 2 Sep 2020 16:13:17 -0700 Subject: [PATCH 001/195] Initial Commit --- MonsterCards.xcodeproj/project.pbxproj | 613 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcschemes/xcschememanagement.plist | 14 + MonsterCards/AppDelegate.h | 20 + MonsterCards/AppDelegate.m | 86 +++ .../AppIcon.appiconset/Contents.json | 98 +++ MonsterCards/Assets.xcassets/Contents.json | 6 + .../first.imageset/Contents.json | 12 + .../Assets.xcassets/first.imageset/first.pdf | Bin 0 -> 2465 bytes .../second.imageset/Contents.json | 12 + .../second.imageset/second.pdf | Bin 0 -> 2423 bytes .../Base.lproj/LaunchScreen.storyboard | 25 + MonsterCards/Base.lproj/Main.storyboard | 102 +++ MonsterCards/FirstViewController.h | 15 + MonsterCards/FirstViewController.m | 23 + MonsterCards/Info.plist | 74 +++ .../.xccurrentversion | 8 + .../MonsterCards.xcdatamodel/contents | 4 + MonsterCards/SceneDelegate.h | 16 + MonsterCards/SceneDelegate.m | 62 ++ MonsterCards/SecondViewController.h | 15 + MonsterCards/SecondViewController.m | 23 + MonsterCards/main.m | 19 + MonsterCardsTests/Info.plist | 22 + MonsterCardsTests/MonsterCardsTests.m | 37 ++ MonsterCardsUITests/Info.plist | 22 + MonsterCardsUITests/MonsterCardsUITests.m | 48 ++ 28 files changed, 1391 insertions(+) create mode 100644 MonsterCards.xcodeproj/project.pbxproj create mode 100644 MonsterCards.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 MonsterCards.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 MonsterCards.xcodeproj/xcuserdata/tom.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 MonsterCards/AppDelegate.h create mode 100644 MonsterCards/AppDelegate.m create mode 100644 MonsterCards/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 MonsterCards/Assets.xcassets/Contents.json create mode 100644 MonsterCards/Assets.xcassets/first.imageset/Contents.json create mode 100644 MonsterCards/Assets.xcassets/first.imageset/first.pdf create mode 100644 MonsterCards/Assets.xcassets/second.imageset/Contents.json create mode 100644 MonsterCards/Assets.xcassets/second.imageset/second.pdf create mode 100644 MonsterCards/Base.lproj/LaunchScreen.storyboard create mode 100644 MonsterCards/Base.lproj/Main.storyboard create mode 100644 MonsterCards/FirstViewController.h create mode 100644 MonsterCards/FirstViewController.m create mode 100644 MonsterCards/Info.plist create mode 100644 MonsterCards/MonsterCards.xcdatamodeld/.xccurrentversion create mode 100644 MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents create mode 100644 MonsterCards/SceneDelegate.h create mode 100644 MonsterCards/SceneDelegate.m create mode 100644 MonsterCards/SecondViewController.h create mode 100644 MonsterCards/SecondViewController.m create mode 100644 MonsterCards/main.m create mode 100644 MonsterCardsTests/Info.plist create mode 100644 MonsterCardsTests/MonsterCardsTests.m create mode 100644 MonsterCardsUITests/Info.plist create mode 100644 MonsterCardsUITests/MonsterCardsUITests.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0c3b440 --- /dev/null +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -0,0 +1,613 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + E2F7247525005E89007D87ED /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247425005E89007D87ED /* AppDelegate.m */; }; + E2F7247825005E89007D87ED /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247725005E89007D87ED /* SceneDelegate.m */; }; + E2F7247B25005E89007D87ED /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247A25005E89007D87ED /* FirstViewController.m */; }; + E2F7247E25005E89007D87ED /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247D25005E89007D87ED /* SecondViewController.m */; }; + E2F7248125005E89007D87ED /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2F7247F25005E89007D87ED /* Main.storyboard */; }; + E2F7248425005E89007D87ED /* MonsterCards.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E2F7248225005E89007D87ED /* MonsterCards.xcdatamodeld */; }; + E2F7248625005E8A007D87ED /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2F7248525005E8A007D87ED /* Assets.xcassets */; }; + E2F7248925005E8A007D87ED /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2F7248725005E8A007D87ED /* LaunchScreen.storyboard */; }; + E2F7248C25005E8A007D87ED /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7248B25005E8A007D87ED /* main.m */; }; + E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7249525005E8A007D87ED /* MonsterCardsTests.m */; }; + E2F724A125005E8A007D87ED /* MonsterCardsUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F724A025005E8A007D87ED /* MonsterCardsUITests.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E2F7249225005E8A007D87ED /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E2F7246825005E89007D87ED /* Project object */; + proxyType = 1; + remoteGlobalIDString = E2F7246F25005E89007D87ED; + remoteInfo = MonsterCards; + }; + E2F7249D25005E8A007D87ED /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E2F7246825005E89007D87ED /* Project object */; + proxyType = 1; + remoteGlobalIDString = E2F7246F25005E89007D87ED; + remoteInfo = MonsterCards; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + E2F7247025005E89007D87ED /* MonsterCards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MonsterCards.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E2F7247325005E89007D87ED /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + E2F7247425005E89007D87ED /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + E2F7247625005E89007D87ED /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; + E2F7247725005E89007D87ED /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; + E2F7247925005E89007D87ED /* FirstViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; }; + E2F7247A25005E89007D87ED /* FirstViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; }; + E2F7247C25005E89007D87ED /* SecondViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; }; + E2F7247D25005E89007D87ED /* SecondViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; }; + E2F7248025005E89007D87ED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + E2F7248325005E89007D87ED /* MonsterCards.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MonsterCards.xcdatamodel; sourceTree = ""; }; + E2F7248525005E8A007D87ED /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E2F7248825005E8A007D87ED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + E2F7248A25005E8A007D87ED /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2F7248B25005E8A007D87ED /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + E2F7249125005E8A007D87ED /* MonsterCardsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MonsterCardsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + E2F7249525005E8A007D87ED /* MonsterCardsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonsterCardsTests.m; sourceTree = ""; }; + E2F7249725005E8A007D87ED /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2F7249C25005E8A007D87ED /* MonsterCardsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MonsterCardsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + E2F724A025005E8A007D87ED /* MonsterCardsUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonsterCardsUITests.m; sourceTree = ""; }; + E2F724A225005E8A007D87ED /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E2F7246D25005E89007D87ED /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2F7248E25005E8A007D87ED /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2F7249925005E8A007D87ED /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E2F7246725005E89007D87ED = { + isa = PBXGroup; + children = ( + E2F7247225005E89007D87ED /* MonsterCards */, + E2F7249425005E8A007D87ED /* MonsterCardsTests */, + E2F7249F25005E8A007D87ED /* MonsterCardsUITests */, + E2F7247125005E89007D87ED /* Products */, + ); + sourceTree = ""; + }; + E2F7247125005E89007D87ED /* Products */ = { + isa = PBXGroup; + children = ( + E2F7247025005E89007D87ED /* MonsterCards.app */, + E2F7249125005E8A007D87ED /* MonsterCardsTests.xctest */, + E2F7249C25005E8A007D87ED /* MonsterCardsUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + E2F7247225005E89007D87ED /* MonsterCards */ = { + isa = PBXGroup; + children = ( + E2F7247325005E89007D87ED /* AppDelegate.h */, + E2F7247425005E89007D87ED /* AppDelegate.m */, + E2F7247625005E89007D87ED /* SceneDelegate.h */, + E2F7247725005E89007D87ED /* SceneDelegate.m */, + E2F7247925005E89007D87ED /* FirstViewController.h */, + E2F7247A25005E89007D87ED /* FirstViewController.m */, + E2F7247C25005E89007D87ED /* SecondViewController.h */, + E2F7247D25005E89007D87ED /* SecondViewController.m */, + E2F7247F25005E89007D87ED /* Main.storyboard */, + E2F7248525005E8A007D87ED /* Assets.xcassets */, + E2F7248725005E8A007D87ED /* LaunchScreen.storyboard */, + E2F7248A25005E8A007D87ED /* Info.plist */, + E2F7248B25005E8A007D87ED /* main.m */, + E2F7248225005E89007D87ED /* MonsterCards.xcdatamodeld */, + ); + path = MonsterCards; + sourceTree = ""; + }; + E2F7249425005E8A007D87ED /* MonsterCardsTests */ = { + isa = PBXGroup; + children = ( + E2F7249525005E8A007D87ED /* MonsterCardsTests.m */, + E2F7249725005E8A007D87ED /* Info.plist */, + ); + path = MonsterCardsTests; + sourceTree = ""; + }; + E2F7249F25005E8A007D87ED /* MonsterCardsUITests */ = { + isa = PBXGroup; + children = ( + E2F724A025005E8A007D87ED /* MonsterCardsUITests.m */, + E2F724A225005E8A007D87ED /* Info.plist */, + ); + path = MonsterCardsUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E2F7246F25005E89007D87ED /* MonsterCards */ = { + isa = PBXNativeTarget; + buildConfigurationList = E2F724A525005E8A007D87ED /* Build configuration list for PBXNativeTarget "MonsterCards" */; + buildPhases = ( + E2F7246C25005E89007D87ED /* Sources */, + E2F7246D25005E89007D87ED /* Frameworks */, + E2F7246E25005E89007D87ED /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MonsterCards; + productName = MonsterCards; + productReference = E2F7247025005E89007D87ED /* MonsterCards.app */; + productType = "com.apple.product-type.application"; + }; + E2F7249025005E8A007D87ED /* MonsterCardsTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = E2F724A825005E8A007D87ED /* Build configuration list for PBXNativeTarget "MonsterCardsTests" */; + buildPhases = ( + E2F7248D25005E8A007D87ED /* Sources */, + E2F7248E25005E8A007D87ED /* Frameworks */, + E2F7248F25005E8A007D87ED /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E2F7249325005E8A007D87ED /* PBXTargetDependency */, + ); + name = MonsterCardsTests; + productName = MonsterCardsTests; + productReference = E2F7249125005E8A007D87ED /* MonsterCardsTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + E2F7249B25005E8A007D87ED /* MonsterCardsUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = E2F724AB25005E8A007D87ED /* Build configuration list for PBXNativeTarget "MonsterCardsUITests" */; + buildPhases = ( + E2F7249825005E8A007D87ED /* Sources */, + E2F7249925005E8A007D87ED /* Frameworks */, + E2F7249A25005E8A007D87ED /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E2F7249E25005E8A007D87ED /* PBXTargetDependency */, + ); + name = MonsterCardsUITests; + productName = MonsterCardsUITests; + productReference = E2F7249C25005E8A007D87ED /* MonsterCardsUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E2F7246825005E89007D87ED /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1170; + ORGANIZATIONNAME = "Tom Hicks"; + TargetAttributes = { + E2F7246F25005E89007D87ED = { + CreatedOnToolsVersion = 11.7; + }; + E2F7249025005E8A007D87ED = { + CreatedOnToolsVersion = 11.7; + TestTargetID = E2F7246F25005E89007D87ED; + }; + E2F7249B25005E8A007D87ED = { + CreatedOnToolsVersion = 11.7; + TestTargetID = E2F7246F25005E89007D87ED; + }; + }; + }; + buildConfigurationList = E2F7246B25005E89007D87ED /* Build configuration list for PBXProject "MonsterCards" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = E2F7246725005E89007D87ED; + productRefGroup = E2F7247125005E89007D87ED /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E2F7246F25005E89007D87ED /* MonsterCards */, + E2F7249025005E8A007D87ED /* MonsterCardsTests */, + E2F7249B25005E8A007D87ED /* MonsterCardsUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E2F7246E25005E89007D87ED /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2F7248925005E8A007D87ED /* LaunchScreen.storyboard in Resources */, + E2F7248625005E8A007D87ED /* Assets.xcassets in Resources */, + E2F7248125005E89007D87ED /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2F7248F25005E8A007D87ED /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2F7249A25005E8A007D87ED /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E2F7246C25005E89007D87ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2F7247E25005E89007D87ED /* SecondViewController.m in Sources */, + E2F7247525005E89007D87ED /* AppDelegate.m in Sources */, + E2F7247B25005E89007D87ED /* FirstViewController.m in Sources */, + E2F7248425005E89007D87ED /* MonsterCards.xcdatamodeld in Sources */, + E2F7248C25005E8A007D87ED /* main.m in Sources */, + E2F7247825005E89007D87ED /* SceneDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2F7248D25005E8A007D87ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2F7249825005E8A007D87ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2F724A125005E8A007D87ED /* MonsterCardsUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E2F7249325005E8A007D87ED /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E2F7246F25005E89007D87ED /* MonsterCards */; + targetProxy = E2F7249225005E8A007D87ED /* PBXContainerItemProxy */; + }; + E2F7249E25005E8A007D87ED /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E2F7246F25005E89007D87ED /* MonsterCards */; + targetProxy = E2F7249D25005E8A007D87ED /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + E2F7247F25005E89007D87ED /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E2F7248025005E89007D87ED /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + E2F7248725005E8A007D87ED /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E2F7248825005E8A007D87ED /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + E2F724A325005E8A007D87ED /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + 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; + 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.7; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + E2F724A425005E8A007D87ED /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + 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; + 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.7; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + E2F724A625005E8A007D87ED /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = J793L9LQJ2; + INFOPLIST_FILE = MonsterCards/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.majinnaibu.monstercards.MonsterCards; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + E2F724A725005E8A007D87ED /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = J793L9LQJ2; + INFOPLIST_FILE = MonsterCards/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.majinnaibu.monstercards.MonsterCards; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + E2F724A925005E8A007D87ED /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = J793L9LQJ2; + INFOPLIST_FILE = MonsterCardsTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.7; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.majinnaibu.monstercards.MonsterCardsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MonsterCards.app/MonsterCards"; + }; + name = Debug; + }; + E2F724AA25005E8A007D87ED /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = J793L9LQJ2; + INFOPLIST_FILE = MonsterCardsTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.7; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.majinnaibu.monstercards.MonsterCardsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MonsterCards.app/MonsterCards"; + }; + name = Release; + }; + E2F724AC25005E8A007D87ED /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = J793L9LQJ2; + INFOPLIST_FILE = MonsterCardsUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.majinnaibu.monstercards.MonsterCardsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MonsterCards; + }; + name = Debug; + }; + E2F724AD25005E8A007D87ED /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = J793L9LQJ2; + INFOPLIST_FILE = MonsterCardsUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.majinnaibu.monstercards.MonsterCardsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MonsterCards; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E2F7246B25005E89007D87ED /* Build configuration list for PBXProject "MonsterCards" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2F724A325005E8A007D87ED /* Debug */, + E2F724A425005E8A007D87ED /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E2F724A525005E8A007D87ED /* Build configuration list for PBXNativeTarget "MonsterCards" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2F724A625005E8A007D87ED /* Debug */, + E2F724A725005E8A007D87ED /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E2F724A825005E8A007D87ED /* Build configuration list for PBXNativeTarget "MonsterCardsTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2F724A925005E8A007D87ED /* Debug */, + E2F724AA25005E8A007D87ED /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E2F724AB25005E8A007D87ED /* Build configuration list for PBXNativeTarget "MonsterCardsUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2F724AC25005E8A007D87ED /* Debug */, + E2F724AD25005E8A007D87ED /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + E2F7248225005E89007D87ED /* MonsterCards.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + E2F7248325005E89007D87ED /* MonsterCards.xcdatamodel */, + ); + currentVersion = E2F7248325005E89007D87ED /* MonsterCards.xcdatamodel */; + path = MonsterCards.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = E2F7246825005E89007D87ED /* Project object */; +} diff --git a/MonsterCards.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MonsterCards.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..400440a --- /dev/null +++ b/MonsterCards.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/MonsterCards.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/MonsterCards.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/MonsterCards.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/MonsterCards.xcodeproj/xcuserdata/tom.xcuserdatad/xcschemes/xcschememanagement.plist b/MonsterCards.xcodeproj/xcuserdata/tom.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..f36fb5c --- /dev/null +++ b/MonsterCards.xcodeproj/xcuserdata/tom.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + MonsterCards.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/MonsterCards/AppDelegate.h b/MonsterCards/AppDelegate.h new file mode 100644 index 0000000..5518be8 --- /dev/null +++ b/MonsterCards/AppDelegate.h @@ -0,0 +1,20 @@ +// +// AppDelegate.h +// MonsterCards +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import + +@interface AppDelegate : UIResponder + +@property (readonly, strong) NSPersistentCloudKitContainer *persistentContainer; + +- (void)saveContext; + + +@end + diff --git a/MonsterCards/AppDelegate.m b/MonsterCards/AppDelegate.m new file mode 100644 index 0000000..2a03e31 --- /dev/null +++ b/MonsterCards/AppDelegate.m @@ -0,0 +1,86 @@ +// +// AppDelegate.m +// MonsterCards +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +#pragma mark - UISceneSession lifecycle + + +- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; +} + + +- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. +} + + +#pragma mark - Core Data stack + +@synthesize persistentContainer = _persistentContainer; + +- (NSPersistentCloudKitContainer *)persistentContainer { + // The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it. + @synchronized (self) { + if (_persistentContainer == nil) { + _persistentContainer = [[NSPersistentCloudKitContainer alloc] initWithName:@"MonsterCards"]; + [_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) { + if (error != nil) { + // Replace this implementation with code to handle the error appropriately. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + + /* + Typical reasons for an error here include: + * The parent directory does not exist, cannot be created, or disallows writing. + * The persistent store is not accessible, due to permissions or data protection when the device is locked. + * The device is out of space. + * The store could not be migrated to the current model version. + Check the error message to determine what the actual problem was. + */ + NSLog(@"Unresolved error %@, %@", error, error.userInfo); + abort(); + } + }]; + } + } + + return _persistentContainer; +} + +#pragma mark - Core Data Saving support + +- (void)saveContext { + NSManagedObjectContext *context = self.persistentContainer.viewContext; + NSError *error = nil; + if ([context hasChanges] && ![context save:&error]) { + // Replace this implementation with code to handle the error appropriately. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + NSLog(@"Unresolved error %@, %@", error, error.userInfo); + abort(); + } +} + +@end diff --git a/MonsterCards/Assets.xcassets/AppIcon.appiconset/Contents.json b/MonsterCards/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/MonsterCards/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MonsterCards/Assets.xcassets/Contents.json b/MonsterCards/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MonsterCards/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MonsterCards/Assets.xcassets/first.imageset/Contents.json b/MonsterCards/Assets.xcassets/first.imageset/Contents.json new file mode 100644 index 0000000..33a7451 --- /dev/null +++ b/MonsterCards/Assets.xcassets/first.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "first.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MonsterCards/Assets.xcassets/first.imageset/first.pdf b/MonsterCards/Assets.xcassets/first.imageset/first.pdf new file mode 100644 index 0000000000000000000000000000000000000000..47d911dea647d55983671ead4d08b6f6b3600715 GIT binary patch literal 2465 zcmai03se(l7FLvisY+L#f-EBsK`11Xkc1=%MIujmB|xQ!>5vQ%APFP`Mlf5nSPOKE z2-^C>7DZkM!J;Da5{kfrC?Kvp3J41-3shFXvhuJqKo*oer*r0H{{P-P_x0cTzLzjD!bE z0qT;#Q7l4Gy%fMoXJaKT`@{5#R(MOqJPwQifv8iK6A%Ot9L14h2`38T!2s4PM=1!< zmL06}VYAA|ay#jZRs>HpA%X+eQW4rufWU%d1w5GTy!X#LeZsF_+~ccZmn3Fi)v^Z; zIG;?uU*yLLEYs61tjD>gXOFvSWsh{48xJvPNqKrIJtMdCz2cA2aC7TF?b@K`V!Lw- zE;zpH&ApqhoRjAHt}gK}>(qAc8dvrkD31*`<5<%C(&4_LqhQ3-GOf8~n^leG?+-@@^pjPa$J2gW@O)!b9hdTJ zTauyIJ&~rqeEZC1p9dWgx7{_WRc2=drMO=wcT7B{Zd58z`d)r_36r4V<6PGkCjpGfbnVMtm@;b}F!T?)Qav$_y7H5T;Mf!T}M zWxP9TNqrV?e5;b|pWd3^u2KAatk&3aDB@0 zZBaQNdCZ2#fblzYZnRCCjQ-GQWb-s8bX&<)?SxnUGdDYVFVk`xIf7@g3~$DX`H71_;r5OSZz1p`$_8y_9 z{;MJJ+n=>7Ewg;GnGHoz)&ID0z@F2!e$F7cWQ?d6s(!VY)_Gw})xCyMvsD={5i&H* zAIr_ACo8;Se6<*!-mm9Am79Iz^RVlc?%S5sg|E*SyIV{dd9{Mpf#d3cih5WKt=%ps zBEo)bt8EjmeCFYJRYU|b7d`p+-V|X2wOCYtyLP6t=!WH-kgdf0A};ytPfZiCwVPx{ z`g;zpe{8a4RQxQUwVU02<4X3w|9h;}XjhGWquqn{vVqq8g{*}BQF9=ybe_TM*!M=rFs1pN)yzctIXAoicsCe6>fit>wgZ#vp^hZOY0`J`rx zwdSK?GwR_xm9;5XjH|vf{O+Yg-)z;s*xt>;-vU`D-_SK<=~4eEVQkV~57{vyH6ebu>DqwE~Mx_A31Lg~$ zy`i52ew?GEluE%AN>ju*5z~dx2QQLP-G+E>o|En2+s&<^4*d zWD+<8PXs_Jp7_5Dpi(Gg3J?M;%Rn0{dcxQRh!ip+iHJ_e`!bM1MGxwI8Iedr+x>wI zq@&04fsADHfBccq^gpm8Q_u-~Uj|Z$YwSR(^_mzUb!}Xb2Cj`uqphg}v_Y%?Fs=;= zWq3s{hy)Tu!ji@RJsd$C+G{F6V2j1*Xk+7xo|LO7M2yb)(wc=%x-AclP9pLsbTF7m tf?*P!2EjJu5MD57P32Q4pdJ3tO_shCDT2=K;$ebx8ymcd$v!V9{2$sQiO>K5 literal 0 HcmV?d00001 diff --git a/MonsterCards/Assets.xcassets/second.imageset/Contents.json b/MonsterCards/Assets.xcassets/second.imageset/Contents.json new file mode 100644 index 0000000..03bd9c9 --- /dev/null +++ b/MonsterCards/Assets.xcassets/second.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "second.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MonsterCards/Assets.xcassets/second.imageset/second.pdf b/MonsterCards/Assets.xcassets/second.imageset/second.pdf new file mode 100644 index 0000000000000000000000000000000000000000..401614e288b4b160471c2776bed6f09762af3e1c GIT binary patch literal 2423 zcmai02~-nz8dqq7rWU#)x2z)&iMWtV?gK$2a)?|BP!TbkV}J-Gl1wmy+3G9S0=uOY zwCjai6uBOPMMdNiN`VDYKwLQr2#W^`R93*Ua=0^)EGYY4=grIf|KIohziYnv{elnR zdN_hk6db<(+3RPcxs!iut8c(j0TLh=9mY931H^rhEE0|aXo!dh5Iv+ZFr+}9F+v#P zLSnfD0$f~hN>~92V{z)WJA&2)5rW!|I?;o?oI*%zejJiuY>hFLQwKlAa9O+PnPh#% zJp~JAfs-De6u@;{cREMs}D-sGib_4>50m8_|Uj-zC0m@Qx zJV+^5Da4Qxpf3sBtKZs<_aI$Cb1T+h<->yL^rfiGNelYkqgC3#SqVP_iy*_RPcbjH)xYf zvYdC-)D_t8c{=5%;$VJQxs_#61J*kuXMC?|&PbPo-7uSxoNr~&J94|gKk+03JGXXM zx4w~=^VUzWqQveu_ilRgPdgNNdnLZCH`=;w91}cP5ihdm*B_jI+rk=Pz2Lk!)XUu| zkls3P5&YHJ!t0kF+MUVBHOAx)a zy|JxHNd37z*~b5#%*0w_F|#4?erNP;pG`Fevoq2%?9Y>%Cmzv1(ks;aPIGaiy1mhU zr{7lB^Mem&`QK{b{uiDC zLD8muY(FNk{YdV|zO#o_VB%);8|~Bh(Z4p?GM}g-HN2;q7~YNl-lD~HZ$taYw$Fzbn6c?c5eo=@`i>()el#qwB)hI-gp0 ztsw@dh-I5NJkk)RCoBC`L8ffKfY)=oG=#4LA9TO6eA}9~@a6dupB+=S{%s&NY}^0GY`hAqod)uxXHitrN%bWOJohV>t?!&Z#d4y^7J@=Oh`HV zee**4j>xRUd)|D0^I-B#<`m1-5PO{)!v(q?ecFYqr_8Q{+z7#n0uFbq%_?hZ-Ck(6NRn=vDS7Nb1Xxx_)9`!i- zGR>av*PJ+P_AGO*a_$FbtCCISg5PK44p&W#t$)+HVcxpR9LAL%_Pv$p`0tO*sYZD0 zCG3-ipr4WoVbjpw%Nf^r^rnWcDcjumgBPEjO;NM6QtZ8wU#0rjHx5zs%CahF4$W*U zxu!q8kYP+>v!BNPVIRJUGIWU@7qVvx2VZDw4gV8%z%bjpF#aF(W|PmliwlakuRq>= zhaCRc^R!7T)#Twb0{!Tns=CxGcGX|leErg`f3|v0eBXxHU&6Sj-_>zOL!!d+j5Xt* zPS;rWd^zEF{5d5%)nNK=)zFJ8Uc=aQKD%UK)_TNes1Gh{SD*Mb_@O` z7*zs9Uq~Vq?v|^8FcM-yLGMKzR3YFB0z@CFM2X-dio%Gu6&MJj=I?uS7sA3AdE^p8 zE49$PjJzPIJwfn;jso7X2#jynr3dO@p5QAK1O9wqKLC=PkQjj~p#n|-5O`ihbTzzu zL{}2QEe28pJYfVZRW56FL`LvO&|C^1Th{0}hQMW$Ng$QPpnzlwnMnf=kVy8(y==L% zLMa>r0gELdT + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard new file mode 100644 index 0000000..710644b --- /dev/null +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MonsterCards/FirstViewController.h b/MonsterCards/FirstViewController.h new file mode 100644 index 0000000..5230f4c --- /dev/null +++ b/MonsterCards/FirstViewController.h @@ -0,0 +1,15 @@ +// +// FirstViewController.h +// MonsterCards +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +@interface FirstViewController : UIViewController + + +@end + diff --git a/MonsterCards/FirstViewController.m b/MonsterCards/FirstViewController.m new file mode 100644 index 0000000..aea746b --- /dev/null +++ b/MonsterCards/FirstViewController.m @@ -0,0 +1,23 @@ +// +// FirstViewController.m +// MonsterCards +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "FirstViewController.h" + +@interface FirstViewController () + +@end + +@implementation FirstViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + + +@end diff --git a/MonsterCards/Info.plist b/MonsterCards/Info.plist new file mode 100644 index 0000000..af03792 --- /dev/null +++ b/MonsterCards/Info.plist @@ -0,0 +1,74 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarTintParameters + + UINavigationBar + + Style + UIBarStyleDefault + Translucent + + + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/MonsterCards/MonsterCards.xcdatamodeld/.xccurrentversion b/MonsterCards/MonsterCards.xcdatamodeld/.xccurrentversion new file mode 100644 index 0000000..93079bf --- /dev/null +++ b/MonsterCards/MonsterCards.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ + + + + + _XCCurrentVersionName + MonsterCards.xcdatamodel + + diff --git a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents new file mode 100644 index 0000000..5d6f17b --- /dev/null +++ b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/MonsterCards/SceneDelegate.h b/MonsterCards/SceneDelegate.h new file mode 100644 index 0000000..267ed02 --- /dev/null +++ b/MonsterCards/SceneDelegate.h @@ -0,0 +1,16 @@ +// +// SceneDelegate.h +// MonsterCards +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +@interface SceneDelegate : UIResponder + +@property (strong, nonatomic) UIWindow * window; + +@end + diff --git a/MonsterCards/SceneDelegate.m b/MonsterCards/SceneDelegate.m new file mode 100644 index 0000000..5822c42 --- /dev/null +++ b/MonsterCards/SceneDelegate.m @@ -0,0 +1,62 @@ +// +// SceneDelegate.m +// MonsterCards +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "SceneDelegate.h" +#import "AppDelegate.h" + +@interface SceneDelegate () + +@end + +@implementation SceneDelegate + + +- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). +} + + +- (void)sceneDidDisconnect:(UIScene *)scene { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). +} + + +- (void)sceneDidBecomeActive:(UIScene *)scene { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. +} + + +- (void)sceneWillResignActive:(UIScene *)scene { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). +} + + +- (void)sceneWillEnterForeground:(UIScene *)scene { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. +} + + +- (void)sceneDidEnterBackground:(UIScene *)scene { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + + // Save changes in the application's managed object context when the application transitions to the background. + [(AppDelegate *)UIApplication.sharedApplication.delegate saveContext]; +} + + +@end diff --git a/MonsterCards/SecondViewController.h b/MonsterCards/SecondViewController.h new file mode 100644 index 0000000..ae9025c --- /dev/null +++ b/MonsterCards/SecondViewController.h @@ -0,0 +1,15 @@ +// +// SecondViewController.h +// MonsterCards +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +@interface SecondViewController : UIViewController + + +@end + diff --git a/MonsterCards/SecondViewController.m b/MonsterCards/SecondViewController.m new file mode 100644 index 0000000..7a77b12 --- /dev/null +++ b/MonsterCards/SecondViewController.m @@ -0,0 +1,23 @@ +// +// SecondViewController.m +// MonsterCards +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "SecondViewController.h" + +@interface SecondViewController () + +@end + +@implementation SecondViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + + +@end diff --git a/MonsterCards/main.m b/MonsterCards/main.m new file mode 100644 index 0000000..5ea591c --- /dev/null +++ b/MonsterCards/main.m @@ -0,0 +1,19 @@ +// +// main.m +// MonsterCards +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + NSString * appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +} diff --git a/MonsterCardsTests/Info.plist b/MonsterCardsTests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/MonsterCardsTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/MonsterCardsTests/MonsterCardsTests.m b/MonsterCardsTests/MonsterCardsTests.m new file mode 100644 index 0000000..c17a47c --- /dev/null +++ b/MonsterCardsTests/MonsterCardsTests.m @@ -0,0 +1,37 @@ +// +// MonsterCardsTests.m +// MonsterCardsTests +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +@interface MonsterCardsTests : XCTestCase + +@end + +@implementation MonsterCardsTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testExample { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git a/MonsterCardsUITests/Info.plist b/MonsterCardsUITests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/MonsterCardsUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/MonsterCardsUITests/MonsterCardsUITests.m b/MonsterCardsUITests/MonsterCardsUITests.m new file mode 100644 index 0000000..ab20ba7 --- /dev/null +++ b/MonsterCardsUITests/MonsterCardsUITests.m @@ -0,0 +1,48 @@ +// +// MonsterCardsUITests.m +// MonsterCardsUITests +// +// Created by Tom Hicks on 9/2/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +@interface MonsterCardsUITests : XCTestCase + +@end + +@implementation MonsterCardsUITests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testExample { + // UI tests must launch the application that they test. + XCUIApplication *app = [[XCUIApplication alloc] init]; + [app launch]; + + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +- (void)testLaunchPerformance { + if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) { + // This measures how long it takes to launch your application. + [self measureWithMetrics:@[XCTOSSignpostMetric.applicationLaunchMetric] block:^{ + [[[XCUIApplication alloc] init] launch]; + }]; + } +} + +@end From 3af7380f3723aed9da7e59dbb700ca8eab3c16b4 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Wed, 2 Sep 2020 16:21:00 -0700 Subject: [PATCH 002/195] Makes default scheme a shared scheme. --- .../xcschemes/MonsterCards.xcscheme | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme diff --git a/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme b/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme new file mode 100644 index 0000000..e3d53aa --- /dev/null +++ b/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From d3f1e8dae2559a3567da5bd6b95bf0087a40ccd8 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Wed, 2 Sep 2020 16:41:41 -0700 Subject: [PATCH 003/195] Adds readme with build status badge. --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e2ee4e1 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +[![Build status](https://build.appcenter.ms/v0.1/apps/bbde5430-0b21-4b78-aa2f-32ce210fc578/branches/master/badge)](https://appcenter.ms) + From e017b2859d7033cd32ed21a12a317de2a04ac0be Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 3 Sep 2020 17:20:41 -0700 Subject: [PATCH 004/195] Adds space to app name. --- MonsterCards.xcodeproj/project.pbxproj | 10 +++++----- .../xcshareddata/xcschemes/MonsterCards.xcscheme | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 0c3b440..bac0f59 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -38,7 +38,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - E2F7247025005E89007D87ED /* MonsterCards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MonsterCards.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E2F7247025005E89007D87ED /* Monster Cards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Monster Cards.app"; sourceTree = BUILT_PRODUCTS_DIR; }; E2F7247325005E89007D87ED /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; E2F7247425005E89007D87ED /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; E2F7247625005E89007D87ED /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; @@ -99,7 +99,7 @@ E2F7247125005E89007D87ED /* Products */ = { isa = PBXGroup; children = ( - E2F7247025005E89007D87ED /* MonsterCards.app */, + E2F7247025005E89007D87ED /* Monster Cards.app */, E2F7249125005E8A007D87ED /* MonsterCardsTests.xctest */, E2F7249C25005E8A007D87ED /* MonsterCardsUITests.xctest */, ); @@ -162,7 +162,7 @@ ); name = MonsterCards; productName = MonsterCards; - productReference = E2F7247025005E89007D87ED /* MonsterCards.app */; + productReference = E2F7247025005E89007D87ED /* Monster Cards.app */; productType = "com.apple.product-type.application"; }; E2F7249025005E8A007D87ED /* MonsterCardsTests */ = { @@ -457,7 +457,7 @@ "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = com.majinnaibu.monstercards.MonsterCards; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = "Monster Cards"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -474,7 +474,7 @@ "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = com.majinnaibu.monstercards.MonsterCards; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = "Monster Cards"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme b/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme index e3d53aa..105be0f 100644 --- a/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme +++ b/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme @@ -15,7 +15,7 @@ @@ -65,7 +65,7 @@ @@ -82,7 +82,7 @@ From afdbe20f80275bc52484e10d071afe99a884b499 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 3 Sep 2020 17:21:19 -0700 Subject: [PATCH 005/195] Creates .gitignore and adds xcuserdata to it. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ab5ec3a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +xcuserdata + From 42636459662730ff6d9e8f4860bb4fdc02d23769 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 4 Sep 2020 21:54:00 -0700 Subject: [PATCH 006/195] Adds top level nav elements to the tab bar. --- MonsterCards.xcodeproj/project.pbxproj | 66 +++++-- MonsterCards/Base.lproj/Main.storyboard | 175 ++++++++++-------- MonsterCards/FirstViewController.h | 15 -- MonsterCards/FirstViewController.m | 23 --- MonsterCards/SecondViewController.h | 15 -- MonsterCards/SecondViewController.m | 23 --- .../Views/CollectionsViewController.h | 17 ++ .../Views/CollectionsViewController.m | 32 ++++ MonsterCards/Views/DashboardViewController.h | 17 ++ MonsterCards/Views/DashboardViewController.m | 32 ++++ MonsterCards/Views/LibraryViewController.h | 17 ++ MonsterCards/Views/LibraryViewController.m | 32 ++++ MonsterCards/Views/MonsterViewController.h | 17 ++ MonsterCards/Views/MonsterViewController.m | 32 ++++ MonsterCards/Views/SearchViewController.h | 17 ++ MonsterCards/Views/SearchViewController.m | 32 ++++ 16 files changed, 397 insertions(+), 165 deletions(-) delete mode 100644 MonsterCards/FirstViewController.h delete mode 100644 MonsterCards/FirstViewController.m delete mode 100644 MonsterCards/SecondViewController.h delete mode 100644 MonsterCards/SecondViewController.m create mode 100644 MonsterCards/Views/CollectionsViewController.h create mode 100644 MonsterCards/Views/CollectionsViewController.m create mode 100644 MonsterCards/Views/DashboardViewController.h create mode 100644 MonsterCards/Views/DashboardViewController.m create mode 100644 MonsterCards/Views/LibraryViewController.h create mode 100644 MonsterCards/Views/LibraryViewController.m create mode 100644 MonsterCards/Views/MonsterViewController.h create mode 100644 MonsterCards/Views/MonsterViewController.m create mode 100644 MonsterCards/Views/SearchViewController.h create mode 100644 MonsterCards/Views/SearchViewController.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index bac0f59..da2e0f5 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -7,10 +7,13 @@ objects = { /* Begin PBXBuildFile section */ + E20D032425031B9D00FB6E43 /* SearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032325031B9D00FB6E43 /* SearchViewController.m */; }; + E20D032825031BDA00FB6E43 /* MonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032725031BDA00FB6E43 /* MonsterViewController.m */; }; + E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032A25031BE500FB6E43 /* LibraryViewController.m */; }; + E20D032E25031BEF00FB6E43 /* CollectionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */; }; + E20D033125031BFD00FB6E43 /* DashboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D033025031BFD00FB6E43 /* DashboardViewController.m */; }; E2F7247525005E89007D87ED /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247425005E89007D87ED /* AppDelegate.m */; }; E2F7247825005E89007D87ED /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247725005E89007D87ED /* SceneDelegate.m */; }; - E2F7247B25005E89007D87ED /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247A25005E89007D87ED /* FirstViewController.m */; }; - E2F7247E25005E89007D87ED /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247D25005E89007D87ED /* SecondViewController.m */; }; E2F7248125005E89007D87ED /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2F7247F25005E89007D87ED /* Main.storyboard */; }; E2F7248425005E89007D87ED /* MonsterCards.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E2F7248225005E89007D87ED /* MonsterCards.xcdatamodeld */; }; E2F7248625005E8A007D87ED /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2F7248525005E8A007D87ED /* Assets.xcassets */; }; @@ -38,15 +41,21 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + E20D032225031B9D00FB6E43 /* SearchViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchViewController.h; sourceTree = ""; }; + E20D032325031B9D00FB6E43 /* SearchViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SearchViewController.m; sourceTree = ""; }; + E20D032625031BDA00FB6E43 /* MonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MonsterViewController.h; sourceTree = ""; }; + E20D032725031BDA00FB6E43 /* MonsterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonsterViewController.m; sourceTree = ""; }; + E20D032925031BE500FB6E43 /* LibraryViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LibraryViewController.h; sourceTree = ""; }; + E20D032A25031BE500FB6E43 /* LibraryViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LibraryViewController.m; sourceTree = ""; }; + E20D032C25031BEF00FB6E43 /* CollectionsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CollectionsViewController.h; sourceTree = ""; }; + E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CollectionsViewController.m; sourceTree = ""; }; + E20D032F25031BFD00FB6E43 /* DashboardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DashboardViewController.h; sourceTree = ""; }; + E20D033025031BFD00FB6E43 /* DashboardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DashboardViewController.m; sourceTree = ""; }; E2F7247025005E89007D87ED /* Monster Cards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Monster Cards.app"; sourceTree = BUILT_PRODUCTS_DIR; }; E2F7247325005E89007D87ED /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; E2F7247425005E89007D87ED /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; E2F7247625005E89007D87ED /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; E2F7247725005E89007D87ED /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; - E2F7247925005E89007D87ED /* FirstViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; }; - E2F7247A25005E89007D87ED /* FirstViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; }; - E2F7247C25005E89007D87ED /* SecondViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; }; - E2F7247D25005E89007D87ED /* SecondViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; }; E2F7248025005E89007D87ED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; E2F7248325005E89007D87ED /* MonsterCards.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MonsterCards.xcdatamodel; sourceTree = ""; }; E2F7248525005E8A007D87ED /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -86,6 +95,37 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + E20D032525031BA700FB6E43 /* Views */ = { + isa = PBXGroup; + children = ( + E20D032225031B9D00FB6E43 /* SearchViewController.h */, + E20D032325031B9D00FB6E43 /* SearchViewController.m */, + E20D032625031BDA00FB6E43 /* MonsterViewController.h */, + E20D032725031BDA00FB6E43 /* MonsterViewController.m */, + E20D032925031BE500FB6E43 /* LibraryViewController.h */, + E20D032A25031BE500FB6E43 /* LibraryViewController.m */, + E20D032C25031BEF00FB6E43 /* CollectionsViewController.h */, + E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */, + E20D032F25031BFD00FB6E43 /* DashboardViewController.h */, + E20D033025031BFD00FB6E43 /* DashboardViewController.m */, + ); + path = Views; + sourceTree = ""; + }; + E20D033225034C0700FB6E43 /* Models */ = { + isa = PBXGroup; + children = ( + ); + path = Models; + sourceTree = ""; + }; + E20D033325034C0C00FB6E43 /* Helpers */ = { + isa = PBXGroup; + children = ( + ); + path = Helpers; + sourceTree = ""; + }; E2F7246725005E89007D87ED = { isa = PBXGroup; children = ( @@ -109,14 +149,13 @@ E2F7247225005E89007D87ED /* MonsterCards */ = { isa = PBXGroup; children = ( + E20D033325034C0C00FB6E43 /* Helpers */, + E20D033225034C0700FB6E43 /* Models */, + E20D032525031BA700FB6E43 /* Views */, E2F7247325005E89007D87ED /* AppDelegate.h */, E2F7247425005E89007D87ED /* AppDelegate.m */, E2F7247625005E89007D87ED /* SceneDelegate.h */, E2F7247725005E89007D87ED /* SceneDelegate.m */, - E2F7247925005E89007D87ED /* FirstViewController.h */, - E2F7247A25005E89007D87ED /* FirstViewController.m */, - E2F7247C25005E89007D87ED /* SecondViewController.h */, - E2F7247D25005E89007D87ED /* SecondViewController.m */, E2F7247F25005E89007D87ED /* Main.storyboard */, E2F7248525005E8A007D87ED /* Assets.xcassets */, E2F7248725005E8A007D87ED /* LaunchScreen.storyboard */, @@ -275,12 +314,15 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E2F7247E25005E89007D87ED /* SecondViewController.m in Sources */, + E20D032825031BDA00FB6E43 /* MonsterViewController.m in Sources */, E2F7247525005E89007D87ED /* AppDelegate.m in Sources */, - E2F7247B25005E89007D87ED /* FirstViewController.m in Sources */, + E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */, + E20D033125031BFD00FB6E43 /* DashboardViewController.m in Sources */, E2F7248425005E89007D87ED /* MonsterCards.xcdatamodeld in Sources */, + E20D032E25031BEF00FB6E43 /* CollectionsViewController.m in Sources */, E2F7248C25005E8A007D87ED /* main.m in Sources */, E2F7247825005E89007D87ED /* SceneDelegate.m in Sources */, + E20D032425031B9D00FB6E43 /* SearchViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 710644b..80435d2 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -1,81 +1,12 @@ - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -86,17 +17,107 @@ - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + diff --git a/MonsterCards/FirstViewController.h b/MonsterCards/FirstViewController.h deleted file mode 100644 index 5230f4c..0000000 --- a/MonsterCards/FirstViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// FirstViewController.h -// MonsterCards -// -// Created by Tom Hicks on 9/2/20. -// Copyright © 2020 Tom Hicks. All rights reserved. -// - -#import - -@interface FirstViewController : UIViewController - - -@end - diff --git a/MonsterCards/FirstViewController.m b/MonsterCards/FirstViewController.m deleted file mode 100644 index aea746b..0000000 --- a/MonsterCards/FirstViewController.m +++ /dev/null @@ -1,23 +0,0 @@ -// -// FirstViewController.m -// MonsterCards -// -// Created by Tom Hicks on 9/2/20. -// Copyright © 2020 Tom Hicks. All rights reserved. -// - -#import "FirstViewController.h" - -@interface FirstViewController () - -@end - -@implementation FirstViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. -} - - -@end diff --git a/MonsterCards/SecondViewController.h b/MonsterCards/SecondViewController.h deleted file mode 100644 index ae9025c..0000000 --- a/MonsterCards/SecondViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// SecondViewController.h -// MonsterCards -// -// Created by Tom Hicks on 9/2/20. -// Copyright © 2020 Tom Hicks. All rights reserved. -// - -#import - -@interface SecondViewController : UIViewController - - -@end - diff --git a/MonsterCards/SecondViewController.m b/MonsterCards/SecondViewController.m deleted file mode 100644 index 7a77b12..0000000 --- a/MonsterCards/SecondViewController.m +++ /dev/null @@ -1,23 +0,0 @@ -// -// SecondViewController.m -// MonsterCards -// -// Created by Tom Hicks on 9/2/20. -// Copyright © 2020 Tom Hicks. All rights reserved. -// - -#import "SecondViewController.h" - -@interface SecondViewController () - -@end - -@implementation SecondViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. -} - - -@end diff --git a/MonsterCards/Views/CollectionsViewController.h b/MonsterCards/Views/CollectionsViewController.h new file mode 100644 index 0000000..065f296 --- /dev/null +++ b/MonsterCards/Views/CollectionsViewController.h @@ -0,0 +1,17 @@ +// +// CollectionsViewController.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface CollectionsViewController : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/CollectionsViewController.m b/MonsterCards/Views/CollectionsViewController.m new file mode 100644 index 0000000..1b89b26 --- /dev/null +++ b/MonsterCards/Views/CollectionsViewController.m @@ -0,0 +1,32 @@ +// +// CollectionsViewController.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "CollectionsViewController.h" + +@interface CollectionsViewController () + +@end + +@implementation CollectionsViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/MonsterCards/Views/DashboardViewController.h b/MonsterCards/Views/DashboardViewController.h new file mode 100644 index 0000000..26ce296 --- /dev/null +++ b/MonsterCards/Views/DashboardViewController.h @@ -0,0 +1,17 @@ +// +// DashboardViewController.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DashboardViewController : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/DashboardViewController.m b/MonsterCards/Views/DashboardViewController.m new file mode 100644 index 0000000..a069e29 --- /dev/null +++ b/MonsterCards/Views/DashboardViewController.m @@ -0,0 +1,32 @@ +// +// DashboardViewController.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "DashboardViewController.h" + +@interface DashboardViewController () + +@end + +@implementation DashboardViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/MonsterCards/Views/LibraryViewController.h b/MonsterCards/Views/LibraryViewController.h new file mode 100644 index 0000000..aa2ac87 --- /dev/null +++ b/MonsterCards/Views/LibraryViewController.h @@ -0,0 +1,17 @@ +// +// LibraryViewController.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface LibraryViewController : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/LibraryViewController.m b/MonsterCards/Views/LibraryViewController.m new file mode 100644 index 0000000..eac9069 --- /dev/null +++ b/MonsterCards/Views/LibraryViewController.m @@ -0,0 +1,32 @@ +// +// LibraryViewController.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "LibraryViewController.h" + +@interface LibraryViewController () + +@end + +@implementation LibraryViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/MonsterCards/Views/MonsterViewController.h b/MonsterCards/Views/MonsterViewController.h new file mode 100644 index 0000000..837043c --- /dev/null +++ b/MonsterCards/Views/MonsterViewController.h @@ -0,0 +1,17 @@ +// +// MonsterViewController.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MonsterViewController : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/MonsterViewController.m b/MonsterCards/Views/MonsterViewController.m new file mode 100644 index 0000000..f6214bc --- /dev/null +++ b/MonsterCards/Views/MonsterViewController.m @@ -0,0 +1,32 @@ +// +// MonsterViewController.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "MonsterViewController.h" + +@interface MonsterViewController () + +@end + +@implementation MonsterViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/MonsterCards/Views/SearchViewController.h b/MonsterCards/Views/SearchViewController.h new file mode 100644 index 0000000..8102ab3 --- /dev/null +++ b/MonsterCards/Views/SearchViewController.h @@ -0,0 +1,17 @@ +// +// SearchViewController.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface SearchViewController : UIViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m new file mode 100644 index 0000000..79a2a5e --- /dev/null +++ b/MonsterCards/Views/SearchViewController.m @@ -0,0 +1,32 @@ +// +// SearchViewController.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "SearchViewController.h" + +@interface SearchViewController () + +@end + +@implementation SearchViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end From 3b4808a360336f18d49690337f11ab9fc918c7f7 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 18:16:24 -0700 Subject: [PATCH 007/195] Adds stubbed out model classes Ability, Action, DamageType, Language, Monster, SavingThrow, and Skill. --- MonsterCards.xcodeproj/project.pbxproj | 42 ++++++++++++++++++++++++++ MonsterCards/Models/Ability.h | 17 +++++++++++ MonsterCards/Models/Ability.m | 13 ++++++++ MonsterCards/Models/Action.h | 17 +++++++++++ MonsterCards/Models/Action.m | 13 ++++++++ MonsterCards/Models/DamageType.h | 17 +++++++++++ MonsterCards/Models/DamageType.m | 13 ++++++++ MonsterCards/Models/Language.h | 17 +++++++++++ MonsterCards/Models/Language.m | 13 ++++++++ MonsterCards/Models/Monster.h | 17 +++++++++++ MonsterCards/Models/Monster.m | 13 ++++++++ MonsterCards/Models/SavingThrow.h | 17 +++++++++++ MonsterCards/Models/SavingThrow.m | 13 ++++++++ MonsterCards/Models/Skill.h | 17 +++++++++++ MonsterCards/Models/Skill.m | 13 ++++++++ 15 files changed, 252 insertions(+) create mode 100644 MonsterCards/Models/Ability.h create mode 100644 MonsterCards/Models/Ability.m create mode 100644 MonsterCards/Models/Action.h create mode 100644 MonsterCards/Models/Action.m create mode 100644 MonsterCards/Models/DamageType.h create mode 100644 MonsterCards/Models/DamageType.m create mode 100644 MonsterCards/Models/Language.h create mode 100644 MonsterCards/Models/Language.m create mode 100644 MonsterCards/Models/Monster.h create mode 100644 MonsterCards/Models/Monster.m create mode 100644 MonsterCards/Models/SavingThrow.h create mode 100644 MonsterCards/Models/SavingThrow.m create mode 100644 MonsterCards/Models/Skill.h create mode 100644 MonsterCards/Models/Skill.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index da2e0f5..521812a 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -12,6 +12,13 @@ E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032A25031BE500FB6E43 /* LibraryViewController.m */; }; E20D032E25031BEF00FB6E43 /* CollectionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */; }; E20D033125031BFD00FB6E43 /* DashboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D033025031BFD00FB6E43 /* DashboardViewController.m */; }; + E25BD5F5250352C4007B04EF /* Monster.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5F4250352C4007B04EF /* Monster.m */; }; + E25BD5F8250368A8007B04EF /* SavingThrow.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5F7250368A8007B04EF /* SavingThrow.m */; }; + E25BD5FB250369D7007B04EF /* Skill.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5FA250369D7007B04EF /* Skill.m */; }; + E25BD5FE25036A76007B04EF /* DamageType.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5FD25036A76007B04EF /* DamageType.m */; }; + E25BD60125036BF8007B04EF /* Language.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60025036BF8007B04EF /* Language.m */; }; + E25BD60425036CF0007B04EF /* Ability.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60325036CF0007B04EF /* Ability.m */; }; + E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; }; E2F7247525005E89007D87ED /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247425005E89007D87ED /* AppDelegate.m */; }; E2F7247825005E89007D87ED /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247725005E89007D87ED /* SceneDelegate.m */; }; E2F7248125005E89007D87ED /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2F7247F25005E89007D87ED /* Main.storyboard */; }; @@ -51,6 +58,20 @@ E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CollectionsViewController.m; sourceTree = ""; }; E20D032F25031BFD00FB6E43 /* DashboardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DashboardViewController.h; sourceTree = ""; }; E20D033025031BFD00FB6E43 /* DashboardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DashboardViewController.m; sourceTree = ""; }; + E25BD5F3250352C4007B04EF /* Monster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Monster.h; sourceTree = ""; }; + E25BD5F4250352C4007B04EF /* Monster.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Monster.m; sourceTree = ""; }; + E25BD5F6250368A8007B04EF /* SavingThrow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SavingThrow.h; sourceTree = ""; }; + E25BD5F7250368A8007B04EF /* SavingThrow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SavingThrow.m; sourceTree = ""; }; + E25BD5F9250369D7007B04EF /* Skill.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Skill.h; sourceTree = ""; }; + E25BD5FA250369D7007B04EF /* Skill.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Skill.m; sourceTree = ""; }; + E25BD5FC25036A76007B04EF /* DamageType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DamageType.h; sourceTree = ""; }; + E25BD5FD25036A76007B04EF /* DamageType.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DamageType.m; sourceTree = ""; }; + E25BD5FF25036BF8007B04EF /* Language.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Language.h; sourceTree = ""; }; + E25BD60025036BF8007B04EF /* Language.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Language.m; sourceTree = ""; }; + E25BD60225036CF0007B04EF /* Ability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Ability.h; sourceTree = ""; }; + E25BD60325036CF0007B04EF /* Ability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Ability.m; sourceTree = ""; }; + E25BD60525036CFA007B04EF /* Action.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Action.h; sourceTree = ""; }; + E25BD60625036CFA007B04EF /* Action.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Action.m; sourceTree = ""; }; E2F7247025005E89007D87ED /* Monster Cards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Monster Cards.app"; sourceTree = BUILT_PRODUCTS_DIR; }; E2F7247325005E89007D87ED /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; E2F7247425005E89007D87ED /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -115,6 +136,20 @@ E20D033225034C0700FB6E43 /* Models */ = { isa = PBXGroup; children = ( + E25BD60225036CF0007B04EF /* Ability.h */, + E25BD60325036CF0007B04EF /* Ability.m */, + E25BD60525036CFA007B04EF /* Action.h */, + E25BD60625036CFA007B04EF /* Action.m */, + E25BD5FC25036A76007B04EF /* DamageType.h */, + E25BD5FD25036A76007B04EF /* DamageType.m */, + E25BD5FF25036BF8007B04EF /* Language.h */, + E25BD60025036BF8007B04EF /* Language.m */, + E25BD5F3250352C4007B04EF /* Monster.h */, + E25BD5F4250352C4007B04EF /* Monster.m */, + E25BD5F6250368A8007B04EF /* SavingThrow.h */, + E25BD5F7250368A8007B04EF /* SavingThrow.m */, + E25BD5F9250369D7007B04EF /* Skill.h */, + E25BD5FA250369D7007B04EF /* Skill.m */, ); path = Models; sourceTree = ""; @@ -315,14 +350,21 @@ buildActionMask = 2147483647; files = ( E20D032825031BDA00FB6E43 /* MonsterViewController.m in Sources */, + E25BD60725036CFA007B04EF /* Action.m in Sources */, E2F7247525005E89007D87ED /* AppDelegate.m in Sources */, E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */, E20D033125031BFD00FB6E43 /* DashboardViewController.m in Sources */, + E25BD5FE25036A76007B04EF /* DamageType.m in Sources */, E2F7248425005E89007D87ED /* MonsterCards.xcdatamodeld in Sources */, + E25BD60425036CF0007B04EF /* Ability.m in Sources */, E20D032E25031BEF00FB6E43 /* CollectionsViewController.m in Sources */, + E25BD5F5250352C4007B04EF /* Monster.m in Sources */, + E25BD5F8250368A8007B04EF /* SavingThrow.m in Sources */, E2F7248C25005E8A007D87ED /* main.m in Sources */, + E25BD5FB250369D7007B04EF /* Skill.m in Sources */, E2F7247825005E89007D87ED /* SceneDelegate.m in Sources */, E20D032425031B9D00FB6E43 /* SearchViewController.m in Sources */, + E25BD60125036BF8007B04EF /* Language.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MonsterCards/Models/Ability.h b/MonsterCards/Models/Ability.h new file mode 100644 index 0000000..e849f90 --- /dev/null +++ b/MonsterCards/Models/Ability.h @@ -0,0 +1,17 @@ +// +// Ability.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface Ability : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/Ability.m b/MonsterCards/Models/Ability.m new file mode 100644 index 0000000..21397f2 --- /dev/null +++ b/MonsterCards/Models/Ability.m @@ -0,0 +1,13 @@ +// +// Ability.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "Ability.h" + +@implementation Ability + +@end diff --git a/MonsterCards/Models/Action.h b/MonsterCards/Models/Action.h new file mode 100644 index 0000000..8b9bd8f --- /dev/null +++ b/MonsterCards/Models/Action.h @@ -0,0 +1,17 @@ +// +// Action.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface Action : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/Action.m b/MonsterCards/Models/Action.m new file mode 100644 index 0000000..6be4830 --- /dev/null +++ b/MonsterCards/Models/Action.m @@ -0,0 +1,13 @@ +// +// Action.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "Action.h" + +@implementation Action + +@end diff --git a/MonsterCards/Models/DamageType.h b/MonsterCards/Models/DamageType.h new file mode 100644 index 0000000..77aa241 --- /dev/null +++ b/MonsterCards/Models/DamageType.h @@ -0,0 +1,17 @@ +// +// DamageType.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DamageType : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/DamageType.m b/MonsterCards/Models/DamageType.m new file mode 100644 index 0000000..8112681 --- /dev/null +++ b/MonsterCards/Models/DamageType.m @@ -0,0 +1,13 @@ +// +// DamageType.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "DamageType.h" + +@implementation DamageType + +@end diff --git a/MonsterCards/Models/Language.h b/MonsterCards/Models/Language.h new file mode 100644 index 0000000..6e68f47 --- /dev/null +++ b/MonsterCards/Models/Language.h @@ -0,0 +1,17 @@ +// +// Language.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface Language : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/Language.m b/MonsterCards/Models/Language.m new file mode 100644 index 0000000..5e6ce6b --- /dev/null +++ b/MonsterCards/Models/Language.m @@ -0,0 +1,13 @@ +// +// Language.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "Language.h" + +@implementation Language + +@end diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h new file mode 100644 index 0000000..10b4eab --- /dev/null +++ b/MonsterCards/Models/Monster.h @@ -0,0 +1,17 @@ +// +// Monster.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface Monster : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m new file mode 100644 index 0000000..4ad7035 --- /dev/null +++ b/MonsterCards/Models/Monster.m @@ -0,0 +1,13 @@ +// +// Monster.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "Monster.h" + +@implementation Monster + +@end diff --git a/MonsterCards/Models/SavingThrow.h b/MonsterCards/Models/SavingThrow.h new file mode 100644 index 0000000..1e4f22a --- /dev/null +++ b/MonsterCards/Models/SavingThrow.h @@ -0,0 +1,17 @@ +// +// SavingThrow.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface SavingThrow : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/SavingThrow.m b/MonsterCards/Models/SavingThrow.m new file mode 100644 index 0000000..388f7c1 --- /dev/null +++ b/MonsterCards/Models/SavingThrow.m @@ -0,0 +1,13 @@ +// +// SavingThrow.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "SavingThrow.h" + +@implementation SavingThrow + +@end diff --git a/MonsterCards/Models/Skill.h b/MonsterCards/Models/Skill.h new file mode 100644 index 0000000..b93dfe6 --- /dev/null +++ b/MonsterCards/Models/Skill.h @@ -0,0 +1,17 @@ +// +// Skill.h +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface Skill : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/Skill.m b/MonsterCards/Models/Skill.m new file mode 100644 index 0000000..8cc2473 --- /dev/null +++ b/MonsterCards/Models/Skill.m @@ -0,0 +1,13 @@ +// +// Skill.m +// MonsterCards +// +// Created by Tom Hicks on 9/4/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "Skill.h" + +@implementation Skill + +@end From 9a3bae2f5c2350a58c0584ab24ec822c56921b4d Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 18:18:53 -0700 Subject: [PATCH 008/195] Adds implementation of Ability model. --- MonsterCards/Models/Ability.h | 5 +++++ MonsterCards/Models/Ability.m | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/MonsterCards/Models/Ability.h b/MonsterCards/Models/Ability.h index e849f90..60f4b6f 100644 --- a/MonsterCards/Models/Ability.h +++ b/MonsterCards/Models/Ability.h @@ -12,6 +12,11 @@ NS_ASSUME_NONNULL_BEGIN @interface Ability : NSObject +@property NSString* name; +@property NSString* abilityDescription; + +-(id)initWithName: (NSString*)name andDescription: (NSString*)description; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/Ability.m b/MonsterCards/Models/Ability.m index 21397f2..18ac0c5 100644 --- a/MonsterCards/Models/Ability.m +++ b/MonsterCards/Models/Ability.m @@ -10,4 +10,13 @@ @implementation Ability +-(id)initWithName: (NSString*)name andDescription: (NSString*)description { + self = [super init]; + + self.name = name; + self.abilityDescription = description; + + return self; +} + @end From 687c215e73c3dd87934be6e60f805970bad5f4d4 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 18:19:18 -0700 Subject: [PATCH 009/195] Adds implementation of Action model. --- MonsterCards/Models/Action.h | 5 +++++ MonsterCards/Models/Action.m | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/MonsterCards/Models/Action.h b/MonsterCards/Models/Action.h index 8b9bd8f..7b76bbc 100644 --- a/MonsterCards/Models/Action.h +++ b/MonsterCards/Models/Action.h @@ -12,6 +12,11 @@ NS_ASSUME_NONNULL_BEGIN @interface Action : NSObject +@property NSString* name; +@property NSString* actionDescription; + +-(id)initWithName: (NSString*)name andDescription: (NSString*)description; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/Action.m b/MonsterCards/Models/Action.m index 6be4830..6ecc35d 100644 --- a/MonsterCards/Models/Action.m +++ b/MonsterCards/Models/Action.m @@ -10,4 +10,13 @@ @implementation Action +-(id)initWithName: (NSString*)name andDescription: (NSString*)description { + self = [super init]; + + self.name = name; + self.actionDescription = description; + + return self; +} + @end From 1d47e65b1e912a3d95890933b40a6f131c54e499 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 18:19:32 -0700 Subject: [PATCH 010/195] Adds implementation of DamageType model. --- MonsterCards/Models/DamageType.h | 6 ++++++ MonsterCards/Models/DamageType.m | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/MonsterCards/Models/DamageType.h b/MonsterCards/Models/DamageType.h index 77aa241..c7dd352 100644 --- a/MonsterCards/Models/DamageType.h +++ b/MonsterCards/Models/DamageType.h @@ -12,6 +12,12 @@ NS_ASSUME_NONNULL_BEGIN @interface DamageType : NSObject +@property NSString* name; +@property NSString* note; +@property NSString* type; + +-(id)initWithName: (NSString*)name note: (NSString*)note andType: (NSString*)type; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/DamageType.m b/MonsterCards/Models/DamageType.m index 8112681..309be76 100644 --- a/MonsterCards/Models/DamageType.m +++ b/MonsterCards/Models/DamageType.m @@ -10,4 +10,14 @@ @implementation DamageType +-(id)initWithName: (NSString*)name note: (NSString*)note andType: (NSString*)type{ + self = [super init]; + + self.name = name; + self.note = note; + self.type = type; + + return self; +} + @end From b8db6daa942e3f63c29fee1e4a32df1a6f5a5bf9 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 18:33:25 -0700 Subject: [PATCH 011/195] Adds implementation of Language model. --- MonsterCards/Models/Language.h | 5 +++++ MonsterCards/Models/Language.m | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/MonsterCards/Models/Language.h b/MonsterCards/Models/Language.h index 6e68f47..612b1e8 100644 --- a/MonsterCards/Models/Language.h +++ b/MonsterCards/Models/Language.h @@ -12,6 +12,11 @@ NS_ASSUME_NONNULL_BEGIN @interface Language : NSObject +@property NSString* name; +@property BOOL speaks; + +-(id)initWithName: (NSString*)name andSpeaks: (NSString*)canSpeak; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/Language.m b/MonsterCards/Models/Language.m index 5e6ce6b..7bb840f 100644 --- a/MonsterCards/Models/Language.m +++ b/MonsterCards/Models/Language.m @@ -10,4 +10,13 @@ @implementation Language +-(id)initWithName: (NSString*)name andSpeaks: (NSString*)canSpeak { + self = [super init]; + + self.name = name; + self.speaks = canSpeak; + + return self; +} + @end From 55ed75e36af1d11a30264ca9e1b006a72bafd109 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 18:33:57 -0700 Subject: [PATCH 012/195] Adds implementation of SavingThrow model. --- MonsterCards/Models/SavingThrow.h | 5 +++++ MonsterCards/Models/SavingThrow.m | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/MonsterCards/Models/SavingThrow.h b/MonsterCards/Models/SavingThrow.h index 1e4f22a..a5be65a 100644 --- a/MonsterCards/Models/SavingThrow.h +++ b/MonsterCards/Models/SavingThrow.h @@ -12,6 +12,11 @@ NS_ASSUME_NONNULL_BEGIN @interface SavingThrow : NSObject +@property NSString* name; +@property int order; + +-(id)initWithName: (NSString*)name andOrder: (int)order; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/SavingThrow.m b/MonsterCards/Models/SavingThrow.m index 388f7c1..ef7f635 100644 --- a/MonsterCards/Models/SavingThrow.m +++ b/MonsterCards/Models/SavingThrow.m @@ -10,4 +10,13 @@ @implementation SavingThrow +-(id)initWithName: (NSString*)name andOrder: (int)order { + self = [super init]; + + self.name = name; + self.order = order; + + return self; +} + @end From f12465222f3462dd1e31f3652a0c31bfbca92469 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 19:04:56 -0700 Subject: [PATCH 013/195] Adds implementation for Skill model. Adds stubbed out implementation of Monster model. all methods throw exceptions. --- MonsterCards/Models/Monster.h | 113 +++++++++++++++ MonsterCards/Models/Monster.m | 251 ++++++++++++++++++++++++++++++++++ MonsterCards/Models/Skill.h | 10 ++ MonsterCards/Models/Skill.m | 26 ++++ 4 files changed, 400 insertions(+) diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index 10b4eab..b07c7df 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -7,11 +7,124 @@ // #import +#import "Ability.h" +#import "Action.h" +#import "DamageType.h" +#import "Language.h" +#import "SavingThrow.h" +#import "Skill.h" NS_ASSUME_NONNULL_BEGIN +@class Skill; + @interface Monster : NSObject +@property NSString *name; +@property NSString *size; +@property NSString *type; +@property NSString *tag; +@property NSString *alignment; +@property NSString *armorName; +@property NSString *otherArmorDescription; +@property NSString *hpText; +@property NSString *speed; +@property NSString *burrowSpeed; +@property NSString *climbSpeed; +@property NSString *flySpeed; +@property NSString *swimSpeed; +// speedDescription +@property NSString *customSpeedDescription; +@property NSString *challengeRating; +@property NSString *customChallengeRating; +@property NSString *blindsightDistance; +@property NSString *darkvisionDistance; +@property NSString *tremorsenseDistance; +@property NSString *truesightDistance; +@property NSString *understandsBut; + +@property int strengthScore; +@property int dexterityScore; +@property int constitutionScore; +@property int intelligenceScore; +@property int wisdomScore; +@property int charismaScore; +@property int shieldBonus; +@property int naturalArmorBonus; +@property int hitDice; +@property int customProficiencyBonus; +// Shouldn't this be a BOOL? +@property int telepathy; + +@property BOOL customHP; +@property BOOL hover; +@property BOOL customSpeed; +@property BOOL isBlind; + ++(int)abilityModifierForScore: (int)score; ++(int)hitDieForSize: (NSString*)size; + +-(id)initWithJSON:(NSString*)jsonData; +-(NSString*)meta; +-(int)abilityScoreForAbilityScoreName: (NSString*)abilityScoreName; +-(int)abilityModifierForAbilityScoreName: (NSString*)abilityScoreName; +-(int)strengthModifier; +-(int)dexterityModifier; +-(int)constitutionModifier; +-(int)intelligenceModifier; +-(int)wisdomModifier; +-(int)charismaModifier; +//getArmorClass +-(NSString*)armorClassDescription; +//getHitPoints +-(NSString*)hitPointsDescription; +//getSpeedText +-(NSString*)speedDescription; +-(NSString*)strengthDescription; +-(NSString*)dexterityDescription; +-(NSString*)constitutionDescription; +-(NSString*)intelligenceDescription; +-(NSString*)wisdomDescription; +-(NSString*)charismaDescription; +-(NSSet*)savingThrows; +-(void)addSavingThrow: (SavingThrow*)savingThrow; +-(void)remvoeSavingThrow: (SavingThrow*)savingThrow; +-(void)clearSavingThrows; +-(NSString*)savingThrowsDescription; +-(int)proficiencyBonus; +-(void)addSkill: (Skill*)skill; +-(void)removeSkill: (Skill*)skill; +-(void)clearSkills; +-(NSString*)skillsDescription; +-(void)addDamageType: (DamageType*)damageType; +-(void)removeDamageType: (DamageType*)damageType; +-(void)clearDamageTypes; +-(NSString*)damageImmunitiesDescription; +-(NSString*)damageResistancesDescription; +-(NSString*)damageVulnerabilitiesDescription; +-(void)addConditionImmunity: (NSString*)condition; +-(void)removeConditionImmunity: (NSString*)condition; +-(void)clearConditionImmunities; +-(NSString*)conditionImmunitiesDescription; +-(NSString*)sensesDescription; +-(void)addLanguage: (Language*)language; +-(void)removeLanguage: (Language*)language; +-(void)clearLanguages; +-(NSString*)languagesDescription; +-(NSString*)challengeRatingDescription; +-(void)addAbility: (Ability*)ability; +-(void)removeAbility: (Ability*)ability; +-(void)clearAbilities; +-(NSArray*)abilityDescriptions; +-(void)addAction: (Action*)action; +-(void)removeAction: (Action*)action; +-(void)clearActions; +-(NSArray*)actionDescriptions; +-(NSString*)placeholderReplacedText: (NSString*)text; +-(int)savingThrowForAbilityScoreName: (NSString*)abilityScoreName; +-(int)spellSaveDCForAbilityScoreName: (NSString*)abilityScoreName; +-(int)attackBonusForAbilityScoreName: (NSString*)abilityScoreName; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 4ad7035..13ae293 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -10,4 +10,255 @@ @implementation Monster ++(int)abilityModifierForScore: (int)score { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + ++(int)hitDieForSize: (NSString*)size{ + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(id)init { + self = [super init]; + + // TODO: Actually initialize the class. + + return self; +} + +-(id)initWithJSON: (NSString*)jsonData { + self = [super init]; + + // TODO: Actually initialize the class. + + return self; +} + +-(NSString*)meta { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)abilityScoreForAbilityScoreName: (NSString*)abilityScoreName { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)abilityModifierForAbilityScoreName: (NSString*)abilityScoreName { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)strengthModifier { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)dexterityModifier { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)constitutionModifier { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)intelligenceModifier { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)wisdomModifier { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)charismaModifier { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +//getArmorClass +-(NSString*)armorClassDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +//getHitPoints +-(NSString*)hitPointsDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +//getSpeedText +-(NSString*)speedDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)strengthDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)dexterityDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)constitutionDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)intelligenceDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)wisdomDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)charismaDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSSet*)savingThrows { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)addSavingThrow: (SavingThrow*)savingThrow { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)remvoeSavingThrow: (SavingThrow*)savingThrow { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)clearSavingThrows { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)savingThrowsDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)proficiencyBonus { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)addSkill: (Skill*)skill { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)removeSkill: (Skill*)skill { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)clearSkills { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)skillsDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)addDamageType: (DamageType*)damageType { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)removeDamageType: (DamageType*)damageType { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)clearDamageTypes { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)damageImmunitiesDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)damageResistancesDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)damageVulnerabilitiesDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)addConditionImmunity: (NSString*)condition { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)removeConditionImmunity: (NSString*)condition { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)clearConditionImmunities { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)conditionImmunitiesDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)sensesDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)addLanguage: (Language*)language { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)removeLanguage: (Language*)language { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)clearLanguages { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)languagesDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)challengeRatingDescription { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)addAbility: (Ability*)ability { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)removeAbility: (Ability*)ability { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)clearAbilities { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSArray*)abilityDescriptions { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)addAction: (Action*)action { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)removeAction: (Action*)action { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(void)clearActions { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSArray*)actionDescriptions { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(NSString*)placeholderReplacedText: (NSString*)text { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)savingThrowForAbilityScoreName: (NSString*)abilityScoreName { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)spellSaveDCForAbilityScoreName: (NSString*)abilityScoreName { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + +-(int)attackBonusForAbilityScoreName: (NSString*)abilityScoreName { + @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; +} + @end diff --git a/MonsterCards/Models/Skill.h b/MonsterCards/Models/Skill.h index b93dfe6..fd5ed78 100644 --- a/MonsterCards/Models/Skill.h +++ b/MonsterCards/Models/Skill.h @@ -7,11 +7,21 @@ // #import +#import "Monster.h" NS_ASSUME_NONNULL_BEGIN +@class Monster; @interface Skill : NSObject +@property NSString* name; +@property NSString* abilityScoreName; +@property NSString* notes; + +-(id)initWithName: (NSString*)name abilityScoreName:(NSString*)abilityScoreName andNotes:(NSString*)notes; +-(int)skillBonusForMonster: (Monster*)monster; +-(NSString*)textForMonster: (Monster*)monster; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Models/Skill.m b/MonsterCards/Models/Skill.m index 8cc2473..73c1b51 100644 --- a/MonsterCards/Models/Skill.m +++ b/MonsterCards/Models/Skill.m @@ -10,4 +10,30 @@ @implementation Skill +-(id)initWithName: (NSString*)name abilityScoreName:(NSString*)abilityScoreName andNotes:(NSString*)notes{ + self = [super init]; + + self.name = name; + self.abilityScoreName = abilityScoreName; + self.notes = notes; + + return self; +} + +-(int)skillBonusForMonster: (Monster*)monster { + int bonus = [monster abilityModifierForAbilityScoreName: self.abilityScoreName]; + if ([@" (ex)" isEqualToString:self.notes]) { + bonus += 2 * monster.proficiencyBonus; + } else { + bonus += monster.proficiencyBonus; + } + return bonus; +} + +-(NSString*)textForMonster: (Monster*)monster { + int bonus = [self skillBonusForMonster:monster]; + + return [NSString stringWithFormat:@"%@%@ %d", [self.name substringToIndex:1], [self.name substringFromIndex:1], bonus]; +} + @end From 06c1e1b880769ec83cd57a0d21746c6f22688a72 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 19:06:39 -0700 Subject: [PATCH 014/195] Adds StringHelper with isStringNilOrEmpty method. --- MonsterCards.xcodeproj/project.pbxproj | 6 ++++++ MonsterCards/Helpers/StringHelper.h | 19 +++++++++++++++++++ MonsterCards/Helpers/StringHelper.m | 25 +++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 MonsterCards/Helpers/StringHelper.h create mode 100644 MonsterCards/Helpers/StringHelper.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 521812a..d8de2e9 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032A25031BE500FB6E43 /* LibraryViewController.m */; }; E20D032E25031BEF00FB6E43 /* CollectionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */; }; E20D033125031BFD00FB6E43 /* DashboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D033025031BFD00FB6E43 /* DashboardViewController.m */; }; + E2532E8925038DE100CA4CBA /* StringHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E2532E8825038DE100CA4CBA /* StringHelper.m */; }; E25BD5F5250352C4007B04EF /* Monster.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5F4250352C4007B04EF /* Monster.m */; }; E25BD5F8250368A8007B04EF /* SavingThrow.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5F7250368A8007B04EF /* SavingThrow.m */; }; E25BD5FB250369D7007B04EF /* Skill.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5FA250369D7007B04EF /* Skill.m */; }; @@ -58,6 +59,8 @@ E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CollectionsViewController.m; sourceTree = ""; }; E20D032F25031BFD00FB6E43 /* DashboardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DashboardViewController.h; sourceTree = ""; }; E20D033025031BFD00FB6E43 /* DashboardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DashboardViewController.m; sourceTree = ""; }; + E2532E8725038DE100CA4CBA /* StringHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StringHelper.h; sourceTree = ""; }; + E2532E8825038DE100CA4CBA /* StringHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StringHelper.m; sourceTree = ""; }; E25BD5F3250352C4007B04EF /* Monster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Monster.h; sourceTree = ""; }; E25BD5F4250352C4007B04EF /* Monster.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Monster.m; sourceTree = ""; }; E25BD5F6250368A8007B04EF /* SavingThrow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SavingThrow.h; sourceTree = ""; }; @@ -157,6 +160,8 @@ E20D033325034C0C00FB6E43 /* Helpers */ = { isa = PBXGroup; children = ( + E2532E8725038DE100CA4CBA /* StringHelper.h */, + E2532E8825038DE100CA4CBA /* StringHelper.m */, ); path = Helpers; sourceTree = ""; @@ -349,6 +354,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E2532E8925038DE100CA4CBA /* StringHelper.m in Sources */, E20D032825031BDA00FB6E43 /* MonsterViewController.m in Sources */, E25BD60725036CFA007B04EF /* Action.m in Sources */, E2F7247525005E89007D87ED /* AppDelegate.m in Sources */, diff --git a/MonsterCards/Helpers/StringHelper.h b/MonsterCards/Helpers/StringHelper.h new file mode 100644 index 0000000..05e445a --- /dev/null +++ b/MonsterCards/Helpers/StringHelper.h @@ -0,0 +1,19 @@ +// +// StringHelper.h +// MonsterCards +// +// Created by Tom Hicks on 9/5/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface StringHelper : NSObject + ++(BOOL)isStringNilOrEmpty:(NSString*)theString; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Helpers/StringHelper.m b/MonsterCards/Helpers/StringHelper.m new file mode 100644 index 0000000..473e2d2 --- /dev/null +++ b/MonsterCards/Helpers/StringHelper.m @@ -0,0 +1,25 @@ +// +// StringHelper.m +// MonsterCards +// +// Created by Tom Hicks on 9/5/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "StringHelper.h" + +@implementation StringHelper + ++(BOOL)isStringNilOrEmpty:(NSString*)theString { + if (nil == theString) { + return YES; + } + + if (theString.length < 1) { + return YES; + } + + return NO; +} + +@end From 90c28b662990d001c4054e522e0811fb6126e87f Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 19:33:05 -0700 Subject: [PATCH 015/195] Fixes default initializer of Ability model. Adds tests for Ability model. --- MonsterCards.xcodeproj/project.pbxproj | 16 +++++++- MonsterCards/Models/Ability.m | 9 +++++ MonsterCardsTests/Models/AbilityTests.m | 54 +++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 MonsterCardsTests/Models/AbilityTests.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index d8de2e9..069aae3 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -29,6 +29,7 @@ E2F7248C25005E8A007D87ED /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7248B25005E8A007D87ED /* main.m */; }; E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7249525005E8A007D87ED /* MonsterCardsTests.m */; }; E2F724A125005E8A007D87ED /* MonsterCardsUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F724A025005E8A007D87ED /* MonsterCardsUITests.m */; }; + E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E325047C4400D5E935 /* AbilityTests.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -92,6 +93,7 @@ E2F7249C25005E8A007D87ED /* MonsterCardsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MonsterCardsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; E2F724A025005E8A007D87ED /* MonsterCardsUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonsterCardsUITests.m; sourceTree = ""; }; E2F724A225005E8A007D87ED /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2FD91E325047C4400D5E935 /* AbilityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AbilityTests.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -209,6 +211,7 @@ E2F7249425005E8A007D87ED /* MonsterCardsTests */ = { isa = PBXGroup; children = ( + E2FD91E225047C1D00D5E935 /* Models */, E2F7249525005E8A007D87ED /* MonsterCardsTests.m */, E2F7249725005E8A007D87ED /* Info.plist */, ); @@ -224,6 +227,14 @@ path = MonsterCardsUITests; sourceTree = ""; }; + E2FD91E225047C1D00D5E935 /* Models */ = { + isa = PBXGroup; + children = ( + E2FD91E325047C4400D5E935 /* AbilityTests.m */, + ); + path = Models; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -378,6 +389,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */, E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -585,7 +597,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.majinnaibu.monstercards.MonsterCardsTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MonsterCards.app/MonsterCards"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Monster Cards.app/Monster Cards"; }; name = Debug; }; @@ -605,7 +617,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.majinnaibu.monstercards.MonsterCardsTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MonsterCards.app/MonsterCards"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Monster Cards.app/Monster Cards"; }; name = Release; }; diff --git a/MonsterCards/Models/Ability.m b/MonsterCards/Models/Ability.m index 18ac0c5..e6c0909 100644 --- a/MonsterCards/Models/Ability.m +++ b/MonsterCards/Models/Ability.m @@ -10,6 +10,15 @@ @implementation Ability +-(id)init { + self = [super init]; + + self.name = @""; + self.abilityDescription = @""; + + return self; +} + -(id)initWithName: (NSString*)name andDescription: (NSString*)description { self = [super init]; diff --git a/MonsterCardsTests/Models/AbilityTests.m b/MonsterCardsTests/Models/AbilityTests.m new file mode 100644 index 0000000..89ab413 --- /dev/null +++ b/MonsterCardsTests/Models/AbilityTests.m @@ -0,0 +1,54 @@ +// +// AbilityTests.m +// MonsterCardsTests +// +// Created by Tom Hicks on 9/5/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "Ability.h" + +@interface AbilityTests : XCTestCase + +@end + +@implementation AbilityTests { + Ability *_ability; + NSString *_name; + NSString *_description; +} + +- (void)setUp { + _ability = [[Ability alloc] init]; + _name = @"My Ability Name"; + _description = @"This is my ability description."; +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testDefaultInitializer { + XCTAssertEqualObjects(@"", _ability.name); + XCTAssertEqualObjects(@"", _ability.abilityDescription); +} + +- (void)testNameGetterAndSetter { + _ability.name = _name; + XCTAssertEqualObjects(_name, _ability.name); +} + +- (void)testDescriptionGetterAndSetter { + _ability.abilityDescription = _description; + XCTAssertEqualObjects(_description, _ability.abilityDescription); +} + +- (void)testInitWithNameAndDescription { + _ability = [[Ability alloc] initWithName:_name andDescription:_description]; + + XCTAssertEqualObjects(_name, _ability.name); + XCTAssertEqualObjects(_description, _ability.abilityDescription); +} + +@end From 937aba27b1d276a8887dabe18ae6eeeb916d3a10 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 19:37:28 -0700 Subject: [PATCH 016/195] Fixes default initializer of Action model. Adds tests for Action model. --- MonsterCards.xcodeproj/project.pbxproj | 4 ++ MonsterCards/Models/Action.m | 9 +++++ MonsterCardsTests/Models/ActionTests.m | 54 ++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 MonsterCardsTests/Models/ActionTests.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 069aae3..af0cbc4 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -30,6 +30,7 @@ E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7249525005E8A007D87ED /* MonsterCardsTests.m */; }; E2F724A125005E8A007D87ED /* MonsterCardsUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F724A025005E8A007D87ED /* MonsterCardsUITests.m */; }; E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E325047C4400D5E935 /* AbilityTests.m */; }; + E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E5250481F300D5E935 /* ActionTests.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -94,6 +95,7 @@ E2F724A025005E8A007D87ED /* MonsterCardsUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonsterCardsUITests.m; sourceTree = ""; }; E2F724A225005E8A007D87ED /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E2FD91E325047C4400D5E935 /* AbilityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AbilityTests.m; sourceTree = ""; }; + E2FD91E5250481F300D5E935 /* ActionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ActionTests.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -231,6 +233,7 @@ isa = PBXGroup; children = ( E2FD91E325047C4400D5E935 /* AbilityTests.m */, + E2FD91E5250481F300D5E935 /* ActionTests.m */, ); path = Models; sourceTree = ""; @@ -389,6 +392,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */, E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */, E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */, ); diff --git a/MonsterCards/Models/Action.m b/MonsterCards/Models/Action.m index 6ecc35d..a6cc650 100644 --- a/MonsterCards/Models/Action.m +++ b/MonsterCards/Models/Action.m @@ -10,6 +10,15 @@ @implementation Action +-(id)init { + self = [super init]; + + self.name = @""; + self.actionDescription = @""; + + return self; +} + -(id)initWithName: (NSString*)name andDescription: (NSString*)description { self = [super init]; diff --git a/MonsterCardsTests/Models/ActionTests.m b/MonsterCardsTests/Models/ActionTests.m new file mode 100644 index 0000000..696dc2c --- /dev/null +++ b/MonsterCardsTests/Models/ActionTests.m @@ -0,0 +1,54 @@ +// +// ActionTests.m +// MonsterCardsTests +// +// Created by Tom Hicks on 9/5/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "Action.h" + +@interface ActionTests : XCTestCase + +@end + +@implementation ActionTests { + Action *_action; + NSString *_name; + NSString *_description; +} + +- (void)setUp { + _action = [[Action alloc] init]; + _name = @"My Action Name"; + _description = @"This is my action description."; +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testDefaultInitializer { + XCTAssertEqualObjects(@"", _action.name); + XCTAssertEqualObjects(@"", _action.actionDescription); +} + +- (void)testNameGetterAndSetter { + _action.name = _name; + XCTAssertEqualObjects(_name, _action.name); +} + +- (void)testDescriptionGetterAndSetter { + _action.actionDescription = _description; + XCTAssertEqualObjects(_description, _action.actionDescription); +} + +- (void)testInitWithNameAndDescription { + _action = [[Action alloc] initWithName:_name andDescription:_description]; + + XCTAssertEqualObjects(_name, _action.name); + XCTAssertEqualObjects(_description, _action.actionDescription); +} + +@end From bfcef65da3b2e89c6d1712eabf4e1fe9916f1b12 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 20:01:53 -0700 Subject: [PATCH 017/195] Fixes default initializer of DamageType model. Adds tests for DamageType model. --- MonsterCards.xcodeproj/project.pbxproj | 4 ++ MonsterCards/Models/DamageType.m | 10 ++++ MonsterCardsTests/Models/DamageTypeTests.m | 61 ++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 MonsterCardsTests/Models/DamageTypeTests.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index af0cbc4..2d07625 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -31,6 +31,7 @@ E2F724A125005E8A007D87ED /* MonsterCardsUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F724A025005E8A007D87ED /* MonsterCardsUITests.m */; }; E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E325047C4400D5E935 /* AbilityTests.m */; }; E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E5250481F300D5E935 /* ActionTests.m */; }; + E2FD91E82504832A00D5E935 /* DamageTypeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E72504832A00D5E935 /* DamageTypeTests.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -96,6 +97,7 @@ E2F724A225005E8A007D87ED /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E2FD91E325047C4400D5E935 /* AbilityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AbilityTests.m; sourceTree = ""; }; E2FD91E5250481F300D5E935 /* ActionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ActionTests.m; sourceTree = ""; }; + E2FD91E72504832A00D5E935 /* DamageTypeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DamageTypeTests.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -234,6 +236,7 @@ children = ( E2FD91E325047C4400D5E935 /* AbilityTests.m */, E2FD91E5250481F300D5E935 /* ActionTests.m */, + E2FD91E72504832A00D5E935 /* DamageTypeTests.m */, ); path = Models; sourceTree = ""; @@ -392,6 +395,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E2FD91E82504832A00D5E935 /* DamageTypeTests.m in Sources */, E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */, E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */, E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */, diff --git a/MonsterCards/Models/DamageType.m b/MonsterCards/Models/DamageType.m index 309be76..a148f4c 100644 --- a/MonsterCards/Models/DamageType.m +++ b/MonsterCards/Models/DamageType.m @@ -10,6 +10,16 @@ @implementation DamageType +-(id)init { + self = [super init]; + + self.name = @""; + self.note = @""; + self.type = @""; + + return self; +} + -(id)initWithName: (NSString*)name note: (NSString*)note andType: (NSString*)type{ self = [super init]; diff --git a/MonsterCardsTests/Models/DamageTypeTests.m b/MonsterCardsTests/Models/DamageTypeTests.m new file mode 100644 index 0000000..25b3f48 --- /dev/null +++ b/MonsterCardsTests/Models/DamageTypeTests.m @@ -0,0 +1,61 @@ +// +// DamageTypeTests.m +// MonsterCardsTests +// +// Created by Tom Hicks on 9/5/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "DamageType.h" + +@interface DamageTypeTests : XCTestCase { + DamageType *_damageType; + NSString *_name; + NSString *_note; + NSString *_type; +} + +@end + +@implementation DamageTypeTests + +- (void)setUp { + _damageType = [[DamageType alloc] init]; + _name = @"My Damage Type"; + _note = @"A note"; + _type = @"A type"; +} + +- (void)tearDown {} + +- (void)testDefaultInitializer { + XCTAssertEqualObjects(@"", _damageType.name); + XCTAssertEqualObjects(@"", _damageType.note); + XCTAssertEqualObjects(@"", _damageType.type); +} + +- (void)testInitWithNameNoteAndType { + _damageType = [[DamageType alloc] initWithName:_name note:_note andType:_type]; + + XCTAssertEqualObjects(_name, _damageType.name); + XCTAssertEqualObjects(_note, _damageType.note); + XCTAssertEqualObjects(_type, _damageType.type); +} + +- (void)testNameGetterAndSetter { + _damageType.name = _name; + XCTAssertEqualObjects(_name, _damageType.name); +} + +- (void)testNoteGetterAndSetter { + _damageType.note = _note; + XCTAssertEqualObjects(_note, _damageType.note); +} + +- (void)testTypeGetterAndSetter { + _damageType.type = _type; + XCTAssertEqualObjects(_type, _damageType.type); +} + +@end From 8a758448a0f6439b800c295c8cea03fe6124364e Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 21:01:23 -0700 Subject: [PATCH 018/195] Fixes typing in Language initializer. Fixes default initializer of Language model. Adds tests for Language model. --- MonsterCards.xcodeproj/project.pbxproj | 4 ++ MonsterCards/Models/Language.h | 2 +- MonsterCards/Models/Language.m | 11 ++++- MonsterCardsTests/Models/LanguageTests.m | 56 ++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 MonsterCardsTests/Models/LanguageTests.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 2d07625..78662b3 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E325047C4400D5E935 /* AbilityTests.m */; }; E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E5250481F300D5E935 /* ActionTests.m */; }; E2FD91E82504832A00D5E935 /* DamageTypeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E72504832A00D5E935 /* DamageTypeTests.m */; }; + E2FD91EA250493C000D5E935 /* LanguageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E9250493C000D5E935 /* LanguageTests.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -98,6 +99,7 @@ E2FD91E325047C4400D5E935 /* AbilityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AbilityTests.m; sourceTree = ""; }; E2FD91E5250481F300D5E935 /* ActionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ActionTests.m; sourceTree = ""; }; E2FD91E72504832A00D5E935 /* DamageTypeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DamageTypeTests.m; sourceTree = ""; }; + E2FD91E9250493C000D5E935 /* LanguageTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LanguageTests.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -237,6 +239,7 @@ E2FD91E325047C4400D5E935 /* AbilityTests.m */, E2FD91E5250481F300D5E935 /* ActionTests.m */, E2FD91E72504832A00D5E935 /* DamageTypeTests.m */, + E2FD91E9250493C000D5E935 /* LanguageTests.m */, ); path = Models; sourceTree = ""; @@ -395,6 +398,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E2FD91EA250493C000D5E935 /* LanguageTests.m in Sources */, E2FD91E82504832A00D5E935 /* DamageTypeTests.m in Sources */, E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */, E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */, diff --git a/MonsterCards/Models/Language.h b/MonsterCards/Models/Language.h index 612b1e8..2b5c5f4 100644 --- a/MonsterCards/Models/Language.h +++ b/MonsterCards/Models/Language.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN @property NSString* name; @property BOOL speaks; --(id)initWithName: (NSString*)name andSpeaks: (NSString*)canSpeak; +-(id)initWithName: (NSString*)name andSpeaks: (BOOL)canSpeak; @end diff --git a/MonsterCards/Models/Language.m b/MonsterCards/Models/Language.m index 7bb840f..a903b99 100644 --- a/MonsterCards/Models/Language.m +++ b/MonsterCards/Models/Language.m @@ -10,7 +10,16 @@ @implementation Language --(id)initWithName: (NSString*)name andSpeaks: (NSString*)canSpeak { +-(id)init { + self = [super init]; + + self.name = @""; + self.speaks = YES; + + return self; +} + +-(id)initWithName: (NSString*)name andSpeaks: (BOOL)canSpeak { self = [super init]; self.name = name; diff --git a/MonsterCardsTests/Models/LanguageTests.m b/MonsterCardsTests/Models/LanguageTests.m new file mode 100644 index 0000000..bd021f3 --- /dev/null +++ b/MonsterCardsTests/Models/LanguageTests.m @@ -0,0 +1,56 @@ +// +// Language.m +// MonsterCardsTests +// +// Created by Tom Hicks on 9/5/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "Language.h" + +@interface LanguageTests : XCTestCase + +@end + +@implementation LanguageTests { + Language *_language; + NSString *_name; + BOOL _canSpeak; +} + +- (void)setUp { + _language = [[Language alloc] init]; + _name = @"English"; + _canSpeak = YES; +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testDefaultInitializer { + XCTAssertNotNil(_language); + XCTAssertEqualObjects(@"", _language.name); + XCTAssertEqual(YES, _language.speaks); +} + +- (void)testInitWithNameAndSpeaks { + _language = [[Language alloc] initWithName:_name andSpeaks:_canSpeak]; + + XCTAssertNotNil(_language); + XCTAssertEqualObjects(_name, _language.name); + XCTAssertEqual(_canSpeak, _language.speaks); +} + +- (void)testNameGetterAndSetter { + _language.name = _name; + XCTAssertEqualObjects(_name, _language.name); +} + +- (void)testSpeaksGetterAndSetter { + _language.speaks = NO; + XCTAssertEqual(NO, _language.speaks); +} + +@end From f688898d960ae4db3f9be9b19e942400ef0fe704 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 21:15:07 -0700 Subject: [PATCH 019/195] Fixes default initializer of SavingThrow model. Adds tests for SavingThrow model. --- MonsterCards.xcodeproj/project.pbxproj | 4 ++ MonsterCards/Models/SavingThrow.m | 9 ++++ MonsterCardsTests/Models/SavingThrowTests.m | 55 +++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 MonsterCardsTests/Models/SavingThrowTests.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 78662b3..4dcce0b 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -33,6 +33,7 @@ E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E5250481F300D5E935 /* ActionTests.m */; }; E2FD91E82504832A00D5E935 /* DamageTypeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E72504832A00D5E935 /* DamageTypeTests.m */; }; E2FD91EA250493C000D5E935 /* LanguageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91E9250493C000D5E935 /* LanguageTests.m */; }; + E2FD91EC250496B000D5E935 /* SavingThrowTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FD91EB250496B000D5E935 /* SavingThrowTests.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -100,6 +101,7 @@ E2FD91E5250481F300D5E935 /* ActionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ActionTests.m; sourceTree = ""; }; E2FD91E72504832A00D5E935 /* DamageTypeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DamageTypeTests.m; sourceTree = ""; }; E2FD91E9250493C000D5E935 /* LanguageTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LanguageTests.m; sourceTree = ""; }; + E2FD91EB250496B000D5E935 /* SavingThrowTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SavingThrowTests.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -240,6 +242,7 @@ E2FD91E5250481F300D5E935 /* ActionTests.m */, E2FD91E72504832A00D5E935 /* DamageTypeTests.m */, E2FD91E9250493C000D5E935 /* LanguageTests.m */, + E2FD91EB250496B000D5E935 /* SavingThrowTests.m */, ); path = Models; sourceTree = ""; @@ -400,6 +403,7 @@ files = ( E2FD91EA250493C000D5E935 /* LanguageTests.m in Sources */, E2FD91E82504832A00D5E935 /* DamageTypeTests.m in Sources */, + E2FD91EC250496B000D5E935 /* SavingThrowTests.m in Sources */, E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */, E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */, E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */, diff --git a/MonsterCards/Models/SavingThrow.m b/MonsterCards/Models/SavingThrow.m index ef7f635..6d09601 100644 --- a/MonsterCards/Models/SavingThrow.m +++ b/MonsterCards/Models/SavingThrow.m @@ -10,6 +10,15 @@ @implementation SavingThrow +-(id)init { + self = [super init]; + + self.name = @""; + self.order = -1; + + return self; +} + -(id)initWithName: (NSString*)name andOrder: (int)order { self = [super init]; diff --git a/MonsterCardsTests/Models/SavingThrowTests.m b/MonsterCardsTests/Models/SavingThrowTests.m new file mode 100644 index 0000000..31e793f --- /dev/null +++ b/MonsterCardsTests/Models/SavingThrowTests.m @@ -0,0 +1,55 @@ +// +// SavingThrowTests.m +// MonsterCardsTests +// +// Created by Tom Hicks on 9/5/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "SavingThrow.h" + +@interface SavingThrowTests : XCTestCase + +@end + +@implementation SavingThrowTests { + SavingThrow *_savingThrow; + NSString *_name; + int _order; +} + +- (void)setUp { + _savingThrow = [[SavingThrow alloc] init]; + _name = @"str"; + _order = 9; +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testDefaultInitializer { + XCTAssertNotNil(_savingThrow); + XCTAssertEqualObjects(@"", _savingThrow.name); + XCTAssertEqual(-1, _savingThrow.order); +} + +- (void)testInitWithNameAndOrder { + _savingThrow = [[SavingThrow alloc] initWithName:_name andOrder:_order]; + XCTAssertNotNil(_savingThrow); + XCTAssertEqualObjects(_name, _savingThrow.name); + XCTAssertEqual(_order, _savingThrow.order); +} + +- (void)testNameGetterAndSetter { + _savingThrow.name = _name; + XCTAssertEqualObjects(_name, _savingThrow.name); +} + +- (void)testOrderGetterAndSetter { + _savingThrow.order = _order; + XCTAssertEqual(_order, _savingThrow.order); +} + +@end From bab5a55c3b20d09e570cf75cc7d6312966e7c704 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 22:06:51 -0700 Subject: [PATCH 020/195] Adds cocoapods for libraries. Adds OCMockito and OCHamcrest libs. --- MonsterCards.xcodeproj/project.pbxproj | 156 +- .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + Podfile | 23 + Podfile.lock | 20 + Pods/Manifest.lock | 20 + Pods/OCHamcrest/LICENSE.txt | 13 + Pods/OCHamcrest/README.md | 244 ++ Pods/OCHamcrest/Source/Core/HCAssertThat.h | 96 + Pods/OCHamcrest/Source/Core/HCAssertThat.m | 58 + .../Source/Core/HCBaseDescription.h | 29 + .../Source/Core/HCBaseDescription.m | 101 + Pods/OCHamcrest/Source/Core/HCBaseMatcher.h | 25 + Pods/OCHamcrest/Source/Core/HCBaseMatcher.m | 52 + Pods/OCHamcrest/Source/Core/HCDescription.h | 39 + .../Source/Core/HCDiagnosingMatcher.h | 19 + .../Source/Core/HCDiagnosingMatcher.m | 25 + Pods/OCHamcrest/Source/Core/HCMatcher.h | 47 + .../OCHamcrest/Source/Core/HCSelfDescribing.h | 26 + .../Source/Core/HCStringDescription.h | 36 + .../Source/Core/HCStringDescription.m | 45 + .../Source/Core/Helpers/HCCollect.h | 26 + .../Source/Core/Helpers/HCCollect.m | 43 + .../Source/Core/Helpers/HCInvocationMatcher.h | 42 + .../Source/Core/Helpers/HCInvocationMatcher.m | 81 + .../Core/Helpers/HCRequireNonNilObject.h | 14 + .../Core/Helpers/HCRequireNonNilObject.m | 15 + .../Source/Core/Helpers/HCRunloopRunner.h | 21 + .../Source/Core/Helpers/HCRunloopRunner.m | 36 + .../Source/Core/Helpers/HCWrapInMatcher.h | 17 + .../Source/Core/Helpers/HCWrapInMatcher.m | 17 + .../Core/Helpers/NSInvocation+OCHamcrest.h | 17 + .../Core/Helpers/NSInvocation+OCHamcrest.m | 45 + .../ReturnValueGetters/HCBoolReturnGetter.h | 16 + .../ReturnValueGetters/HCBoolReturnGetter.m | 22 + .../ReturnValueGetters/HCCharReturnGetter.h | 16 + .../ReturnValueGetters/HCCharReturnGetter.m | 22 + .../ReturnValueGetters/HCDoubleReturnGetter.h | 16 + .../ReturnValueGetters/HCDoubleReturnGetter.m | 22 + .../ReturnValueGetters/HCFloatReturnGetter.h | 16 + .../ReturnValueGetters/HCFloatReturnGetter.m | 22 + .../ReturnValueGetters/HCIntReturnGetter.h | 16 + .../ReturnValueGetters/HCIntReturnGetter.m | 22 + .../HCLongLongReturnGetter.h | 16 + .../HCLongLongReturnGetter.m | 22 + .../ReturnValueGetters/HCLongReturnGetter.h | 16 + .../ReturnValueGetters/HCLongReturnGetter.m | 22 + .../ReturnValueGetters/HCObjectReturnGetter.h | 16 + .../ReturnValueGetters/HCObjectReturnGetter.m | 22 + .../HCReturnTypeHandlerChain.h | 12 + .../HCReturnTypeHandlerChain.m | 44 + .../ReturnValueGetters/HCReturnValueGetter.h | 20 + .../ReturnValueGetters/HCReturnValueGetter.m | 42 + .../ReturnValueGetters/HCShortReturnGetter.h | 16 + .../ReturnValueGetters/HCShortReturnGetter.m | 22 + .../HCUnsignedCharReturnGetter.h | 16 + .../HCUnsignedCharReturnGetter.m | 22 + .../HCUnsignedIntReturnGetter.h | 16 + .../HCUnsignedIntReturnGetter.m | 22 + .../HCUnsignedLongLongReturnGetter.h | 16 + .../HCUnsignedLongLongReturnGetter.m | 22 + .../HCUnsignedLongReturnGetter.h | 16 + .../HCUnsignedLongReturnGetter.m | 22 + .../HCUnsignedShortReturnGetter.h | 16 + .../HCUnsignedShortReturnGetter.m | 22 + .../HCGenericTestFailureReporter.h | 8 + .../HCGenericTestFailureReporter.m | 31 + .../HCSenTestFailureReporter.h | 8 + .../HCSenTestFailureReporter.m | 69 + .../TestFailureReporters/HCTestFailure.h | 42 + .../TestFailureReporters/HCTestFailure.m | 25 + .../HCTestFailureReporter.h | 25 + .../HCTestFailureReporter.m | 22 + .../HCTestFailureReporterChain.h | 36 + .../HCTestFailureReporterChain.m | 41 + .../HCXCTestFailureReporter.h | 8 + .../HCXCTestFailureReporter.m | 33 + .../Source/Library/Collection/HCEvery.h | 45 + .../Source/Library/Collection/HCEvery.m | 74 + .../Source/Library/Collection/HCHasCount.h | 63 + .../Source/Library/Collection/HCHasCount.m | 65 + .../Collection/HCIsCollectionContaining.h | 95 + .../Collection/HCIsCollectionContaining.m | 88 + .../HCIsCollectionContainingInAnyOrder.h | 79 + .../HCIsCollectionContainingInAnyOrder.m | 115 + .../HCIsCollectionContainingInOrder.h | 71 + .../HCIsCollectionContainingInOrder.m | 134 + .../HCIsCollectionContainingInRelativeOrder.h | 48 + .../HCIsCollectionContainingInRelativeOrder.m | 124 + .../Collection/HCIsCollectionOnlyContaining.h | 62 + .../Collection/HCIsCollectionOnlyContaining.m | 34 + .../Collection/HCIsDictionaryContaining.h | 47 + .../Collection/HCIsDictionaryContaining.m | 56 + .../HCIsDictionaryContainingEntries.h | 68 + .../HCIsDictionaryContainingEntries.m | 132 + .../Collection/HCIsDictionaryContainingKey.h | 44 + .../Collection/HCIsDictionaryContainingKey.m | 46 + .../HCIsDictionaryContainingValue.h | 46 + .../HCIsDictionaryContainingValue.m | 46 + .../Library/Collection/HCIsEmptyCollection.h | 39 + .../Library/Collection/HCIsEmptyCollection.m | 33 + .../Source/Library/Collection/HCIsIn.h | 43 + .../Source/Library/Collection/HCIsIn.m | 45 + .../Source/Library/Decorator/HCDescribedAs.h | 41 + .../Source/Library/Decorator/HCDescribedAs.m | 121 + .../Source/Library/Decorator/HCIs.h | 55 + .../Source/Library/Decorator/HCIs.m | 44 + .../Source/Library/Logical/HCAllOf.h | 64 + .../Source/Library/Logical/HCAllOf.m | 60 + .../Source/Library/Logical/HCAnyOf.h | 62 + .../Source/Library/Logical/HCAnyOf.m | 52 + .../Source/Library/Logical/HCIsAnything.h | 55 + .../Source/Library/Logical/HCIsAnything.m | 47 + .../Source/Library/Logical/HCIsNot.h | 44 + .../Source/Library/Logical/HCIsNot.m | 43 + .../Source/Library/Number/HCIsCloseTo.h | 43 + .../Source/Library/Number/HCIsCloseTo.m | 69 + .../Source/Library/Number/HCIsEqualToNumber.h | 289 ++ .../Source/Library/Number/HCIsEqualToNumber.m | 77 + .../Source/Library/Number/HCIsTrueFalse.h | 55 + .../Source/Library/Number/HCIsTrueFalse.m | 55 + .../Source/Library/Number/HCNumberAssert.h | 340 +++ .../Source/Library/Number/HCNumberAssert.m | 97 + .../Library/Number/HCOrderingComparison.h | 114 + .../Library/Number/HCOrderingComparison.m | 97 + .../Source/Library/Object/HCArgumentCaptor.h | 44 + .../Source/Library/Object/HCArgumentCaptor.m | 56 + .../Source/Library/Object/HCClassMatcher.h | 18 + .../Source/Library/Object/HCClassMatcher.m | 43 + .../Library/Object/HCConformsToProtocol.h | 42 + .../Library/Object/HCConformsToProtocol.m | 44 + .../Source/Library/Object/HCHasDescription.h | 45 + .../Source/Library/Object/HCHasDescription.m | 28 + .../Source/Library/Object/HCHasProperty.h | 47 + .../Source/Library/Object/HCHasProperty.m | 71 + .../Source/Library/Object/HCIsEqual.h | 41 + .../Source/Library/Object/HCIsEqual.m | 46 + .../Source/Library/Object/HCIsInstanceOf.h | 37 + .../Source/Library/Object/HCIsInstanceOf.m | 25 + .../Source/Library/Object/HCIsNil.h | 55 + .../Source/Library/Object/HCIsNil.m | 32 + .../Source/Library/Object/HCIsSame.h | 41 + .../Source/Library/Object/HCIsSame.m | 46 + .../Source/Library/Object/HCIsTypeOf.h | 37 + .../Source/Library/Object/HCIsTypeOf.m | 25 + .../Source/Library/Object/HCThrowsException.h | 41 + .../Source/Library/Object/HCThrowsException.m | 84 + .../Text/HCIsEqualCompressingWhiteSpace.h | 46 + .../Text/HCIsEqualCompressingWhiteSpace.m | 62 + .../Library/Text/HCIsEqualIgnoringCase.h | 41 + .../Library/Text/HCIsEqualIgnoringCase.m | 45 + .../Source/Library/Text/HCStringContains.h | 39 + .../Source/Library/Text/HCStringContains.m | 28 + .../Library/Text/HCStringContainsInOrder.h | 62 + .../Library/Text/HCStringContainsInOrder.m | 78 + .../Source/Library/Text/HCStringEndsWith.h | 40 + .../Source/Library/Text/HCStringEndsWith.m | 28 + .../Source/Library/Text/HCStringStartsWith.h | 40 + .../Source/Library/Text/HCStringStartsWith.m | 28 + .../Source/Library/Text/HCSubstringMatcher.h | 18 + .../Source/Library/Text/HCSubstringMatcher.m | 34 + Pods/OCHamcrest/Source/OCHamcrest.h | 59 + Pods/OCMockito/LICENSE.txt | 35 + Pods/OCMockito/README.md | 415 +++ .../OCMockito/Core/MKTMockingProgress.h | 35 + .../OCMockito/Core/MKTMockingProgress.m | 87 + .../Source/OCMockito/Core/MKTMockitoCore.h | 27 + .../Source/OCMockito/Core/MKTMockitoCore.m | 51 + .../Core/MKTNonObjectArgumentMatching.h | 44 + .../Source/OCMockito/Core/MKTTestLocation.h | 29 + .../Source/OCMockito/Core/MKTTestLocation.m | 23 + .../Source/OCMockito/Core/OCMockito.h | 402 +++ .../Source/OCMockito/Core/OCMockito.m | 148 + .../ArgumentGetters/MKTArgumentGetter.h | 29 + .../ArgumentGetters/MKTArgumentGetter.m | 42 + .../ArgumentGetters/MKTArgumentGetterChain.h | 16 + .../ArgumentGetters/MKTArgumentGetterChain.m | 52 + .../ArgumentGetters/MKTBoolArgumentGetter.h | 16 + .../ArgumentGetters/MKTBoolArgumentGetter.m | 21 + .../ArgumentGetters/MKTCharArgumentGetter.h | 16 + .../ArgumentGetters/MKTCharArgumentGetter.m | 21 + .../ArgumentGetters/MKTClassArgumentGetter.h | 16 + .../ArgumentGetters/MKTClassArgumentGetter.m | 21 + .../ArgumentGetters/MKTDoubleArgumentGetter.h | 16 + .../ArgumentGetters/MKTDoubleArgumentGetter.m | 21 + .../ArgumentGetters/MKTFloatArgumentGetter.h | 16 + .../ArgumentGetters/MKTFloatArgumentGetter.m | 21 + .../ArgumentGetters/MKTIntArgumentGetter.h | 16 + .../ArgumentGetters/MKTIntArgumentGetter.m | 21 + .../ArgumentGetters/MKTLongArgumentGetter.h | 16 + .../ArgumentGetters/MKTLongArgumentGetter.m | 21 + .../MKTLongLongArgumentGetter.h | 15 + .../MKTLongLongArgumentGetter.m | 21 + .../ArgumentGetters/MKTObjectArgumentGetter.h | 16 + .../ArgumentGetters/MKTObjectArgumentGetter.m | 21 + .../MKTPointerArgumentGetter.h | 16 + .../MKTPointerArgumentGetter.m | 22 + .../MKTSelectorArgumentGetter.h | 16 + .../MKTSelectorArgumentGetter.m | 21 + .../ArgumentGetters/MKTShortArgumentGetter.h | 16 + .../ArgumentGetters/MKTShortArgumentGetter.m | 21 + .../ArgumentGetters/MKTStructArgumentGetter.h | 16 + .../ArgumentGetters/MKTStructArgumentGetter.m | 28 + .../MKTUnsignedCharArgumentGetter.h | 16 + .../MKTUnsignedCharArgumentGetter.m | 21 + .../MKTUnsignedIntArgumentGetter.h | 16 + .../MKTUnsignedIntArgumentGetter.m | 21 + .../MKTUnsignedLongArgumentGetter.h | 16 + .../MKTUnsignedLongArgumentGetter.m | 21 + .../MKTUnsignedLongLongArgumentGetter.h | 16 + .../MKTUnsignedLongLongArgumentGetter.m | 21 + .../MKTUnsignedShortArgumentGetter.h | 16 + .../MKTUnsignedShortArgumentGetter.m | 21 + .../ReturnValueSetters/MKTBoolReturnSetter.h | 16 + .../ReturnValueSetters/MKTBoolReturnSetter.m | 21 + .../ReturnValueSetters/MKTCharReturnSetter.h | 16 + .../ReturnValueSetters/MKTCharReturnSetter.m | 21 + .../ReturnValueSetters/MKTClassReturnSetter.h | 16 + .../ReturnValueSetters/MKTClassReturnSetter.m | 21 + .../MKTDoubleReturnSetter.h | 16 + .../MKTDoubleReturnSetter.m | 21 + .../ReturnValueSetters/MKTFloatReturnSetter.h | 16 + .../ReturnValueSetters/MKTFloatReturnSetter.m | 21 + .../ReturnValueSetters/MKTIntReturnSetter.h | 16 + .../ReturnValueSetters/MKTIntReturnSetter.m | 21 + .../MKTLongLongReturnSetter.h | 16 + .../MKTLongLongReturnSetter.m | 21 + .../ReturnValueSetters/MKTLongReturnSetter.h | 16 + .../ReturnValueSetters/MKTLongReturnSetter.m | 21 + .../MKTObjectReturnSetter.h | 16 + .../MKTObjectReturnSetter.m | 21 + .../ReturnValueSetters/MKTReturnValueSetter.h | 30 + .../ReturnValueSetters/MKTReturnValueSetter.m | 43 + .../MKTReturnValueSetterChain.h | 16 + .../MKTReturnValueSetterChain.m | 48 + .../ReturnValueSetters/MKTShortReturnSetter.h | 16 + .../ReturnValueSetters/MKTShortReturnSetter.m | 21 + .../MKTStructReturnSetter.h | 17 + .../MKTStructReturnSetter.m | 23 + .../MKTUnsignedCharReturnSetter.h | 16 + .../MKTUnsignedCharReturnSetter.m | 21 + .../MKTUnsignedIntReturnSetter.h | 16 + .../MKTUnsignedIntReturnSetter.m | 21 + .../MKTUnsignedLongLongReturnSetter.h | 17 + .../MKTUnsignedLongLongReturnSetter.m | 21 + .../MKTUnsignedLongReturnSetter.h | 16 + .../MKTUnsignedLongReturnSetter.m | 21 + .../MKTUnsignedShortReturnSetter.h | 16 + .../MKTUnsignedShortReturnSetter.m | 21 + .../Invocation/MKTCallStackElement.h | 19 + .../Invocation/MKTCallStackElement.m | 53 + .../OCMockito/Invocation/MKTFilterCallStack.h | 13 + .../OCMockito/Invocation/MKTFilterCallStack.m | 34 + .../OCMockito/Invocation/MKTInvocation.h | 23 + .../OCMockito/Invocation/MKTInvocation.m | 27 + .../Invocation/MKTInvocationMatcher.h | 27 + .../Invocation/MKTInvocationMatcher.m | 149 + .../Source/OCMockito/Invocation/MKTLocation.h | 16 + .../Source/OCMockito/Invocation/MKTLocation.m | 36 + .../Invocation/MKTMatchingInvocationsFinder.h | 24 + .../Invocation/MKTMatchingInvocationsFinder.m | 50 + .../OCMockito/Invocation/MKTParseCallStack.h | 13 + .../OCMockito/Invocation/MKTParseCallStack.m | 18 + .../Source/OCMockito/Invocation/MKTPrinter.h | 24 + .../Source/OCMockito/Invocation/MKTPrinter.m | 170 ++ .../Invocation/NSInvocation+OCMockito.h | 35 + .../Invocation/NSInvocation+OCMockito.m | 52 + .../OCMockito/Mocking/MKTBaseMockObject.h | 19 + .../OCMockito/Mocking/MKTBaseMockObject.m | 128 + .../OCMockito/Mocking/MKTClassObjectMock.h | 23 + .../OCMockito/Mocking/MKTClassObjectMock.m | 63 + .../OCMockito/Mocking/MKTDynamicProperties.h | 17 + .../OCMockito/Mocking/MKTDynamicProperties.m | 146 + .../Mocking/MKTObjectAndProtocolMock.h | 21 + .../Mocking/MKTObjectAndProtocolMock.m | 61 + .../Source/OCMockito/Mocking/MKTObjectMock.h | 19 + .../Source/OCMockito/Mocking/MKTObjectMock.m | 54 + .../OCMockito/Mocking/MKTProtocolMock.h | 22 + .../OCMockito/Mocking/MKTProtocolMock.m | 68 + .../OCMockito/Mocking/MKTSingletonSwizzler.h | 21 + .../OCMockito/Mocking/MKTSingletonSwizzler.m | 144 + .../Source/OCMockito/Stubbing/MKTAnswer.h | 24 + .../OCMockito/Stubbing/MKTExecutesBlock.h | 19 + .../OCMockito/Stubbing/MKTExecutesBlock.m | 26 + .../Stubbing/MKTInvocationContainer.h | 28 + .../Stubbing/MKTInvocationContainer.m | 74 + .../OCMockito/Stubbing/MKTOngoingStubbing.h | 152 ++ .../OCMockito/Stubbing/MKTOngoingStubbing.m | 180 ++ .../OCMockito/Stubbing/MKTReturnsValue.h | 19 + .../OCMockito/Stubbing/MKTReturnsValue.m | 26 + .../Stubbing/MKTStubbedInvocationMatcher.h | 16 + .../Stubbing/MKTStubbedInvocationMatcher.m | 36 + .../OCMockito/Stubbing/MKTThrowsException.h | 19 + .../OCMockito/Stubbing/MKTThrowsException.m | 27 + .../MKTAtLeastNumberOfInvocationsChecker.h | 22 + .../MKTAtLeastNumberOfInvocationsChecker.m | 29 + .../OCMockito/Verifying/MKTAtLeastTimes.h | 18 + .../OCMockito/Verifying/MKTAtLeastTimes.m | 38 + .../MKTAtMostNumberOfInvocationsChecker.h | 22 + .../MKTAtMostNumberOfInvocationsChecker.m | 31 + .../OCMockito/Verifying/MKTAtMostTimes.h | 18 + .../OCMockito/Verifying/MKTAtMostTimes.m | 38 + .../OCMockito/Verifying/MKTExactTimes.h | 17 + .../OCMockito/Verifying/MKTExactTimes.m | 50 + .../Verifying/MKTInvocationsChecker.h | 23 + .../Verifying/MKTInvocationsChecker.m | 84 + .../Verifying/MKTMissingInvocationChecker.h | 23 + .../Verifying/MKTMissingInvocationChecker.m | 91 + .../Verifying/MKTNumberOfInvocationsChecker.h | 22 + .../Verifying/MKTNumberOfInvocationsChecker.m | 35 + .../OCMockito/Verifying/MKTVerificationData.h | 26 + .../OCMockito/Verifying/MKTVerificationData.m | 35 + .../OCMockito/Verifying/MKTVerificationMode.h | 22 + .../TPDWeakProxy/MKT_TPDWeakProxy.h | 25 + .../TPDWeakProxy/MKT_TPDWeakProxy.m | 56 + Pods/Pods.xcodeproj/project.pbxproj | 2393 +++++++++++++++++ .../OCHamcrest/OCHamcrest-Info.plist | 26 + .../OCHamcrest/OCHamcrest-dummy.m | 5 + .../OCHamcrest/OCHamcrest-prefix.pch | 12 + .../OCHamcrest/OCHamcrest-umbrella.h | 74 + .../OCHamcrest/OCHamcrest.debug.xcconfig | 9 + .../OCHamcrest/OCHamcrest.modulemap | 6 + .../OCHamcrest/OCHamcrest.release.xcconfig | 9 + .../OCMockito/OCMockito-Info.plist | 26 + .../OCMockito/OCMockito-dummy.m | 5 + .../OCMockito/OCMockito-prefix.pch | 12 + .../OCMockito/OCMockito-umbrella.h | 25 + .../OCMockito/OCMockito.debug.xcconfig | 10 + .../OCMockito/OCMockito.modulemap | 6 + .../OCMockito/OCMockito.release.xcconfig | 10 + ...onsterCards-MonsterCardsUITests-Info.plist | 26 + ...sterCardsUITests-acknowledgements.markdown | 59 + ...MonsterCardsUITests-acknowledgements.plist | 97 + ...s-MonsterCards-MonsterCardsUITests-dummy.m | 5 + ...ts-frameworks-Debug-input-files.xcfilelist | 3 + ...s-frameworks-Debug-output-files.xcfilelist | 2 + ...-frameworks-Release-input-files.xcfilelist | 3 + ...frameworks-Release-output-files.xcfilelist | 2 + ...terCards-MonsterCardsUITests-frameworks.sh | 209 ++ ...onsterCards-MonsterCardsUITests-umbrella.h | 16 + ...erCards-MonsterCardsUITests.debug.xcconfig | 10 + ...MonsterCards-MonsterCardsUITests.modulemap | 6 + ...Cards-MonsterCardsUITests.release.xcconfig | 10 + .../Pods-MonsterCards-Info.plist | 26 + ...ods-MonsterCards-acknowledgements.markdown | 3 + .../Pods-MonsterCards-acknowledgements.plist | 29 + .../Pods-MonsterCards-dummy.m | 5 + .../Pods-MonsterCards-umbrella.h | 16 + .../Pods-MonsterCards.debug.xcconfig | 6 + .../Pods-MonsterCards.modulemap | 6 + .../Pods-MonsterCards.release.xcconfig | 6 + .../Pods-MonsterCardsTests-Info.plist | 26 + ...onsterCardsTests-acknowledgements.markdown | 59 + ...s-MonsterCardsTests-acknowledgements.plist | 97 + .../Pods-MonsterCardsTests-dummy.m | 5 + ...ts-frameworks-Debug-input-files.xcfilelist | 3 + ...s-frameworks-Debug-output-files.xcfilelist | 2 + ...-frameworks-Release-input-files.xcfilelist | 3 + ...frameworks-Release-output-files.xcfilelist | 2 + .../Pods-MonsterCardsTests-frameworks.sh | 209 ++ .../Pods-MonsterCardsTests-umbrella.h | 16 + .../Pods-MonsterCardsTests.debug.xcconfig | 10 + .../Pods-MonsterCardsTests.modulemap | 6 + .../Pods-MonsterCardsTests.release.xcconfig | 10 + 364 files changed, 17147 insertions(+), 1 deletion(-) create mode 100644 MonsterCards.xcworkspace/contents.xcworkspacedata create mode 100644 MonsterCards.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Podfile create mode 100644 Podfile.lock create mode 100644 Pods/Manifest.lock create mode 100644 Pods/OCHamcrest/LICENSE.txt create mode 100644 Pods/OCHamcrest/README.md create mode 100644 Pods/OCHamcrest/Source/Core/HCAssertThat.h create mode 100644 Pods/OCHamcrest/Source/Core/HCAssertThat.m create mode 100644 Pods/OCHamcrest/Source/Core/HCBaseDescription.h create mode 100644 Pods/OCHamcrest/Source/Core/HCBaseDescription.m create mode 100644 Pods/OCHamcrest/Source/Core/HCBaseMatcher.h create mode 100644 Pods/OCHamcrest/Source/Core/HCBaseMatcher.m create mode 100644 Pods/OCHamcrest/Source/Core/HCDescription.h create mode 100644 Pods/OCHamcrest/Source/Core/HCDiagnosingMatcher.h create mode 100644 Pods/OCHamcrest/Source/Core/HCDiagnosingMatcher.m create mode 100644 Pods/OCHamcrest/Source/Core/HCMatcher.h create mode 100644 Pods/OCHamcrest/Source/Core/HCSelfDescribing.h create mode 100644 Pods/OCHamcrest/Source/Core/HCStringDescription.h create mode 100644 Pods/OCHamcrest/Source/Core/HCStringDescription.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/HCCollect.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/HCCollect.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/HCInvocationMatcher.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/HCInvocationMatcher.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/HCRequireNonNilObject.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/HCRequireNonNilObject.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/HCRunloopRunner.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/HCRunloopRunner.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/HCWrapInMatcher.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/HCWrapInMatcher.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/NSInvocation+OCHamcrest.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/NSInvocation+OCHamcrest.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailure.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailure.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.m create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.h create mode 100644 Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCEvery.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCEvery.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCHasCount.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCHasCount.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContaining.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContaining.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInOrder.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInOrder.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionOnlyContaining.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionOnlyContaining.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContaining.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContaining.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingEntries.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingEntries.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingKey.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingKey.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingValue.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingValue.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsEmptyCollection.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsEmptyCollection.m create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsIn.h create mode 100644 Pods/OCHamcrest/Source/Library/Collection/HCIsIn.m create mode 100644 Pods/OCHamcrest/Source/Library/Decorator/HCDescribedAs.h create mode 100644 Pods/OCHamcrest/Source/Library/Decorator/HCDescribedAs.m create mode 100644 Pods/OCHamcrest/Source/Library/Decorator/HCIs.h create mode 100644 Pods/OCHamcrest/Source/Library/Decorator/HCIs.m create mode 100644 Pods/OCHamcrest/Source/Library/Logical/HCAllOf.h create mode 100644 Pods/OCHamcrest/Source/Library/Logical/HCAllOf.m create mode 100644 Pods/OCHamcrest/Source/Library/Logical/HCAnyOf.h create mode 100644 Pods/OCHamcrest/Source/Library/Logical/HCAnyOf.m create mode 100644 Pods/OCHamcrest/Source/Library/Logical/HCIsAnything.h create mode 100644 Pods/OCHamcrest/Source/Library/Logical/HCIsAnything.m create mode 100644 Pods/OCHamcrest/Source/Library/Logical/HCIsNot.h create mode 100644 Pods/OCHamcrest/Source/Library/Logical/HCIsNot.m create mode 100644 Pods/OCHamcrest/Source/Library/Number/HCIsCloseTo.h create mode 100644 Pods/OCHamcrest/Source/Library/Number/HCIsCloseTo.m create mode 100644 Pods/OCHamcrest/Source/Library/Number/HCIsEqualToNumber.h create mode 100644 Pods/OCHamcrest/Source/Library/Number/HCIsEqualToNumber.m create mode 100644 Pods/OCHamcrest/Source/Library/Number/HCIsTrueFalse.h create mode 100644 Pods/OCHamcrest/Source/Library/Number/HCIsTrueFalse.m create mode 100644 Pods/OCHamcrest/Source/Library/Number/HCNumberAssert.h create mode 100644 Pods/OCHamcrest/Source/Library/Number/HCNumberAssert.m create mode 100644 Pods/OCHamcrest/Source/Library/Number/HCOrderingComparison.h create mode 100644 Pods/OCHamcrest/Source/Library/Number/HCOrderingComparison.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCArgumentCaptor.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCArgumentCaptor.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCClassMatcher.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCClassMatcher.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCConformsToProtocol.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCConformsToProtocol.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCHasDescription.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCHasDescription.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCHasProperty.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCHasProperty.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCIsEqual.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCIsEqual.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCIsInstanceOf.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCIsInstanceOf.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCIsNil.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCIsNil.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCIsSame.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCIsSame.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCIsTypeOf.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCIsTypeOf.m create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCThrowsException.h create mode 100644 Pods/OCHamcrest/Source/Library/Object/HCThrowsException.m create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCIsEqualCompressingWhiteSpace.h create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCIsEqualCompressingWhiteSpace.m create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCIsEqualIgnoringCase.h create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCIsEqualIgnoringCase.m create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCStringContains.h create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCStringContains.m create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCStringContainsInOrder.h create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCStringContainsInOrder.m create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCStringEndsWith.h create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCStringEndsWith.m create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCStringStartsWith.h create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCStringStartsWith.m create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCSubstringMatcher.h create mode 100644 Pods/OCHamcrest/Source/Library/Text/HCSubstringMatcher.m create mode 100644 Pods/OCHamcrest/Source/OCHamcrest.h create mode 100644 Pods/OCMockito/LICENSE.txt create mode 100644 Pods/OCMockito/README.md create mode 100644 Pods/OCMockito/Source/OCMockito/Core/MKTMockingProgress.h create mode 100644 Pods/OCMockito/Source/OCMockito/Core/MKTMockingProgress.m create mode 100644 Pods/OCMockito/Source/OCMockito/Core/MKTMockitoCore.h create mode 100644 Pods/OCMockito/Source/OCMockito/Core/MKTMockitoCore.m create mode 100644 Pods/OCMockito/Source/OCMockito/Core/MKTNonObjectArgumentMatching.h create mode 100644 Pods/OCMockito/Source/OCMockito/Core/MKTTestLocation.h create mode 100644 Pods/OCMockito/Source/OCMockito/Core/MKTTestLocation.m create mode 100644 Pods/OCMockito/Source/OCMockito/Core/OCMockito.h create mode 100644 Pods/OCMockito/Source/OCMockito/Core/OCMockito.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetterChain.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetterChain.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTCharArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTCharArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTDoubleArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTDoubleArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTFloatArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTFloatArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTIntArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTIntArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongLongArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongLongArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTObjectArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTObjectArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTPointerArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTPointerArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTSelectorArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTSelectorArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTShortArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTShortArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTStructArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTStructArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedIntArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedIntArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongLongArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongLongArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedShortArgumentGetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedShortArgumentGetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTBoolReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTBoolReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTClassReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTClassReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTDoubleReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTDoubleReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTFloatReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTFloatReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTIntReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTIntReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongLongReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongLongReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTObjectReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTObjectReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetterChain.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetterChain.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTShortReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTShortReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTStructReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTStructReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedCharReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedCharReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedIntReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedIntReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongLongReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongLongReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedShortReturnSetter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedShortReturnSetter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTCallStackElement.h create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTCallStackElement.m create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTFilterCallStack.h create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTFilterCallStack.m create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocation.h create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocation.m create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocationMatcher.h create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocationMatcher.m create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTLocation.h create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTLocation.m create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTMatchingInvocationsFinder.h create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTMatchingInvocationsFinder.m create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTParseCallStack.h create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTParseCallStack.m create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTPrinter.h create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/MKTPrinter.m create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/NSInvocation+OCMockito.h create mode 100644 Pods/OCMockito/Source/OCMockito/Invocation/NSInvocation+OCMockito.m create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTBaseMockObject.h create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTBaseMockObject.m create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTClassObjectMock.h create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTClassObjectMock.m create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTDynamicProperties.h create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTDynamicProperties.m create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectAndProtocolMock.h create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectAndProtocolMock.m create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectMock.h create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectMock.m create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTProtocolMock.h create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTProtocolMock.m create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTSingletonSwizzler.h create mode 100644 Pods/OCMockito/Source/OCMockito/Mocking/MKTSingletonSwizzler.m create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTAnswer.h create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTExecutesBlock.h create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTExecutesBlock.m create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTInvocationContainer.h create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTInvocationContainer.m create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTOngoingStubbing.h create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTOngoingStubbing.m create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTReturnsValue.h create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTReturnsValue.m create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTStubbedInvocationMatcher.h create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTStubbedInvocationMatcher.m create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTThrowsException.h create mode 100644 Pods/OCMockito/Source/OCMockito/Stubbing/MKTThrowsException.m create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.h create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.m create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastTimes.h create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastTimes.m create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostNumberOfInvocationsChecker.h create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostNumberOfInvocationsChecker.m create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostTimes.h create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostTimes.m create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTExactTimes.h create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTExactTimes.m create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTInvocationsChecker.h create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTInvocationsChecker.m create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTMissingInvocationChecker.h create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTMissingInvocationChecker.m create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTNumberOfInvocationsChecker.h create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTNumberOfInvocationsChecker.m create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationData.h create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationData.m create mode 100644 Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationMode.h create mode 100644 Pods/OCMockito/Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.h create mode 100644 Pods/OCMockito/Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.m create mode 100644 Pods/Pods.xcodeproj/project.pbxproj create mode 100644 Pods/Target Support Files/OCHamcrest/OCHamcrest-Info.plist create mode 100644 Pods/Target Support Files/OCHamcrest/OCHamcrest-dummy.m create mode 100644 Pods/Target Support Files/OCHamcrest/OCHamcrest-prefix.pch create mode 100644 Pods/Target Support Files/OCHamcrest/OCHamcrest-umbrella.h create mode 100644 Pods/Target Support Files/OCHamcrest/OCHamcrest.debug.xcconfig create mode 100644 Pods/Target Support Files/OCHamcrest/OCHamcrest.modulemap create mode 100644 Pods/Target Support Files/OCHamcrest/OCHamcrest.release.xcconfig create mode 100644 Pods/Target Support Files/OCMockito/OCMockito-Info.plist create mode 100644 Pods/Target Support Files/OCMockito/OCMockito-dummy.m create mode 100644 Pods/Target Support Files/OCMockito/OCMockito-prefix.pch create mode 100644 Pods/Target Support Files/OCMockito/OCMockito-umbrella.h create mode 100644 Pods/Target Support Files/OCMockito/OCMockito.debug.xcconfig create mode 100644 Pods/Target Support Files/OCMockito/OCMockito.modulemap create mode 100644 Pods/Target Support Files/OCMockito/OCMockito.release.xcconfig create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-Info.plist create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-acknowledgements.markdown create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-acknowledgements.plist create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-dummy.m create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Debug-input-files.xcfilelist create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Debug-output-files.xcfilelist create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Release-input-files.xcfilelist create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Release-output-files.xcfilelist create mode 100755 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks.sh create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-umbrella.h create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.modulemap create mode 100644 Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.release.xcconfig create mode 100644 Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-Info.plist create mode 100644 Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-acknowledgements.markdown create mode 100644 Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-acknowledgements.plist create mode 100644 Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-dummy.m create mode 100644 Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-umbrella.h create mode 100644 Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.debug.xcconfig create mode 100644 Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.modulemap create mode 100644 Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.release.xcconfig create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-Info.plist create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-acknowledgements.markdown create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-acknowledgements.plist create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-dummy.m create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Debug-input-files.xcfilelist create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Debug-output-files.xcfilelist create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Release-input-files.xcfilelist create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Release-output-files.xcfilelist create mode 100755 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks.sh create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-umbrella.h create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.debug.xcconfig create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.modulemap create mode 100644 Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.release.xcconfig diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 4dcce0b..75325fe 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -3,10 +3,13 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ + 1D2A61B332F293AB365B59E7 /* Pods_MonsterCards_MonsterCardsUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89F0D2EC2EC3C99EFD9A6949 /* Pods_MonsterCards_MonsterCardsUITests.framework */; }; + 92967C3D4DFE1D9C66FF994F /* Pods_MonsterCards.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8D56491D6CAB92316D2C1B /* Pods_MonsterCards.framework */; }; + CE281520762D69A9E98D19CF /* Pods_MonsterCardsTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9F017069E22ED575758F9E2 /* Pods_MonsterCardsTests.framework */; }; E20D032425031B9D00FB6E43 /* SearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032325031B9D00FB6E43 /* SearchViewController.m */; }; E20D032825031BDA00FB6E43 /* MonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032725031BDA00FB6E43 /* MonsterViewController.m */; }; E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032A25031BE500FB6E43 /* LibraryViewController.m */; }; @@ -54,6 +57,13 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 1A3B9A106B1FD3BB7C0750DF /* Pods-MonsterCardsTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCardsTests.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.debug.xcconfig"; sourceTree = ""; }; + 598715810FF9D9DA2A1E91C6 /* Pods-MonsterCardsTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCardsTests.release.xcconfig"; path = "Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.release.xcconfig"; sourceTree = ""; }; + 6E60C8124CB33D697F6D0390 /* Pods-MonsterCards-MonsterCardsUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards-MonsterCardsUITests.release.xcconfig"; path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.release.xcconfig"; sourceTree = ""; }; + 89F0D2EC2EC3C99EFD9A6949 /* Pods_MonsterCards_MonsterCardsUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MonsterCards_MonsterCardsUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A7E1FCC69D4538591C4D289B /* Pods-MonsterCards.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards/Pods-MonsterCards.debug.xcconfig"; sourceTree = ""; }; + A9F017069E22ED575758F9E2 /* Pods_MonsterCardsTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MonsterCardsTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D079B8CF0ADA838AAA0A13EA /* Pods-MonsterCards.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards.release.xcconfig"; path = "Target Support Files/Pods-MonsterCards/Pods-MonsterCards.release.xcconfig"; sourceTree = ""; }; E20D032225031B9D00FB6E43 /* SearchViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchViewController.h; sourceTree = ""; }; E20D032325031B9D00FB6E43 /* SearchViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SearchViewController.m; sourceTree = ""; }; E20D032625031BDA00FB6E43 /* MonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MonsterViewController.h; sourceTree = ""; }; @@ -80,6 +90,7 @@ E25BD60325036CF0007B04EF /* Ability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Ability.m; sourceTree = ""; }; E25BD60525036CFA007B04EF /* Action.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Action.h; sourceTree = ""; }; E25BD60625036CFA007B04EF /* Action.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Action.m; sourceTree = ""; }; + E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; sourceTree = ""; }; E2F7247025005E89007D87ED /* Monster Cards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Monster Cards.app"; sourceTree = BUILT_PRODUCTS_DIR; }; E2F7247325005E89007D87ED /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; E2F7247425005E89007D87ED /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -102,6 +113,7 @@ E2FD91E72504832A00D5E935 /* DamageTypeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DamageTypeTests.m; sourceTree = ""; }; E2FD91E9250493C000D5E935 /* LanguageTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LanguageTests.m; sourceTree = ""; }; E2FD91EB250496B000D5E935 /* SavingThrowTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SavingThrowTests.m; sourceTree = ""; }; + FA8D56491D6CAB92316D2C1B /* Pods_MonsterCards.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MonsterCards.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -109,6 +121,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 92967C3D4DFE1D9C66FF994F /* Pods_MonsterCards.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -116,6 +129,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + CE281520762D69A9E98D19CF /* Pods_MonsterCardsTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -123,12 +137,36 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 1D2A61B332F293AB365B59E7 /* Pods_MonsterCards_MonsterCardsUITests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 609B2034EDEFF32DFBB7EA4C /* Frameworks */ = { + isa = PBXGroup; + children = ( + FA8D56491D6CAB92316D2C1B /* Pods_MonsterCards.framework */, + 89F0D2EC2EC3C99EFD9A6949 /* Pods_MonsterCards_MonsterCardsUITests.framework */, + A9F017069E22ED575758F9E2 /* Pods_MonsterCardsTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6A84BC38693A798A444629A6 /* Pods */ = { + isa = PBXGroup; + children = ( + A7E1FCC69D4538591C4D289B /* Pods-MonsterCards.debug.xcconfig */, + D079B8CF0ADA838AAA0A13EA /* Pods-MonsterCards.release.xcconfig */, + E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */, + 6E60C8124CB33D697F6D0390 /* Pods-MonsterCards-MonsterCardsUITests.release.xcconfig */, + 1A3B9A106B1FD3BB7C0750DF /* Pods-MonsterCardsTests.debug.xcconfig */, + 598715810FF9D9DA2A1E91C6 /* Pods-MonsterCardsTests.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; E20D032525031BA700FB6E43 /* Views */ = { isa = PBXGroup; children = ( @@ -183,6 +221,8 @@ E2F7249425005E8A007D87ED /* MonsterCardsTests */, E2F7249F25005E8A007D87ED /* MonsterCardsUITests */, E2F7247125005E89007D87ED /* Products */, + 6A84BC38693A798A444629A6 /* Pods */, + 609B2034EDEFF32DFBB7EA4C /* Frameworks */, ); sourceTree = ""; }; @@ -254,6 +294,7 @@ isa = PBXNativeTarget; buildConfigurationList = E2F724A525005E8A007D87ED /* Build configuration list for PBXNativeTarget "MonsterCards" */; buildPhases = ( + AF1B6FE4523297C87023B0DF /* [CP] Check Pods Manifest.lock */, E2F7246C25005E89007D87ED /* Sources */, E2F7246D25005E89007D87ED /* Frameworks */, E2F7246E25005E89007D87ED /* Resources */, @@ -271,9 +312,11 @@ isa = PBXNativeTarget; buildConfigurationList = E2F724A825005E8A007D87ED /* Build configuration list for PBXNativeTarget "MonsterCardsTests" */; buildPhases = ( + D9D7576D397FF8A326CDF668 /* [CP] Check Pods Manifest.lock */, E2F7248D25005E8A007D87ED /* Sources */, E2F7248E25005E8A007D87ED /* Frameworks */, E2F7248F25005E8A007D87ED /* Resources */, + B173B419A3492DBA8FAF736D /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -289,9 +332,11 @@ isa = PBXNativeTarget; buildConfigurationList = E2F724AB25005E8A007D87ED /* Build configuration list for PBXNativeTarget "MonsterCardsUITests" */; buildPhases = ( + 5A9D2F6B7303F47844E1DAB9 /* [CP] Check Pods Manifest.lock */, E2F7249825005E8A007D87ED /* Sources */, E2F7249925005E8A007D87ED /* Frameworks */, E2F7249A25005E8A007D87ED /* Resources */, + A89C1C3958588F1AC6C1F437 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -372,6 +417,109 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 5A9D2F6B7303F47844E1DAB9 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MonsterCards-MonsterCardsUITests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + A89C1C3958588F1AC6C1F437 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + AF1B6FE4523297C87023B0DF /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MonsterCards-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + B173B419A3492DBA8FAF736D /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + D9D7576D397FF8A326CDF668 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MonsterCardsTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ E2F7246C25005E89007D87ED /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -565,6 +713,7 @@ }; E2F724A625005E8A007D87ED /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = A7E1FCC69D4538591C4D289B /* Pods-MonsterCards.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -582,6 +731,7 @@ }; E2F724A725005E8A007D87ED /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D079B8CF0ADA838AAA0A13EA /* Pods-MonsterCards.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -599,6 +749,7 @@ }; E2F724A925005E8A007D87ED /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 1A3B9A106B1FD3BB7C0750DF /* Pods-MonsterCardsTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -619,6 +770,7 @@ }; E2F724AA25005E8A007D87ED /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 598715810FF9D9DA2A1E91C6 /* Pods-MonsterCardsTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -639,6 +791,7 @@ }; E2F724AC25005E8A007D87ED /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = J793L9LQJ2; @@ -657,6 +810,7 @@ }; E2F724AD25005E8A007D87ED /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6E60C8124CB33D697F6D0390 /* Pods-MonsterCards-MonsterCardsUITests.release.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = J793L9LQJ2; diff --git a/MonsterCards.xcworkspace/contents.xcworkspacedata b/MonsterCards.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0b75773 --- /dev/null +++ b/MonsterCards.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/MonsterCards.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/MonsterCards.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/MonsterCards.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..915d658 --- /dev/null +++ b/Podfile @@ -0,0 +1,23 @@ +# Uncomment the next line to define a global platform for your project + platform :ios, '13.0' + +target 'MonsterCards' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for MonsterCards + + target 'MonsterCardsTests' do + inherit! :search_paths + # Pods for testing + use_frameworks! + pod 'OCMockito', '~> 5.0' + end + + target 'MonsterCardsUITests' do + # Pods for testing + use_frameworks! + pod 'OCMockito', '~> 5.0' + end + +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..a08fd1b --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,20 @@ +PODS: + - OCHamcrest (7.1.2) + - OCMockito (5.1.3): + - OCHamcrest (~> 7.0) + +DEPENDENCIES: + - OCMockito (~> 5.0) + +SPEC REPOS: + trunk: + - OCHamcrest + - OCMockito + +SPEC CHECKSUMS: + OCHamcrest: b284c9592c28c1e4025a8542e67ea41a635d0d73 + OCMockito: 677cbb4a18fd492b5a4fb10144dada4de5ddb877 + +PODFILE CHECKSUM: eb23b43ec595daf087b654b091459c1355772a1d + +COCOAPODS: 1.9.3 diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock new file mode 100644 index 0000000..a08fd1b --- /dev/null +++ b/Pods/Manifest.lock @@ -0,0 +1,20 @@ +PODS: + - OCHamcrest (7.1.2) + - OCMockito (5.1.3): + - OCHamcrest (~> 7.0) + +DEPENDENCIES: + - OCMockito (~> 5.0) + +SPEC REPOS: + trunk: + - OCHamcrest + - OCMockito + +SPEC CHECKSUMS: + OCHamcrest: b284c9592c28c1e4025a8542e67ea41a635d0d73 + OCMockito: 677cbb4a18fd492b5a4fb10144dada4de5ddb877 + +PODFILE CHECKSUM: eb23b43ec595daf087b654b091459c1355772a1d + +COCOAPODS: 1.9.3 diff --git a/Pods/OCHamcrest/LICENSE.txt b/Pods/OCHamcrest/LICENSE.txt new file mode 100644 index 0000000..2a24489 --- /dev/null +++ b/Pods/OCHamcrest/LICENSE.txt @@ -0,0 +1,13 @@ +OCHamcrest by Jon Reid, https://qualitycoding.org/ +Copyright 2019 hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +(BSD License) diff --git a/Pods/OCHamcrest/README.md b/Pods/OCHamcrest/README.md new file mode 100644 index 0000000..45a0e1c --- /dev/null +++ b/Pods/OCHamcrest/README.md @@ -0,0 +1,244 @@ +![ochamcrest](http://hamcrest.org/images/logo.jpg) + +What is OCHamcrest? +------------------- + +[![Build Status](https://travis-ci.org/hamcrest/OCHamcrest.svg?branch=master)](https://travis-ci.org/hamcrest/OCHamcrest) +[![Coverage Status](https://coveralls.io/repos/hamcrest/OCHamcrest/badge.svg?branch=master)](https://coveralls.io/r/hamcrest/OCHamcrest?branch=master) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Cocoapods Version](https://cocoapod-badges.herokuapp.com/v/OCHamcrest/badge.png)](https://cocoapods.org/pods/OCHamcrest) +[![Twitter Follow](https://img.shields.io/twitter/follow/qcoding.svg?style=social)](https://twitter.com/qcoding) + +OCHamcrest is an Objective-C module providing: + +* a library of "matcher" objects for declaring rules to check whether a given object matches those + rules. +* a framework for writing your own matchers. + +Matchers are useful for a variety of purposes, such as UI validation. But they're most commonly used +for writing unit tests that are expressive and flexible. + + +My first OCHamcrest test +------------------------ + +We'll start by writing a very simple Xcode unit test, but instead of using XCTest's +`XCTAssertEqualObjects` function, we'll use OCHamcrest's `assertThat` construct and a predefined +matcher: + +```obj-c +@import OCHamcrest; +@import XCTest; + +@interface BiscuitTest : XCTestCase +@end + +@implementation BiscuitTest + +- (void)testEquals +{ + Biscuit* theBiscuit = [[Biscuit alloc] initWithName:@"Ginger"]; + Biscuit* myBiscuit = [[Biscuit alloc] initWithName:@"Ginger"]; + assertThat(theBiscuit, equalTo(myBiscuit)); +} + +@end +``` + +The `assertThat` function is a stylized sentence for making a test assertion. In this example, the +subject of the assertion is the object `theBiscuit`, which is the first method parameter. The second +method parameter is a matcher for `Biscuit` objects, here a matcher that checks one object is equal +to another using the `-isEqual:` method. The test passes since the `Biscuit` class defines an +`-isEqual:` method. + +OCHamcrest's functions are actually declared with an "HC_" package prefix (such as `HC_assertThat` +and `HC_equalTo`) to avoid name clashes. To make test writing faster and test code more legible, +optional short syntax is provided by default. For example, instead of writing `HC_assertThat`, +simply write `assertThat`. + + +Predefined matchers +------------------- + +OCHamcrest comes with a library of useful matchers: + +* Object + + * `conformsTo` - match object that conforms to protocol + * `equalTo` - match equal object + * `hasDescription` - match object's `-description` + * `hasProperty` - match return value of method with given name + * `instanceOf` - match object type + * `isA` - match object type precisely, no subclasses + * `nilValue`, `notNilValue` - match `nil`, or not `nil` + * `sameInstance` - match same object + * `throwsException` - match block that throws an exception + * HCArgumentCaptor - match anything, capturing all values + +* Number + + * `closeTo` - match number close to a given value + * `greaterThan`, `greaterThanOrEqualTo`, `lessThan`, + `lessThanOrEqualTo` - match numeric ordering + * `isFalse` - match zero + * `isTrue` - match non-zero + +* Text + + * `containsSubstring` - match part of a string + * `endsWith` - match the end of a string + * `equalToIgnoringCase` - match the complete string but ignore case + * `equalToIgnoringWhitespace` - match the complete string but ignore extra + whitespace + * `startsWith` - match the beginning of a string + * `stringContainsInOrder`, `stringContainsInOrderIn` - match parts of a string, in relative order + +* Logical + + * `allOf`, `allOfIn` - "and" together all matchers + * `anyOf`, `anyOfIn` - "or" together all matchers + * `anything` - match anything (useful in composite matchers when you don't + care about a particular value) + * `isNot` - negate the matcher + +* Collection + + * `contains`, `containsIn` - exactly match the entire collection + * `containsInAnyOrder`, `containsInAnyOrderIn` - match the entire collection, but in any order + * `containsInRelativeOrder`, `containsInRelativeOrderIn` - match collection containing items in relative order + * `everyItem` - match if every item in a collection satisfies a given matcher + * `hasCount` - match number of elements against another matcher + * `hasCountOf` - match collection with given number of elements + * `hasEntries` - match dictionary with key-value pairs in a dictionary + * `hasEntriesIn` - match dictionary with key-value pairs in a list + * `hasEntry` - match dictionary containing a key-value pair + * `hasItem` - match if given item appears in the collection + * `hasItems`, `hasItemsIn` - match if all given items appear in the collection, in any order + * `hasKey` - match dictionary with a key + * `hasValue` - match dictionary with a value + * `isEmpty` - match empty collection + * `isIn` - match when object is in given collection + * `onlyContains`, `onlyContainsIn` - match if collection's items appear in given list + +* Decorator + + * `describedAs` - give the matcher a custom failure description + * `is` - decorator to improve readability - see "Syntactic sugar" below + +The arguments for many of these matchers accept not just a matching value, but +another matcher, so matchers can be composed for greater flexibility. For +example, `only_contains(endsWith(@"."))` will match any collection where every +item is a string ending with period. + + +Syntactic sugar +--------------- + +OCHamcrest strives to make your tests as readable as possible. For example, the `is` matcher is a +wrapper that doesn't add any extra behavior to the underlying matcher. The following assertions are +all equivalent: + +```obj-c +assertThat(theBiscuit, equalTo(myBiscuit)); +assertThat(theBiscuit, is(equalTo(myBiscuit))); +assertThat(theBiscuit, is(myBiscuit)); +``` + +The last form is allowed since `is` wraps non-matcher arguments with `equalTo`. Other matchers that +take matchers as arguments provide similar shortcuts, wrapping non-matcher arguments in `equalTo`. + + +How can I assert on an asynchronous call? +----------------------------------------- + +`assertWithTimeout` will keep evaluating an expression until the matcher is satisfied or a timeout +is reached. For example, + +```obj-c +assertWithTimeout(5, thatEventually(self.someString), is(@"expected")); +``` + +This repeatedly checks for this string to evaluate to "expected" before timing out after 5 seconds. +`thatEventually` is a convenience macro to create a block. + + +Writing custom matchers +----------------------- + +OCHamcrest comes bundled with lots of useful matchers, but you'll probably find that you need to +create your own from time to time to fit your testing needs. See the +["Writing Custom Matchers" guide for more information](https://github.com/hamcrest/OCHamcrest/wiki/Writing-Custom-Matchers). + + +What about Swift? +----------------- + +Try the [native Swift implementation of Hamcrest](https://github.com/nschum/SwiftHamcrest). + + +How do I add OCHamcrest to my project? +-------------------------------------- + +The Examples folder shows projects using OCHamcrest either through CocoaPods or through the prebuilt +frameworks, for iOS and macOS development. + +### CocoaPods + +If you want to add OCHamcrest using Cocoapods then add the following dependency to your Podfile. +Most people will want OCHamcrest in their test targets, and not include any pods from their main +targets: + +```ruby +target 'MyTests' do + inherit! :search_paths + use_frameworks! + pod 'OCHamcrest', '~> 7.0' +end +``` + +Use the following import: + + @import OCHamcrest; + +### Carthage + +Add the following to your Cartfile: + + github "hamcrest/OCHamcrest" ~> 7.0 + +Then drag the the built framework from the appropriate Carthage/Build directory into your project, +but with "Copy items into destination group's folder" disabled. + +### Prebuilt Frameworks + +Prebuilt binaries are available on [GitHub](https://github.com/hamcrest/OCHamcrest/releases/). The +binaries are packaged as frameworks: + +* __OCHamcrestIOS.framework__ for iOS development +* __OCHamcrest.framework__ for macOS development + +Drag the appropriate framework into your project, specifying "Copy items into destination group's +folder". Then specify `-ObjC` in your "Other Linker Flags". + +#### iOS Development: + +Use the following import: + + @import OCHamcrestIOS; + +#### macOS Development: + +Add a "Copy Files" build phase to copy OCHamcrest.framework to your Products Directory. + +Use the following import: + + @import OCHamcrest; + +### Build Your Own + +If you want to build OCHamcrest yourself, clone the repo, then + +```sh +$ cd Source +$ ./MakeDistribution.sh +``` diff --git a/Pods/OCHamcrest/Source/Core/HCAssertThat.h b/Pods/OCHamcrest/Source/Core/HCAssertThat.h new file mode 100644 index 0000000..138f80f --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCAssertThat.h @@ -0,0 +1,96 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + +@protocol HCMatcher; + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @header + * Assertion macros for using matchers in testing frameworks. + * Unmet assertions are reported to the HCTestFailureReporterChain. + */ + + +FOUNDATION_EXPORT void HC_assertThatWithLocation(id testCase, _Nullable id actual, id matcher, + const char *fileName, int lineNumber); + +#define HC_assertThat(actual, matcher) \ + HC_assertThatWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThat(actual, matcher) - + * Asserts that actual value satisfies matcher. + * @param actual The object to evaluate as the actual value. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion assertThat passes the actual value to the matcher for evaluation. If the matcher is + * not satisfied, it is reported to the HCTestFailureReporterChain. + * + * Use assertThat in test case methods. It's designed to integrate with XCTest and other testing + * frameworks where individual tests are executed as methods. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThat instead. + */ +#define assertThat(actual, matcher) HC_assertThat(actual, matcher) +#endif + + +typedef _Nonnull id (^HCFutureValue)(void); + +FOUNDATION_EXPORT void HC_assertWithTimeoutAndLocation(id testCase, NSTimeInterval timeout, + HCFutureValue actualBlock, id matcher, + const char *fileName, int lineNumber); + +#define HC_assertWithTimeout(timeout, actualBlock, matcher) \ + HC_assertWithTimeoutAndLocation(self, timeout, actualBlock, matcher, __FILE__, __LINE__) + +#define HC_thatEventually(actual) ^{ return actual; } + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertWithTimeout(timeout, actualBlock, matcher) - + * Asserts that a value provided by a block will satisfy matcher within the specified time. + * @param timeout Maximum time to wait for passing behavior, specified in seconds. + * @param actualBlock A block providing the object to repeatedly evaluate as the actual value. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion assertWithTimeout polls a value provided by a block to asynchronously + * satisfy the matcher. The block is evaluated repeatedly for an actual value, which is passed to + * the matcher for evaluation. If the matcher is not satisfied within the timeout, it is reported to + * the HCTestFailureReporterChain. + * + * An easy way of providing the actualBlock is to use the macro thatEventually. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertWithTimeout instead. +*/ +#define assertWithTimeout(timeout, actualBlock, matcher) HC_assertWithTimeout(timeout, actualBlock, matcher) + + +/*! + * @abstract thatEventually(actual) - + * Evaluates actual value at future time. + * @param actual The object to evaluate as the actual value. + * @discussion Wraps actual in a block so that it can be repeatedly evaluated by + * assertWithTimeout. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_thatEventually instead. + */ +#define thatEventually(actual) HC_thatEventually(actual) +#endif + + +/*! + * @abstract "Expected , but " + * @discussion Helper function to let you describe mismatches the way assertThat does. + */ +FOUNDATION_EXPORT NSString *HCDescribeMismatch(id matcher, id actual); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/HCAssertThat.m b/Pods/OCHamcrest/Source/Core/HCAssertThat.m new file mode 100644 index 0000000..84810ed --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCAssertThat.m @@ -0,0 +1,58 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCAssertThat.h" + +#import "HCRunloopRunner.h" +#import "HCStringDescription.h" +#import "HCMatcher.h" +#import "HCTestFailure.h" +#import "HCTestFailureReporter.h" +#import "HCTestFailureReporterChain.h" + +static void reportMismatch(id testCase, id actual, id matcher, + char const *fileName, int lineNumber) +{ + HCTestFailure *failure = [[HCTestFailure alloc] initWithTestCase:testCase + fileName:[NSString stringWithUTF8String:fileName] + lineNumber:(NSUInteger)lineNumber + reason:HCDescribeMismatch(matcher, actual)]; + HCTestFailureReporter *chain = [HCTestFailureReporterChain reporterChain]; + [chain handleFailure:failure]; +} + +void HC_assertThatWithLocation(id testCase, _Nullable id actual, id matcher, + const char *fileName, int lineNumber) +{ + if (![matcher matches:actual]) + reportMismatch(testCase, actual, matcher, fileName, lineNumber); +} + +void HC_assertWithTimeoutAndLocation(id testCase, NSTimeInterval timeout, + HCFutureValue actualBlock, id matcher, + const char *fileName, int lineNumber) +{ + __block BOOL match = [matcher matches:actualBlock()]; + + if (!match) + { + HCRunloopRunner *runner = [[HCRunloopRunner alloc] initWithFulfillmentBlock:^{ + match = [matcher matches:actualBlock()]; + return match; + }]; + [runner runUntilFulfilledOrTimeout:timeout]; + } + + if (!match) + reportMismatch(testCase, actualBlock(), matcher, fileName, lineNumber); +} + +NSString *HCDescribeMismatch(id matcher, id actual) +{ + HCStringDescription *description = [HCStringDescription stringDescription]; + [[[description appendText:@"Expected "] + appendDescriptionOf:matcher] + appendText:@", but "]; + [matcher describeMismatchOf:actual to:description]; + return description.description; +} diff --git a/Pods/OCHamcrest/Source/Core/HCBaseDescription.h b/Pods/OCHamcrest/Source/Core/HCBaseDescription.h new file mode 100644 index 0000000..68e4bd1 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCBaseDescription.h @@ -0,0 +1,29 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Base class for all HCDescription implementations. + */ +@interface HCBaseDescription : NSObject +@end + + +/*! + * @abstract Methods that must be provided by subclasses of HCBaseDescription. + */ +@interface HCBaseDescription (SubclassResponsibility) + +/*! + * @abstract Appends the specified string to the description. + */ +- (void)append:(NSString *)str; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/HCBaseDescription.m b/Pods/OCHamcrest/Source/Core/HCBaseDescription.m new file mode 100644 index 0000000..bd0259f --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCBaseDescription.m @@ -0,0 +1,101 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCBaseDescription.h" + +#import "HCMatcher.h" + + +@implementation HCBaseDescription + +- (id )appendText:(NSString *)text +{ + [self append:text]; + return self; +} + +- (id )appendDescriptionOf:(nullable id)value +{ + if (value == nil) + [self append:@"nil"]; + else if ([value conformsToProtocol:@protocol(HCSelfDescribing)]) + [value describeTo:self]; + else if ([value respondsToSelector:@selector(isKindOfClass:)] && [value isKindOfClass:[NSString class]]) + [self toCSyntaxString:value]; + else + [self appendObjectDescriptionOf:value]; + + return self; +} + +- (id )appendObjectDescriptionOf:(id)value +{ + NSString *description = [value description]; + NSUInteger descriptionLength = description.length; + if (descriptionLength == 0) + [self append:[NSString stringWithFormat:@"<%@: %p>", NSStringFromClass([value class]), (__bridge void *)value]]; + else if ([description characterAtIndex:0] == '<' + && [description characterAtIndex:descriptionLength - 1] == '>') + { + [self append:description]; + } + else + { + [self append:@"<"]; + [self append:description]; + [self append:@">"]; + } + return self; +} + +- (id )appendList:(NSArray *)values + start:(NSString *)start + separator:(NSString *)separator + end:(NSString *)end +{ + BOOL separate = NO; + + [self append:start]; + for (id item in values) + { + if (separate) + [self append:separator]; + [self appendDescriptionOf:item]; + separate = YES; + } + [self append:end]; + return self; +} + +- (void)toCSyntaxString:(NSString *)unformatted +{ + [self append:@"\""]; + NSUInteger length = unformatted.length; + for (NSUInteger index = 0; index < length; ++index) + [self toCSyntax:[unformatted characterAtIndex:index]]; + [self append:@"\""]; +} + +- (void)toCSyntax:(unichar)ch +{ + switch (ch) + { + case '"': + [self append:@"\\\""]; + break; + case '\n': + [self append:@"\\n"]; + break; + case '\r': + [self append:@"\\r"]; + break; + case '\t': + [self append:@"\\t"]; + break; + default: + [self append:[NSString stringWithCharacters:&ch length:1]]; + break; + } +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/HCBaseMatcher.h b/Pods/OCHamcrest/Source/Core/HCBaseMatcher.h new file mode 100644 index 0000000..18405bb --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCBaseMatcher.h @@ -0,0 +1,25 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import +#import + +#define HC_ABSTRACT_METHOD [self subclassResponsibility:_cmd] + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Base class for all HCMatcher implementations. + * @discussion Simple matchers can just subclass HCBaseMatcher and implement -matches: + * and -describeTo:. But if the matching algorithm has several "no match" paths, + * consider subclassing HCDiagnosingMatcher instead. + */ +@interface HCBaseMatcher : NSObject + +/*! @abstract Raises exception that command (a pseudo-abstract method) is not implemented. */ +- (void)subclassResponsibility:(SEL)command; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/HCBaseMatcher.m b/Pods/OCHamcrest/Source/Core/HCBaseMatcher.m new file mode 100644 index 0000000..6f7cd02 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCBaseMatcher.m @@ -0,0 +1,52 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCBaseMatcher.h" + +#import "HCStringDescription.h" + + +@implementation HCBaseMatcher + +- (NSString *)description +{ + return [HCStringDescription stringFrom:self]; +} + +- (BOOL)matches:(nullable id)item +{ + HC_ABSTRACT_METHOD; + return NO; +} + +- (BOOL)matches:(nullable id)item describingMismatchTo:(id )mismatchDescription +{ + BOOL matchResult = [self matches:item]; + if (!matchResult) + [self describeMismatchOf:item to:mismatchDescription]; + return matchResult; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + [[mismatchDescription appendText:@"was "] appendDescriptionOf:item]; +} + +- (void)describeTo:(id )description +{ + HC_ABSTRACT_METHOD; +} + +- (void)subclassResponsibility:(SEL)command +{ + NSString *className = NSStringFromClass([self class]); + [NSException raise:NSGenericException + format:@"-[%@ %@] not implemented", className, NSStringFromSelector(command)]; +} + +- (id)copyWithZone:(NSZone *)zone +{ + return self; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/HCDescription.h b/Pods/OCHamcrest/Source/Core/HCDescription.h new file mode 100644 index 0000000..bf196c0 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCDescription.h @@ -0,0 +1,39 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract A description of an HCMatcher. + * @discussion An HCMatcher will describe itself to a description which can later be used for reporting. + */ +@protocol HCDescription + +/*! + * @abstract Appends some plain text to the description. + * @return self, for chaining. + */ +- (id )appendText:(NSString *)text; + +/*! + * @abstract Appends description of specified value to description. + * @discussion If the value implements the HCSelfDescribing protocol, then it will be used. + * @return self, for chaining. + */ +- (id )appendDescriptionOf:(nullable id)value; + +/*! + * @abstract Appends a list of objects to the description. + * @return self, for chaining. + */ +- (id )appendList:(NSArray *)values + start:(NSString *)start + separator:(NSString *)separator + end:(NSString *)end; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/HCDiagnosingMatcher.h b/Pods/OCHamcrest/Source/Core/HCDiagnosingMatcher.h new file mode 100644 index 0000000..2366cf2 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCDiagnosingMatcher.h @@ -0,0 +1,19 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Base class for matchers that generate mismatch descriptions during the matching. + * @discussion Some matching algorithms have several "no match" paths. It helps to make the mismatch + * description as precise as possible, but we don't want to have to repeat the matching logic to do + * so. For such matchers, subclass HCDiagnosingMatcher and implement HCMatcher's + * -matches:describingMismatchTo:. +*/ +@interface HCDiagnosingMatcher : HCBaseMatcher +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/HCDiagnosingMatcher.m b/Pods/OCHamcrest/Source/Core/HCDiagnosingMatcher.m new file mode 100644 index 0000000..70e426c --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCDiagnosingMatcher.m @@ -0,0 +1,25 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCDiagnosingMatcher.h" + + +@implementation HCDiagnosingMatcher + +- (BOOL)matches:(nullable id)item +{ + return [self matches:item describingMismatchTo:nil]; +} + +- (BOOL)matches:(nullable id)item describingMismatchTo:(id )mismatchDescription +{ + HC_ABSTRACT_METHOD; + return NO; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + [self matches:item describingMismatchTo:mismatchDescription]; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/HCMatcher.h b/Pods/OCHamcrest/Source/Core/HCMatcher.h new file mode 100644 index 0000000..19f641a --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCMatcher.h @@ -0,0 +1,47 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract A matcher over acceptable values. + * @discussion A matcher is able to describe itself to give feedback when it fails. + * + * HCMatcher implementations should not directly implement this protocol. Instead, extend the + * HCBaseMatcher class, which will ensure that the HCMatcher API can grow to support new features + * and remain compatible with all HCMatcher implementations. + */ +@protocol HCMatcher + +/*! + * @abstract Evaluates the matcher for argument item. + * @param item The object against which the matcher is evaluated. + * @return YES if item matches, otherwise NO. + */ +- (BOOL)matches:(nullable id)item; + +/*! + * @abstract Evaluates the matcher for argument item. + * @param item The object against which the matcher is evaluated. + * @param mismatchDescription The description to be built or appended to if item does not match. + * @return YES if item matches, otherwise NO. + */ +- (BOOL)matches:(nullable id)item describingMismatchTo:(nullable id )mismatchDescription; + +/*! + * @abstract Generates a description of why the matcher has not accepted the item. + * @param item The item that the HCMatcher has rejected. + * @param mismatchDescription The description to be built or appended to. + * @discussion The description will be part of a larger description of why a matching failed, so it + * should be concise. + * + * This method assumes that matches:item is false, but will not check this. + */ +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/HCSelfDescribing.h b/Pods/OCHamcrest/Source/Core/HCSelfDescribing.h new file mode 100644 index 0000000..e454348 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCSelfDescribing.h @@ -0,0 +1,26 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + +#import // Convenience header + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract The ability of an object to describe itself. + */ +@protocol HCSelfDescribing + +/*! + * @abstract Generates a description of the object. + * @param description The description to be built or appended to. + * @discussion The description may be part of a description of a larger object of which this is just + * a component, so it should be worded appropriately. + */ +- (void)describeTo:(id )description; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/HCStringDescription.h b/Pods/OCHamcrest/Source/Core/HCStringDescription.h new file mode 100644 index 0000000..5603b9f --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCStringDescription.h @@ -0,0 +1,36 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + +@protocol HCSelfDescribing; + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract An HCDescription that is stored as a string. + */ +@interface HCStringDescription : HCBaseDescription + + +/*! + * @abstract Returns the description of an HCSelfDescribing object as a string. + * @param selfDescribing The object to be described. + * @return The description of the object. + */ ++ (NSString *)stringFrom:(id )selfDescribing; + +/*! + * @abstract Creates and returns an empty description. + */ ++ (instancetype)stringDescription; + +/*! + * @abstract Initializes a newly allocated HCStringDescription that is initially empty. + */ +- (instancetype)init NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/HCStringDescription.m b/Pods/OCHamcrest/Source/Core/HCStringDescription.m new file mode 100644 index 0000000..a44e53c --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/HCStringDescription.m @@ -0,0 +1,45 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCStringDescription.h" + +#import "HCSelfDescribing.h" + + +@interface HCStringDescription () +@property (nonatomic, strong) NSMutableString *accumulator; +@end + +@implementation HCStringDescription + ++ (NSString *)stringFrom:(id )selfDescribing +{ + HCStringDescription *description = [HCStringDescription stringDescription]; + [description appendDescriptionOf:selfDescribing]; + return description.description; +} + ++ (instancetype)stringDescription +{ + return [[HCStringDescription alloc] init]; +} + +- (instancetype)init +{ + self = [super init]; + if (self) + _accumulator = [[NSMutableString alloc] init]; + return self; +} + +- (NSString *)description +{ + return self.accumulator; +} + +- (void)append:(NSString *)str +{ + [self.accumulator appendString:str]; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/HCCollect.h b/Pods/OCHamcrest/Source/Core/Helpers/HCCollect.h new file mode 100644 index 0000000..050c71f --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/HCCollect.h @@ -0,0 +1,26 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + +#import + +@protocol HCMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Returns an array of values from a variable-length comma-separated list terminated + * by nil. + */ +FOUNDATION_EXPORT NSArray * HCCollectItems(id item, va_list args); + +/*! + * @abstract Returns an array of matchers from a mixed array of items and matchers. + * @discussion Each item is wrapped in HCWrapInMatcher to transform non-matcher items into equality + * matchers. + */ +FOUNDATION_EXPORT NSArray> * HCWrapIntoMatchers(NSArray *items); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/HCCollect.m b/Pods/OCHamcrest/Source/Core/Helpers/HCCollect.m new file mode 100644 index 0000000..3ec9ae4 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/HCCollect.m @@ -0,0 +1,43 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCCollect.h" + +#import "HCWrapInMatcher.h" + +/*! + * @abstract Returns an array of wrapped items from a variable-length comma-separated list + * terminated by nil. + * @discussion Each item is transformed by passing it to the specified wrap function. + */ +static NSArray * HCCollectWrappedItems(id item, va_list args, id (*wrap)(id)) +{ + NSMutableArray *list = [NSMutableArray arrayWithObject:wrap(item)]; + + id nextItem = va_arg(args, id); + while (nextItem) + { + [list addObject:wrap(nextItem)]; + nextItem = va_arg(args, id); + } + + return list; +} + +static id passThrough(id value) +{ + return value; +} + +NSArray * HCCollectItems(id item, va_list args) +{ + return HCCollectWrappedItems(item, args, passThrough); +} + +NSArray> * HCWrapIntoMatchers(NSArray *items) +{ + NSMutableArray> *matchers = [[NSMutableArray alloc] init]; + for (id item in items) + [matchers addObject:HCWrapInMatcher(item)]; + return matchers; +} diff --git a/Pods/OCHamcrest/Source/Core/Helpers/HCInvocationMatcher.h b/Pods/OCHamcrest/Source/Core/Helpers/HCInvocationMatcher.h new file mode 100644 index 0000000..5ad382c --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/HCInvocationMatcher.h @@ -0,0 +1,42 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Supporting class for matching a feature of an object. + * @discussion Tests whether the result of passing the specified invocation to the value satisfies + * the specified matcher. + */ +@interface HCInvocationMatcher : HCBaseMatcher + + +/*! + * @abstract Determines whether a mismatch will be described in short form. + * @discussion Default is long form, which describes the object, the name of the invocation, and the + * sub-matcher's mismatch diagnosis. Short form only has the sub-matcher's mismatch diagnosis. + */ +@property (nonatomic, assign) BOOL shortMismatchDescription; + +/*! + * @abstract Initializes a newly allocated HCInvocationMatcher with an invocation and a matcher. + */ +- (instancetype)initWithInvocation:(NSInvocation *)anInvocation matching:(id )aMatcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +/*! + * @abstract Invokes stored invocation on the specified item and returns the result. + */ +- (id)invokeOn:(id)item; + +/*! + * @abstract Returns string representation of the invocation's selector. + */ +- (NSString *)stringFromSelector; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/HCInvocationMatcher.m b/Pods/OCHamcrest/Source/Core/Helpers/HCInvocationMatcher.m new file mode 100644 index 0000000..bf48ed1 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/HCInvocationMatcher.m @@ -0,0 +1,81 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCInvocationMatcher.h" + + +@interface HCInvocationMatcher () +@property (nonatomic, strong) NSInvocation *invocation; +@property (nonatomic, strong) id subMatcher; +@end + +@implementation HCInvocationMatcher + +- (instancetype)initWithInvocation:(NSInvocation *)anInvocation matching:(id )aMatcher +{ + self = [super init]; + if (self) + { + _invocation = anInvocation; + _subMatcher = aMatcher; + } + return self; +} + +- (BOOL)matches:(nullable id)item +{ + if ([self invocationNotSupportedForItem:item]) + return NO; + + return [self.subMatcher matches:[self invokeOn:item]]; +} + +- (BOOL)invocationNotSupportedForItem:(id)item +{ + return ![item respondsToSelector:self.invocation.selector]; +} + +- (id)invokeOn:(id)item +{ + __unsafe_unretained id result = nil; + [self.invocation invokeWithTarget:item]; + [self.invocation getReturnValue:&result]; + return result; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + if ([self invocationNotSupportedForItem:item]) + [super describeMismatchOf:item to:mismatchDescription]; + else + { + [self describeLongMismatchDescriptionOf:item to:mismatchDescription]; + [self.subMatcher describeMismatchOf:[self invokeOn:item] to:mismatchDescription]; + } +} + +- (void)describeLongMismatchDescriptionOf:(id)item to:(id )mismatchDescription +{ + if (!self.shortMismatchDescription) + { + [[[[mismatchDescription appendDescriptionOf:item] + appendText:@" "] + appendText:[self stringFromSelector]] + appendText:@" "]; + } +} + +- (void)describeTo:(id )description +{ + [[[[description appendText:@"an object with "] + appendText:[self stringFromSelector]] + appendText:@" "] + appendDescriptionOf:self.subMatcher]; +} + +- (NSString *)stringFromSelector +{ + return NSStringFromSelector(self.invocation.selector); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/HCRequireNonNilObject.h b/Pods/OCHamcrest/Source/Core/Helpers/HCRequireNonNilObject.h new file mode 100644 index 0000000..aff90de --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/HCRequireNonNilObject.h @@ -0,0 +1,14 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Throws an NSException if obj is nil. +*/ +FOUNDATION_EXPORT void HCRequireNonNilObject(id obj); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/HCRequireNonNilObject.m b/Pods/OCHamcrest/Source/Core/Helpers/HCRequireNonNilObject.m new file mode 100644 index 0000000..8ae3932 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/HCRequireNonNilObject.m @@ -0,0 +1,15 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCRequireNonNilObject.h" + + +void HCRequireNonNilObject(id obj) +{ + if (obj == nil) + { + @throw [NSException exceptionWithName:@"NilObject" + reason:@"Must be non-nil object" + userInfo:nil]; + } +} diff --git a/Pods/OCHamcrest/Source/Core/Helpers/HCRunloopRunner.h b/Pods/OCHamcrest/Source/Core/Helpers/HCRunloopRunner.h new file mode 100644 index 0000000..9eefe57 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/HCRunloopRunner.h @@ -0,0 +1,21 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Runs runloop until fulfilled, or timeout is reached. + * @discussion Based on http://bou.io/CTTRunLoopRunUntil.html + */ +@interface HCRunloopRunner : NSObject + +- (instancetype)initWithFulfillmentBlock:(BOOL (^)(void))fulfillmentBlock NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; +- (void)runUntilFulfilledOrTimeout:(CFTimeInterval)timeout; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/HCRunloopRunner.m b/Pods/OCHamcrest/Source/Core/Helpers/HCRunloopRunner.m new file mode 100644 index 0000000..fd4e25d --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/HCRunloopRunner.m @@ -0,0 +1,36 @@ +#import "HCRunloopRunner.h" + + +@implementation HCRunloopRunner +{ + CFRunLoopObserverRef _observer; +} + +- (instancetype)initWithFulfillmentBlock:(BOOL (^)(void))fulfillmentBlock +{ + self = [super init]; + if (self) + { + _observer = CFRunLoopObserverCreateWithHandler(NULL, kCFRunLoopBeforeWaiting, YES, 0, ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) { + if (fulfillmentBlock()) + CFRunLoopStop(CFRunLoopGetCurrent()); + else + CFRunLoopWakeUp(CFRunLoopGetCurrent()); + }); + CFRunLoopAddObserver(CFRunLoopGetCurrent(), _observer, kCFRunLoopDefaultMode); + } + return self; +} + +- (void)dealloc +{ + CFRunLoopRemoveObserver(CFRunLoopGetCurrent(), _observer, kCFRunLoopDefaultMode); + CFRelease(_observer); +} + +- (void)runUntilFulfilledOrTimeout:(CFTimeInterval)timeout +{ + CFRunLoopRunInMode(kCFRunLoopDefaultMode, timeout, false); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/HCWrapInMatcher.h b/Pods/OCHamcrest/Source/Core/Helpers/HCWrapInMatcher.h new file mode 100644 index 0000000..b59dfbe --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/HCWrapInMatcher.h @@ -0,0 +1,17 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + +@protocol HCMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Wraps argument in a matcher, if necessary. + * @return The argument as-is if it is already a matcher, otherwise wrapped in an equalTo matcher. + */ +FOUNDATION_EXPORT _Nullable id HCWrapInMatcher(_Nullable id matcherOrValue); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/HCWrapInMatcher.m b/Pods/OCHamcrest/Source/Core/Helpers/HCWrapInMatcher.m new file mode 100644 index 0000000..8d44d4c --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/HCWrapInMatcher.m @@ -0,0 +1,17 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCWrapInMatcher.h" + +#import "HCIsEqual.h" + + +_Nullable id HCWrapInMatcher(_Nullable id matcherOrValue) +{ + if (!matcherOrValue) + return nil; + + if ([matcherOrValue conformsToProtocol:@protocol(HCMatcher)]) + return matcherOrValue; + return HC_equalTo(matcherOrValue); +} diff --git a/Pods/OCHamcrest/Source/Core/Helpers/NSInvocation+OCHamcrest.h b/Pods/OCHamcrest/Source/Core/Helpers/NSInvocation+OCHamcrest.h new file mode 100644 index 0000000..0dcc461 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/NSInvocation+OCHamcrest.h @@ -0,0 +1,17 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +@interface NSInvocation (OCHamcrest) + ++ (NSInvocation *)och_invocationWithTarget:(id)target selector:(SEL)selector; ++ (NSInvocation *)och_invocationOnObjectOfType:(Class)aClass selector:(SEL)selector; +- (id)och_invoke; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/NSInvocation+OCHamcrest.m b/Pods/OCHamcrest/Source/Core/Helpers/NSInvocation+OCHamcrest.m new file mode 100644 index 0000000..aff8eda --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/NSInvocation+OCHamcrest.m @@ -0,0 +1,45 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "NSInvocation+OCHamcrest.h" + +#import "HCReturnValueGetter.h" +#import "HCReturnTypeHandlerChain.h" + + +@implementation NSInvocation (OCHamcrest) + ++ (NSInvocation *)och_invocationWithTarget:(id)target selector:(SEL)selector +{ + NSMethodSignature *signature = [target methodSignatureForSelector:selector]; + NSInvocation *invocation= [self och_invocationWithSignature:signature selector:selector]; + invocation.target = target; + return invocation; +} + ++ (NSInvocation *)och_invocationOnObjectOfType:(Class)aClass selector:(SEL)selector +{ + NSMethodSignature *signature = [aClass instanceMethodSignatureForSelector:selector]; + return [self och_invocationWithSignature:signature selector:selector]; +} + ++ (NSInvocation *)och_invocationWithSignature:(NSMethodSignature *)signature selector:(SEL)selector +{ + NSInvocation *invocation = [[self class] invocationWithMethodSignature:signature]; + invocation.selector = selector; + return invocation; +} + +- (id)och_invoke +{ + [self invoke]; + return [self och_returnValue]; +} + +- (id)och_returnValue +{ + char const *returnType = self.methodSignature.methodReturnType; + return [HCReturnValueGetterChain() returnValueOfType:returnType fromInvocation:self]; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.h new file mode 100644 index 0000000..c75af44 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCBoolReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.m new file mode 100644 index 0000000..a1291df --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCBoolReturnGetter.h" + + +@implementation HCBoolReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(BOOL) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + BOOL value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.h new file mode 100644 index 0000000..f80e7db --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCCharReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.m new file mode 100644 index 0000000..cf92850 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCCharReturnGetter.h" + + +@implementation HCCharReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(char) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + char value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.h new file mode 100644 index 0000000..0016a59 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCDoubleReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.m new file mode 100644 index 0000000..2619ad0 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCDoubleReturnGetter.h" + + +@implementation HCDoubleReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(double) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + double value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.h new file mode 100644 index 0000000..d52d0e0 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCFloatReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.m new file mode 100644 index 0000000..18d2bfb --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCFloatReturnGetter.h" + + +@implementation HCFloatReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(float) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + float value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.h new file mode 100644 index 0000000..323f686 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCIntReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.m new file mode 100644 index 0000000..91624a4 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIntReturnGetter.h" + + +@implementation HCIntReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(int) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + int value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.h new file mode 100644 index 0000000..710ac5c --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCLongLongReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.m new file mode 100644 index 0000000..ec6d974 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCLongLongReturnGetter.h" + + +@implementation HCLongLongReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(long long) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + long long value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.h new file mode 100644 index 0000000..33a57a3 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCLongReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.m new file mode 100644 index 0000000..ff74f44 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCLongReturnGetter.h" + + +@implementation HCLongReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(long) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + long value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.h new file mode 100644 index 0000000..a8308ee --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCObjectReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.m new file mode 100644 index 0000000..a99c3a2 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCObjectReturnGetter.h" + + +@implementation HCObjectReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(id) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + __unsafe_unretained id value; + [invocation getReturnValue:&value]; + return value; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.h new file mode 100644 index 0000000..0867768 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.h @@ -0,0 +1,12 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + +@class HCReturnValueGetter; + + +/*! + * @abstract Returns chain of return type handlers. + */ +FOUNDATION_EXPORT HCReturnValueGetter *HCReturnValueGetterChain(void); diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.m new file mode 100644 index 0000000..d3567d0 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.m @@ -0,0 +1,44 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnTypeHandlerChain.h" + +#import "HCObjectReturnGetter.h" +#import "HCCharReturnGetter.h" +#import "HCBoolReturnGetter.h" +#import "HCIntReturnGetter.h" +#import "HCShortReturnGetter.h" +#import "HCLongReturnGetter.h" +#import "HCLongLongReturnGetter.h" +#import "HCUnsignedCharReturnGetter.h" +#import "HCUnsignedIntReturnGetter.h" +#import "HCUnsignedShortReturnGetter.h" +#import "HCUnsignedLongReturnGetter.h" +#import "HCUnsignedLongLongReturnGetter.h" +#import "HCFloatReturnGetter.h" +#import "HCDoubleReturnGetter.h" + + +HCReturnValueGetter *HCReturnValueGetterChain(void) +{ + static HCReturnValueGetter *chain = nil; + if (!chain) + { + HCReturnValueGetter *doubleHandler = [[HCDoubleReturnGetter alloc] initWithSuccessor:nil]; + HCReturnValueGetter *floatHandler = [[HCFloatReturnGetter alloc] initWithSuccessor:doubleHandler]; + HCReturnValueGetter *uLongLongHandler = [[HCUnsignedLongLongReturnGetter alloc] initWithSuccessor:floatHandler]; + HCReturnValueGetter *uLongHandler = [[HCUnsignedLongReturnGetter alloc] initWithSuccessor:uLongLongHandler]; + HCReturnValueGetter *uShortHandler = [[HCUnsignedShortReturnGetter alloc] initWithSuccessor:uLongHandler]; + HCReturnValueGetter *uIntHandler = [[HCUnsignedIntReturnGetter alloc] initWithSuccessor:uShortHandler]; + HCReturnValueGetter *uCharHandler = [[HCUnsignedCharReturnGetter alloc] initWithSuccessor:uIntHandler]; + HCReturnValueGetter *longLongHandler = [[HCLongLongReturnGetter alloc] initWithSuccessor:uCharHandler]; + HCReturnValueGetter *longHandler = [[HCLongReturnGetter alloc] initWithSuccessor:longLongHandler]; + HCReturnValueGetter *shortHandler = [[HCShortReturnGetter alloc] initWithSuccessor:longHandler]; + HCReturnValueGetter *intHandler = [[HCIntReturnGetter alloc] initWithSuccessor:shortHandler]; + HCReturnValueGetter *boolHandler = [[HCBoolReturnGetter alloc] initWithSuccessor:intHandler]; + HCReturnValueGetter *charHandler = [[HCCharReturnGetter alloc] initWithSuccessor:boolHandler]; + HCReturnValueGetter *objectHandler = [[HCObjectReturnGetter alloc] initWithSuccessor:charHandler]; + chain = objectHandler; + } + return chain; +} diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.h new file mode 100644 index 0000000..ee319dc --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.h @@ -0,0 +1,20 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Chain-of-responsibility for handling NSInvocation return types. + */ +@interface HCReturnValueGetter : NSObject + +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; +- (id)returnValueOfType:(char const *)type fromInvocation:(NSInvocation *)invocation; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.m new file mode 100644 index 0000000..0e6f089 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.m @@ -0,0 +1,42 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +@interface HCReturnValueGetter (SubclassResponsibility) +- (id)returnValueFromInvocation:(NSInvocation *)invocation; +@end + +@interface HCReturnValueGetter () +@property (nonatomic, assign, readonly) char const *handlerType; +@property (nullable, nonatomic, strong, readonly) HCReturnValueGetter *successor; +@end + +@implementation HCReturnValueGetter + +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor +{ + self = [super init]; + if (self) + { + _handlerType = handlerType; + _successor = successor; + } + return self; +} + +- (BOOL)handlesReturnType:(char const *)returnType +{ + return strcmp(returnType, self.handlerType) == 0; +} + +- (id)returnValueOfType:(char const *)type fromInvocation:(NSInvocation *)invocation +{ + if ([self handlesReturnType:type]) + return [self returnValueFromInvocation:invocation]; + + return [self.successor returnValueOfType:type fromInvocation:invocation]; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.h new file mode 100644 index 0000000..ac517a5 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCShortReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.m new file mode 100644 index 0000000..c9776b4 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCShortReturnGetter.h" + + +@implementation HCShortReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(short) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + short value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.h new file mode 100644 index 0000000..825d097 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCUnsignedCharReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.m new file mode 100644 index 0000000..56a1966 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCUnsignedCharReturnGetter.h" + + +@implementation HCUnsignedCharReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(unsigned char) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + unsigned char value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.h new file mode 100644 index 0000000..e627cdc --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCUnsignedIntReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.m new file mode 100644 index 0000000..1d19315 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCUnsignedIntReturnGetter.h" + + +@implementation HCUnsignedIntReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(unsigned int) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + unsigned int value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.h new file mode 100644 index 0000000..be9d4c8 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCUnsignedLongLongReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.m new file mode 100644 index 0000000..11f0027 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCUnsignedLongLongReturnGetter.h" + + +@implementation HCUnsignedLongLongReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(unsigned long long) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + unsigned long long value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.h new file mode 100644 index 0000000..e06431c --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCUnsignedLongReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.m new file mode 100644 index 0000000..626c79b --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCUnsignedLongReturnGetter.h" + + +@implementation HCUnsignedLongReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(unsigned long) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + unsigned long value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.h b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.h new file mode 100644 index 0000000..820c94f --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.h @@ -0,0 +1,16 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCReturnValueGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCUnsignedShortReturnGetter : HCReturnValueGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable HCReturnValueGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.m b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.m new file mode 100644 index 0000000..552a0ac --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCUnsignedShortReturnGetter.h" + + +@implementation HCUnsignedShortReturnGetter + +- (instancetype)initWithSuccessor:(nullable HCReturnValueGetter *)successor +{ + self = [super initWithType:@encode(unsigned short) successor:successor]; + return self; +} + +- (id)returnValueFromInvocation:(NSInvocation *)invocation +{ + unsigned short value; + [invocation getReturnValue:&value]; + return @(value); +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.h b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.h new file mode 100644 index 0000000..19a7ef4 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.h @@ -0,0 +1,8 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCTestFailureReporter.h" + + +@interface HCGenericTestFailureReporter : HCTestFailureReporter +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.m b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.m new file mode 100644 index 0000000..dc85f09 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.m @@ -0,0 +1,31 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCGenericTestFailureReporter.h" + +#import "HCTestFailure.h" + + +@implementation HCGenericTestFailureReporter + +- (BOOL)willHandleFailure:(HCTestFailure *)failure +{ + return YES; +} + +- (void)executeHandlingOfFailure:(HCTestFailure *)failure +{ + NSException *exception = [self createExceptionForFailure:failure]; + [exception raise]; +} + +- (NSException *)createExceptionForFailure:(HCTestFailure *)failure +{ + NSString *failureReason = [NSString stringWithFormat:@"%@:%lu: matcher error: %@", + failure.fileName, + (unsigned long)failure.lineNumber, + failure.reason]; + return [NSException exceptionWithName:@"HCGenericTestFailure" reason:failureReason userInfo:nil]; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.h b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.h new file mode 100644 index 0000000..61c0b71 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.h @@ -0,0 +1,8 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCTestFailureReporter.h" + + +@interface HCSenTestFailureReporter : HCTestFailureReporter +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.m b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.m new file mode 100644 index 0000000..772a279 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.m @@ -0,0 +1,69 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCSenTestFailureReporter.h" + +#import "HCTestFailure.h" +#import "NSInvocation+OCHamcrest.h" + +@interface NSObject (PretendMethodsExistOnNSObjectToAvoidLinkingSenTestingKit) + ++ (NSException *)failureInFile:(NSString *)filename + atLine:(int)lineNumber + withDescription:(NSString *)formatString, ...; + +- (void)failWithException:(NSException *)exception; + +@end + + +@interface NSInvocation (OCHamcrest_SenTestingKit) +@end + +@implementation NSInvocation (OCHamcrest_SenTestingKit) + ++ (NSInvocation *)och_SenTestFailureInFile:(NSString *)fileName + atLine:(NSUInteger)lineNumber + description:(NSString *)description +{ + // SenTestingKit expects a format string, but NSInvocation does not support varargs. + // Mask % symbols in the string so they aren't treated as placeholders. + NSString *massagedDescription = [description stringByReplacingOccurrencesOfString:@"%" + withString:@"%%"]; + + NSInvocation *invocation = [NSInvocation och_invocationWithTarget:[NSException class] + selector:@selector(failureInFile:atLine:withDescription:)]; + [invocation setArgument:&fileName atIndex:2]; + [invocation setArgument:&lineNumber atIndex:3]; + [invocation setArgument:&massagedDescription atIndex:4]; + return invocation; +} + +@end + + +@implementation HCSenTestFailureReporter + +- (BOOL)willHandleFailure:(HCTestFailure *)failure +{ + return [failure.testCase respondsToSelector:@selector(failWithException:)]; +} + +- (void)executeHandlingOfFailure:(HCTestFailure *)failure +{ + NSException *exception = [self createExceptionForFailure:failure]; + [failure.testCase failWithException:exception]; +} + +- (NSException *)createExceptionForFailure:(HCTestFailure *)failure +{ + NSInvocation *invocation = [NSInvocation och_SenTestFailureInFile:failure.fileName + atLine:failure.lineNumber + description:failure.reason]; + [invocation invoke]; + __unsafe_unretained NSException *result = nil; + [invocation getReturnValue:&result]; + return result; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailure.h b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailure.h new file mode 100644 index 0000000..4ba2faa --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailure.h @@ -0,0 +1,42 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + @abstract Test failure location and reason. + */ +@interface HCTestFailure : NSObject + +/*! + * @abstract Test case used to run test method. + * @discussion Can be nil. + * + * For unmet OCHamcrest assertions, if the assertion was assertThat or + * assertWithTimeout, testCase will be the test case instance. + */ +@property (nonatomic, strong, readonly) id testCase; + +/*! @abstract File name to report. */ +@property (nonatomic, copy, readonly) NSString *fileName; + +/*! @abstract Line number to report. */ +@property (nonatomic, assign, readonly) NSUInteger lineNumber; + +/*! @abstract Failure reason to report. */ +@property (nonatomic, strong, readonly) NSString *reason; + +/*! + * @abstract Initializes a newly allocated instance of a test failure. + */ +- (instancetype)initWithTestCase:(id)testCase + fileName:(NSString *)fileName + lineNumber:(NSUInteger)lineNumber + reason:(NSString *)reason; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailure.m b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailure.m new file mode 100644 index 0000000..236f739 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailure.m @@ -0,0 +1,25 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCTestFailure.h" + + +@implementation HCTestFailure + +- (instancetype)initWithTestCase:(id)testCase + fileName:(NSString *)fileName + lineNumber:(NSUInteger)lineNumber + reason:(NSString *)reason +{ + self = [super init]; + if (self) + { + _testCase = testCase; + _fileName = [fileName copy]; + _lineNumber = lineNumber; + _reason = [reason copy]; + } + return self; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.h b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.h new file mode 100644 index 0000000..b04338a --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.h @@ -0,0 +1,25 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + +@class HCTestFailure; + + +NS_ASSUME_NONNULL_BEGIN + +/*! + Chain-of-responsibility for handling test failures. + */ +@interface HCTestFailureReporter : NSObject + +@property (nullable, nonatomic, strong) HCTestFailureReporter *successor; + +/*! + Handle test failure at specific location, or pass to successor. + */ +- (void)handleFailure:(HCTestFailure *)failure; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.m b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.m new file mode 100644 index 0000000..25737f7 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.m @@ -0,0 +1,22 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCTestFailureReporter.h" + +@interface HCTestFailureReporter (SubclassResponsibility) +- (BOOL)willHandleFailure:(HCTestFailure *)failure; +- (void)executeHandlingOfFailure:(HCTestFailure *)failure; +@end + + +@implementation HCTestFailureReporter + +- (void)handleFailure:(HCTestFailure *)failure +{ + if ([self willHandleFailure:failure]) + [self executeHandlingOfFailure:failure]; + else + [self.successor handleFailure:failure]; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.h b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.h new file mode 100644 index 0000000..a4fc882 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.h @@ -0,0 +1,36 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + +@class HCTestFailureReporter; + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Manage chain-of-responsibility for reporting test failures. + * @discussion This provides a generic way of reporting test failures without knowing about the + * underlying test framework. By default, we try XCTest first, then SenTestingKit. If we run out of + * options, the final catch-all is to throw an NSException describing the test failure. + */ +@interface HCTestFailureReporterChain : NSObject + +/*! + * @abstract Returns current chain of test failure reporters. + */ ++ (HCTestFailureReporter *)reporterChain; + +/*! + * @abstract Adds specified test failure reporter to head of chain-of-responsibility. + */ ++ (void)addReporter:(HCTestFailureReporter *)reporter; + +/*! + * @abstract Resets chain-of-responsibility to default. + */ ++ (void)reset; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.m b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.m new file mode 100644 index 0000000..2a0d65d --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.m @@ -0,0 +1,41 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCTestFailureReporterChain.h" + +#import "HCGenericTestFailureReporter.h" +#import "HCSenTestFailureReporter.h" +#import "HCXCTestFailureReporter.h" + +static HCTestFailureReporter *chainHead = nil; + + +@implementation HCTestFailureReporterChain + ++ (HCTestFailureReporter *)reporterChain +{ + if (!chainHead) + { + HCTestFailureReporter *xctestReporter = [[HCXCTestFailureReporter alloc] init]; + HCTestFailureReporter *ocunitReporter = [[HCSenTestFailureReporter alloc] init]; + HCTestFailureReporter *genericReporter = [[HCGenericTestFailureReporter alloc] init]; + + chainHead = xctestReporter; + xctestReporter.successor = ocunitReporter; + ocunitReporter.successor = genericReporter; + } + return chainHead; +} + ++ (void)addReporter:(HCTestFailureReporter *)reporter +{ + reporter.successor = [self reporterChain]; + chainHead = reporter; +} + ++ (void)reset +{ + chainHead = nil; +} + +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.h b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.h new file mode 100644 index 0000000..c70e687 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.h @@ -0,0 +1,8 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCTestFailureReporter.h" + + +@interface HCXCTestFailureReporter : HCTestFailureReporter +@end diff --git a/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.m b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.m new file mode 100644 index 0000000..2bff825 --- /dev/null +++ b/Pods/OCHamcrest/Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.m @@ -0,0 +1,33 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCXCTestFailureReporter.h" + +#import "HCTestFailure.h" + +@interface NSObject (PretendMethodExistsOnNSObjectToAvoidLinkingXCTest) + +- (void)recordFailureWithDescription:(NSString *)description + inFile:(NSString *)filename + atLine:(NSUInteger)lineNumber + expected:(BOOL)expected; + +@end + + +@implementation HCXCTestFailureReporter + +- (BOOL)willHandleFailure:(HCTestFailure *)failure +{ + return [failure.testCase respondsToSelector:@selector(recordFailureWithDescription:inFile:atLine:expected:)]; +} + +- (void)executeHandlingOfFailure:(HCTestFailure *)failure +{ + [failure.testCase recordFailureWithDescription:failure.reason + inFile:failure.fileName + atLine:failure.lineNumber + expected:YES]; +} + +@end diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCEvery.h b/Pods/OCHamcrest/Source/Library/Collection/HCEvery.h new file mode 100644 index 0000000..92d0af9 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCEvery.h @@ -0,0 +1,45 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if every item in a collection satisfies a nested matcher. + */ +@interface HCEvery : HCDiagnosingMatcher + +@property (nonatomic, strong, readonly) id matcher; + +- (instancetype)initWithMatcher:(id )matcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_everyItem(id itemMatcher); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for collections that matches when the examined collection's items are + * all matched by the specified matcher. + * @param itemMatcher The matcher to apply to every item provided by the examined collection. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing a single pass. + * + * Example
+ *
assertThat(\@[\@"bar", \@"baz"], everyItem(startsWith(\@"ba")))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_everyItem instead. + */ +static inline id everyItem(id itemMatcher) +{ + return HC_everyItem(itemMatcher); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCEvery.m b/Pods/OCHamcrest/Source/Library/Collection/HCEvery.m new file mode 100644 index 0000000..3f193fd --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCEvery.m @@ -0,0 +1,74 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCEvery.h" + +#import "HCRequireNonNilObject.h" + + +@implementation HCEvery + +- (instancetype)initWithMatcher:(id )matcher +{ + HCRequireNonNilObject(matcher); + + self = [super init]; + if (self) + _matcher = matcher; + return self; +} + +- (BOOL)matches:(id)collection describingMismatchTo:(id )mismatchDescription +{ + if (![collection conformsToProtocol:@protocol(NSFastEnumeration)]) + { + [[mismatchDescription appendText:@"was non-collection "] appendDescriptionOf:collection]; + return NO; + } + + if ([collection count] == 0) + { + [mismatchDescription appendText:@"was empty"]; + return NO; + } + + for (id item in collection) + { + if (![self.matcher matches:item]) + { + [self describeAllMismatchesInCollection:collection to:mismatchDescription]; + return NO; + } + } + return YES; +} + +- (void)describeAllMismatchesInCollection:(id)collection to:(id )mismatchDescription +{ + [mismatchDescription appendText:@"mismatches were: ["]; + BOOL isPastFirst = NO; + for (id item in collection) + { + if (![self.matcher matches:item]) + { + if (isPastFirst) + [mismatchDescription appendText:@", "]; + [self.matcher describeMismatchOf:item to:mismatchDescription]; + isPastFirst = YES; + } + } + [mismatchDescription appendText:@"]"]; +} + +- (void)describeTo:(id )description +{ + [[description appendText:@"every item is "] appendDescriptionOf:self.matcher]; +} + +@end + + +id HC_everyItem(id itemMatcher) +{ + return [[HCEvery alloc] initWithMatcher:itemMatcher]; +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCHasCount.h b/Pods/OCHamcrest/Source/Library/Collection/HCHasCount.h new file mode 100644 index 0000000..a52f27c --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCHasCount.h @@ -0,0 +1,63 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if collection size satisfies a nested matcher. + */ +@interface HCHasCount : HCBaseMatcher + +- (instancetype)initWithMatcher:(id )countMatcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_hasCount(id countMatcher); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object's -count method + * returns a value that satisfies the specified matcher. + * @param countMatcher A matcher for the count of an examined collection. + * @discussion + * Example
+ *
assertThat(\@[\@"foo", \@"bar"], hasCount(equalTo(@2)))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasCount instead. + */ +static inline id hasCount(id countMatcher) +{ + return HC_hasCount(countMatcher); +} +#endif + + +FOUNDATION_EXPORT id HC_hasCountOf(NSUInteger count); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object's -count method + * returns a value that equals the specified value. + * @param value Value to compare against as the expected count. + * @discussion + * Example
+ *
assertThat(\@[\@"foo", \@"bar"], hasCountOf(2))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasCountOf instead. + */ +static inline id hasCountOf(NSUInteger value) +{ + return HC_hasCountOf(value); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCHasCount.m b/Pods/OCHamcrest/Source/Library/Collection/HCHasCount.m new file mode 100644 index 0000000..dc55b3c --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCHasCount.m @@ -0,0 +1,65 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCHasCount.h" + +#import "HCIsEqual.h" + + +@interface HCHasCount () +@property (nonatomic, strong, readonly) id countMatcher; +@end + +@implementation HCHasCount + +- (instancetype)initWithMatcher:(id )countMatcher +{ + self = [super init]; + if (self) + _countMatcher = countMatcher; + return self; +} + +- (BOOL)matches:(nullable id)item +{ + if (![self itemHasCount:item]) + return NO; + + NSNumber *count = @([item count]); + return [self.countMatcher matches:count]; +} + +- (BOOL)itemHasCount:(id)item +{ + return [item respondsToSelector:@selector(count)]; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + [mismatchDescription appendText:@"was "]; + if ([self itemHasCount:item]) + { + [[[mismatchDescription appendText:@"count of "] + appendDescriptionOf:@([item count])] + appendText:@" with "]; + } + [mismatchDescription appendDescriptionOf:item]; +} + +- (void)describeTo:(id )description +{ + [[description appendText:@"a collection with count of "] appendDescriptionOf:self.countMatcher]; +} + +@end + + +id HC_hasCount(id countMatcher) +{ + return [[HCHasCount alloc] initWithMatcher:countMatcher]; +} + +id HC_hasCountOf(NSUInteger value) +{ + return HC_hasCount(HC_equalTo(@(value))); +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContaining.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContaining.h new file mode 100644 index 0000000..42be830 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContaining.h @@ -0,0 +1,95 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if any item in a collection satisfies a nested matcher. + */ +@interface HCIsCollectionContaining : HCDiagnosingMatcher + +- (instancetype)initWithMatcher:(id )elementMatcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_hasItem(id itemMatcher); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract hasItem(itemMatcher) - + * Creates a matcher for collections that matches when at least one item in the examined collection + * satisfies the specified matcher. + * @param itemMatcher The matcher to apply to collection elements, or an expected value + * for equalTo matching. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing a single pass. + * + * If itemMatcher is not a matcher, it is implicitly wrapped in an equalTo matcher + * to check for equality. + * + * Example
+ *
assertThat(\@[\@1, \@2, \@3], hasItem(equalTo(\@2)))
+ * + *
assertThat(\@[\@1, \@2, \@3], hasItem(\@2))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasItem instead. + */ +#define hasItem HC_hasItem +#endif + + +FOUNDATION_EXPORT id HC_hasItemsIn(NSArray *itemMatchers); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for collections that matches when all specified matchers are + * satisfied by any item in the examined collection. + * @param itemMatchers An array of matchers. Any element that is not a matcher is implicitly wrapped + * in an equalTo matcher to check for equality. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing one pass for each matcher. + * + * Example
+ *
assertThat(\@[\@"foo", \@"bar", \@"baz"], hasItems(\@[endsWith(\@"z"), endsWith(\@"o")]))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasItemsIn instead. + */ +static inline id hasItemsIn(NSArray *itemMatchers) +{ + return HC_hasItemsIn(itemMatchers); +} +#endif + + +FOUNDATION_EXPORT id HC_hasItems(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION; + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for collections that matches when all specified matchers are + * satisfied by any item in the examined collection. + * @param itemMatchers... A comma-separated list of matchers ending with nil. + * Any argument that is not a matcher is implicitly wrapped in an equalTo matcher to check + * for equality. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing one pass for each matcher. + * + * Example
+ *
assertThat(\@[\@"foo", \@"bar", \@"baz"], hasItems(endsWith(\@"z"), endsWith(\@"o"), nil))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasItems instead. + */ +#define hasItems(itemMatchers...) HC_hasItems(itemMatchers) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContaining.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContaining.m new file mode 100644 index 0000000..bbb4a26 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContaining.m @@ -0,0 +1,88 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsCollectionContaining.h" + +#import "HCAllOf.h" +#import "HCCollect.h" +#import "HCRequireNonNilObject.h" +#import "HCWrapInMatcher.h" + + +@interface HCIsCollectionContaining () +@property (nonatomic, strong, readonly) id elementMatcher; +@end + +@implementation HCIsCollectionContaining + +- (instancetype)initWithMatcher:(id )elementMatcher +{ + self = [super init]; + if (self) + _elementMatcher = elementMatcher; + return self; +} + +- (BOOL)matches:(id)collection describingMismatchTo:(id )mismatchDescription +{ + if (![collection conformsToProtocol:@protocol(NSFastEnumeration)]) + { + [[mismatchDescription appendText:@"was non-collection "] appendDescriptionOf:collection]; + return NO; + } + + if ([collection count] == 0) + { + [mismatchDescription appendText:@"was empty"]; + return NO; + } + + for (id item in collection) + if ([self.elementMatcher matches:item]) + return YES; + + [mismatchDescription appendText:@"mismatches were: ["]; + BOOL isPastFirst = NO; + for (id item in collection) + { + if (isPastFirst) + [mismatchDescription appendText:@", "]; + [self.elementMatcher describeMismatchOf:item to:mismatchDescription]; + isPastFirst = YES; + } + [mismatchDescription appendText:@"]"]; + return NO; +} + +- (void)describeTo:(id )description +{ + [[description appendText:@"a collection containing "] + appendDescriptionOf:self.elementMatcher]; +} + +@end + + +id HC_hasItem(id itemMatcher) +{ + HCRequireNonNilObject(itemMatcher); + return [[HCIsCollectionContaining alloc] initWithMatcher:HCWrapInMatcher(itemMatcher)]; +} + +id HC_hasItemsIn(NSArray *itemMatchers) +{ + NSMutableArray *matchers = [[NSMutableArray alloc] init]; + for (id itemMatcher in itemMatchers) + [matchers addObject:HC_hasItem(itemMatcher)]; + return HC_allOfIn(matchers); +} + +id HC_hasItems(id itemMatchers, ...) +{ + va_list args; + va_start(args, itemMatchers); + NSArray *array = HCCollectItems(itemMatchers, args); + va_end(args); + + return HC_hasItemsIn(array); +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.h new file mode 100644 index 0000000..4fecfdf --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.h @@ -0,0 +1,79 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if every item in a collection, in any order, satisfy a list of nested matchers. + */ +@interface HCIsCollectionContainingInAnyOrder : HCDiagnosingMatcher + +- (instancetype)initWithMatchers:(NSArray> *)itemMatchers NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_containsInAnyOrderIn(NSArray *itemMatchers); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates an order-agnostic matcher for collections that matches when each item in the + * examined collection satisfies one matcher anywhere in the specified list of matchers. + * @param itemMatchers An array of matchers. Any element that is not a matcher is implicitly wrapped + * in an equalTo matcher to check for equality. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing a single pass. For a positive match, the examined collection must be of the same + * length as the specified list of matchers. + * + * Note: Each matcher in the specified list will only be used once during a given examination, so + * be careful when specifying matchers that may be satisfied by more than one entry in an examined + * collection. + * + * Examples
+ *
assertThat(\@[\@"foo", \@"bar"], containsInAnyOrderIn(\@[equalTo(\@"bar"), equalTo(\@"foo")]))
+ *
assertThat(\@[\@"foo", \@"bar"], containsInAnyOrderIn(@[\@"bar", \@"foo"]))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_containsInAnyOrderIn instead. + */ +static inline id containsInAnyOrderIn(NSArray *itemMatchers) +{ + return HC_containsInAnyOrderIn(itemMatchers); +} +#endif + + +FOUNDATION_EXPORT id HC_containsInAnyOrder(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION; + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates an order-agnostic matcher for collections that matches when each item in the + * examined collection satisfies one matcher anywhere in the specified list of matchers. + * @param itemMatchers... A comma-separated list of matchers ending with nil. + * Any argument that is not a matcher is implicitly wrapped in an equalTo matcher to check + * for equality. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing a single pass. For a positive match, the examined collection must be of the same + * length as the specified list of matchers. + * + * Note: Each matcher in the specified list will only be used once during a given examination, so + * be careful when specifying matchers that may be satisfied by more than one entry in an examined + * collection. + * + * Examples
+ *
assertThat(\@[\@"foo", \@"bar"], containsInAnyOrder(equalTo(\@"bar"), equalTo(\@"foo"), nil))
+ *
assertThat(\@[\@"foo", \@"bar"], containsInAnyOrder(\@"bar", \@"foo", nil))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_containsInAnyOrder instead. + */ +#define containsInAnyOrder(itemMatchers...) HC_containsInAnyOrder(itemMatchers) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.m new file mode 100644 index 0000000..95623d2 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.m @@ -0,0 +1,115 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsCollectionContainingInAnyOrder.h" + +#import "HCCollect.h" + + +@interface HCMatchingInAnyOrder : NSObject +@property (nonatomic, copy, readonly) NSMutableArray> *matchers; +@property (nonatomic, strong, readonly) id mismatchDescription; +@end + +@implementation HCMatchingInAnyOrder + +- (instancetype)initWithMatchers:(NSArray> *)itemMatchers + mismatchDescription:(id )description +{ + self = [super init]; + if (self) + { + _matchers = [itemMatchers mutableCopy]; + _mismatchDescription = description; + } + return self; +} + +- (BOOL)matches:(nullable id)item +{ + NSUInteger index = 0; + for (id matcher in self.matchers) + { + if ([matcher matches:item]) + { + [self.matchers removeObjectAtIndex:index]; + return YES; + } + ++index; + } + [[self.mismatchDescription appendText:@"not matched: "] + appendDescriptionOf:item]; + return NO; +} + +- (BOOL)isFinishedWith:(NSArray *)collection +{ + if (self.matchers.count == 0) + return YES; + + [[[[self.mismatchDescription appendText:@"no item matches: "] + appendList:self.matchers start:@"" separator:@", " end:@""] + appendText:@" in "] + appendList:collection start:@"[" separator:@", " end:@"]"]; + return NO; +} + +@end + + +@interface HCIsCollectionContainingInAnyOrder () +@property (nonatomic, copy, readonly) NSArray> *matchers; +@end + +@implementation HCIsCollectionContainingInAnyOrder + +- (instancetype)initWithMatchers:(NSArray> *)itemMatchers +{ + self = [super init]; + if (self) + _matchers = [itemMatchers copy]; + return self; +} + +- (BOOL)matches:(id)collection describingMismatchTo:(id )mismatchDescription +{ + if (![collection conformsToProtocol:@protocol(NSFastEnumeration)]) + { + [[mismatchDescription appendText:@"was non-collection "] appendDescriptionOf:collection]; + return NO; + } + + HCMatchingInAnyOrder *matchSequence = + [[HCMatchingInAnyOrder alloc] initWithMatchers:self.matchers + mismatchDescription:mismatchDescription]; + for (id item in collection) + if (![matchSequence matches:item]) + return NO; + + return [matchSequence isFinishedWith:collection]; +} + +- (void)describeTo:(id )description +{ + [[[description appendText:@"a collection over "] + appendList:self.matchers start:@"[" separator:@", " end:@"]"] + appendText:@" in any order"]; +} + +@end + + +id HC_containsInAnyOrderIn(NSArray *itemMatchers) +{ + return [[HCIsCollectionContainingInAnyOrder alloc] initWithMatchers:HCWrapIntoMatchers(itemMatchers)]; +} + +id HC_containsInAnyOrder(id itemMatchers, ...) +{ + va_list args; + va_start(args, itemMatchers); + NSArray *array = HCCollectItems(itemMatchers, args); + va_end(args); + + return HC_containsInAnyOrderIn(array); +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInOrder.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInOrder.h new file mode 100644 index 0000000..a07ee8a --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInOrder.h @@ -0,0 +1,71 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if every item in a collection satisfies a list of nested matchers, in order. + */ +@interface HCIsCollectionContainingInOrder : HCDiagnosingMatcher + +- (instancetype)initWithMatchers:(NSArray> *)itemMatchers NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_containsIn(NSArray *itemMatchers); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for collections that matches when each item in the examined + * collection satisfies the corresponding matcher in the specified list of matchers. + * @param itemMatchers An array of matchers. Any element that is not a matcher is implicitly wrapped + * in an equalTo matcher to check for equality. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing a single pass. For a positive match, the examined collection must be of the same + * length as the specified list of matchers. + * + * Examples
+ *
assertThat(\@[\@"foo", \@"bar"], containsIn(\@[equalTo(\@"foo"), equalTo(\@"bar")]))
+ *
assertThat(\@[\@"foo", \@"bar"], containsIn(\@[\@"foo", \@"bar"]))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_containsIn instead.) + */ +static inline id containsIn(NSArray *itemMatchers) +{ + return HC_containsIn(itemMatchers); +} +#endif + + +FOUNDATION_EXPORT id HC_contains(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION; + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for collections that matches when each item in the examined + * collection satisfies the corresponding matcher in the specified list of matchers. + * @param itemMatchers... A comma-separated list of matchers ending with nil. + * Any argument that is not a matcher is implicitly wrapped in an equalTo matcher to check + * for equality. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing a single pass. For a positive match, the examined collection must be of the same + * length as the specified list of matchers. + * + * Examples
+ *
assertThat(\@[\@"foo", \@"bar"], contains(equalTo(\@"foo"), equalTo(\@"bar"), nil))
+ *
assertThat(\@[\@"foo", \@"bar"], contains(\@"foo", \@"bar", nil))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_contains instead.) + */ +#define contains(itemMatchers...) HC_contains(itemMatchers) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInOrder.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInOrder.m new file mode 100644 index 0000000..d50112a --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInOrder.m @@ -0,0 +1,134 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsCollectionContainingInOrder.h" + +#import "HCCollect.h" + + +@interface HCMatchSequence : NSObject +@property (nonatomic, copy, readonly) NSArray> *matchers; +@property (nonatomic, strong, readonly) id mismatchDescription; +@property (nonatomic, assign) NSUInteger nextMatchIndex; +@end + +@implementation HCMatchSequence + +- (instancetype)initWithMatchers:(NSArray> *)itemMatchers + mismatchDescription:(id )description +{ + self = [super init]; + if (self) + { + _matchers = [itemMatchers copy]; + _mismatchDescription = description; + } + return self; +} + +- (BOOL)matches:(nullable id)item +{ + return [self isNotSurplus:item] && [self isMatched:item]; +} + +- (BOOL)isFinished +{ + if (self.nextMatchIndex < self.matchers.count) + { + [[self.mismatchDescription appendText:@"no item was "] + appendDescriptionOf:self.matchers[self.nextMatchIndex]]; + return NO; + } + return YES; +} + +- (BOOL)isMatched:(id)item +{ + id matcher = self.matchers[self.nextMatchIndex]; + if (![matcher matches:item]) + { + [self describeMismatchOfMatcher:matcher item:item]; + return NO; + } + ++self.nextMatchIndex; + return YES; +} + +- (BOOL)isNotSurplus:(id)item +{ + if (self.matchers.count <= self.nextMatchIndex) + { + [[self.mismatchDescription + appendText:[NSString stringWithFormat:@"exceeded count of %lu with item ", + (unsigned long)self.matchers.count]] + appendDescriptionOf:item]; + return NO; + } + return YES; +} + +- (void)describeMismatchOfMatcher:(id )matcher item:(id)item +{ + [self.mismatchDescription appendText:[NSString stringWithFormat:@"item %lu: ", + (unsigned long)self.nextMatchIndex]]; + [matcher describeMismatchOf:item to:self.mismatchDescription]; +} + +@end + + +@interface HCIsCollectionContainingInOrder () +@property (nonatomic, copy, readonly) NSArray> *matchers; +@end + +@implementation HCIsCollectionContainingInOrder + +- (instancetype)initWithMatchers:(NSArray> *)itemMatchers +{ + self = [super init]; + if (self) + _matchers = [itemMatchers copy]; + return self; +} + +- (BOOL)matches:(id)collection describingMismatchTo:(id )mismatchDescription +{ + if (![collection conformsToProtocol:@protocol(NSFastEnumeration)]) + { + [[mismatchDescription appendText:@"was non-collection "] appendDescriptionOf:collection]; + return NO; + } + + HCMatchSequence *matchSequence = + [[HCMatchSequence alloc] initWithMatchers:self.matchers + mismatchDescription:mismatchDescription]; + for (id item in collection) + if (![matchSequence matches:item]) + return NO; + + return [matchSequence isFinished]; +} + +- (void)describeTo:(id )description +{ + [[description appendText:@"a collection containing "] + appendList:self.matchers start:@"[" separator:@", " end:@"]"]; +} + +@end + + +id HC_containsIn(NSArray *itemMatchers) +{ + return [[HCIsCollectionContainingInOrder alloc] initWithMatchers:HCWrapIntoMatchers(itemMatchers)]; +} + +id HC_contains(id itemMatchers, ...) +{ + va_list args; + va_start(args, itemMatchers); + NSArray *array = HCCollectItems(itemMatchers, args); + va_end(args); + + return HC_containsIn(array); +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.h new file mode 100644 index 0000000..eb0dd40 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.h @@ -0,0 +1,48 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if every item in a collection satisfies a list of nested matchers, in order. + */ +@interface HCIsCollectionContainingInRelativeOrder : HCDiagnosingMatcher + +- (instancetype)initWithMatchers:(NSArray> *)itemMatchers NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_containsInRelativeOrder(NSArray *itemMatchers); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for collections that matches when the examined collection contains + * items satisfying the specified list of matchers, in the same relative order. + * @param itemMatchers Array of matchers that must be satisfied by the items provided by the + * examined collection in the same relative order. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing a single pass. + * + * Any element of itemMatchers that is not a matcher is implicitly wrapped in an + * equalTo matcher to check for equality. + * + * Examples
+ *
assertThat(\@[\@1, \@2, \@3, \@4, \@5], containsInRelativeOrder(equalTo(\@2), equalTo(\@4)))
+ *
assertThat(\@[\@1, \@2, \@3, \@4, \@5], containsInRelativeOrder(\@2, \@4))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_containsInRelativeOrder instead. + */ +static inline id containsInRelativeOrder(NSArray *itemMatchers) +{ + return HC_containsInRelativeOrder(itemMatchers); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.m new file mode 100644 index 0000000..4e563b4 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.m @@ -0,0 +1,124 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsCollectionContainingInRelativeOrder.h" + +#import "HCCollect.h" + + +static void HCRequireNonEmptyArray(NSArray *array) +{ + if (!array.count) + { + @throw [NSException exceptionWithName:@"EmptyArray" + reason:@"Must be non-empty array" + userInfo:nil]; + } +} + + +@interface HCMatchSequenceInRelativeOrder : NSObject +@property (nonatomic, copy, readonly) NSArray> *matchers; +@property (nonatomic, strong, readonly) id mismatchDescription; +@property (nonatomic, assign) NSUInteger nextMatchIndex; +@property (nonatomic, strong) id lastMatchedItem; +@end + +@implementation HCMatchSequenceInRelativeOrder + +- (instancetype)initWithMatchers:(NSArray> *)itemMatchers + mismatchDescription:(id )description +{ + self = [super init]; + if (self) + { + _matchers = [itemMatchers copy]; + _mismatchDescription = description; + } + return self; +} + +- (void)processItems:(NSArray *)sequence +{ + for (id item in sequence) + { + if (self.nextMatchIndex < self.matchers.count) + { + id matcher = self.matchers[self.nextMatchIndex]; + if ([matcher matches:item]) + { + self.lastMatchedItem = item; + self.nextMatchIndex += 1; + } + } + } +} + +- (BOOL)isFinished +{ + if (self.nextMatchIndex < self.matchers.count) + { + [[self.mismatchDescription + appendDescriptionOf:self.matchers[self.nextMatchIndex]] + appendText:@" was not found"]; + if (self.lastMatchedItem != nil) + { + [[self.mismatchDescription + appendText:@" after "] + appendDescriptionOf:self.lastMatchedItem]; + } + return NO; + } + return YES; +} + +@end + + +@interface HCIsCollectionContainingInRelativeOrder () +@property (nonatomic, copy, readonly) NSArray> *matchers; +@end + +@implementation HCIsCollectionContainingInRelativeOrder + +- (instancetype)initWithMatchers:(NSArray> *)itemMatchers +{ + HCRequireNonEmptyArray(itemMatchers); + + self = [super init]; + if (self) + _matchers = [itemMatchers copy]; + return self; +} + +- (BOOL)matches:(id)collection describingMismatchTo:(id )mismatchDescription +{ + if (![collection conformsToProtocol:@protocol(NSFastEnumeration)]) + { + [[mismatchDescription appendText:@"was non-collection "] appendDescriptionOf:collection]; + return NO; + } + + HCMatchSequenceInRelativeOrder *matchSequenceInRelativeOrder = + [[HCMatchSequenceInRelativeOrder alloc] initWithMatchers:self.matchers + mismatchDescription:mismatchDescription]; + [matchSequenceInRelativeOrder processItems:collection]; + return [matchSequenceInRelativeOrder isFinished]; +} + +- (void)describeTo:(id )description +{ + [[[description + appendText:@"a collection containing "] + appendList:self.matchers start:@"[" separator:@", " end:@"]"] + appendText:@" in relative order"]; +} + +@end + + +id HC_containsInRelativeOrder(NSArray *itemMatchers) +{ + NSArray *matchers = HCWrapIntoMatchers(itemMatchers); + return [[HCIsCollectionContainingInRelativeOrder alloc] initWithMatchers:matchers]; +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionOnlyContaining.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionOnlyContaining.h new file mode 100644 index 0000000..df6d380 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionOnlyContaining.h @@ -0,0 +1,62 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if every item in a collection satisfies any of the nested matchers. + */ +@interface HCIsCollectionOnlyContaining : HCEvery +@end + +FOUNDATION_EXPORT id HC_onlyContainsIn(NSArray *itemMatchers); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for collections that matches when each item of the examined + * collection satisfies any of the specified matchers. + * @param itemMatchers An array of matchers. Any element that is not a matcher is implicitly wrapped + * in an equalTo matcher to check for equality. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing a single pass. Any matcher may match multiple elements. + * + * Example
+ *
assertThat(\@[\@"Jon", \@"John", \@"Bob"], onlyContainsIn(\@[startsWith(\@"Jo"), startsWith(\@("Bo")]))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_onlyContainsIn instead. + */ +static inline id onlyContainsIn(NSArray *itemMatchers) +{ + return HC_onlyContainsIn(itemMatchers); +} +#endif + + +FOUNDATION_EXPORT id HC_onlyContains(id itemMatchers, ...) NS_REQUIRES_NIL_TERMINATION; + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for collections that matches when each item of the examined + * collection satisfies any of the specified matchers. + * @param itemMatchers... A comma-separated list of matchers ending with nil. + * Any argument that is not a matcher is implicitly wrapped in an equalTo matcher to check for + * equality. + * @discussion This matcher works on any collection that conforms to the NSFastEnumeration protocol, + * performing a single pass. Any matcher may match multiple elements. + * + * Example
+ *
assertThat(\@[\@"Jon", \@"John", \@"Bob"], onlyContains(startsWith(\@"Jo"), startsWith(\@("Bo"), nil))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_onlyContains instead. + */ +#define onlyContains(itemMatchers...) HC_onlyContains(itemMatchers) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionOnlyContaining.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionOnlyContaining.m new file mode 100644 index 0000000..117db92 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsCollectionOnlyContaining.m @@ -0,0 +1,34 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsCollectionOnlyContaining.h" + +#import "HCAnyOf.h" +#import "HCCollect.h" + + +@implementation HCIsCollectionOnlyContaining + +- (void)describeTo:(id )description +{ + [[description appendText:@"a collection containing items matching "] + appendDescriptionOf:self.matcher]; +} + +@end + + +id HC_onlyContainsIn(NSArray *itemMatchers) +{ + return [[HCIsCollectionOnlyContaining alloc] initWithMatcher:HC_anyOfIn(itemMatchers)]; +} + +id HC_onlyContains(id itemMatchers, ...) +{ + va_list args; + va_start(args, itemMatchers); + NSArray *array = HCCollectItems(itemMatchers, args); + va_end(args); + + return HC_onlyContainsIn(array); +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContaining.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContaining.h new file mode 100644 index 0000000..e4debd8 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContaining.h @@ -0,0 +1,47 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if any entry in a dictionary satisfies the nested pair of matchers. + */ +@interface HCIsDictionaryContaining : HCBaseMatcher + +- (instancetype)initWithKeyMatcher:(id )keyMatcher + valueMatcher:(id )valueMatcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_hasEntry(id keyMatcher, id valueMatcher); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for NSDictionaries that matches when the examined dictionary contains + * at least one entry whose key satisfies the specified keyMatcher and whose + * value satisfies the specified valueMatcher. + * @param keyMatcher The matcher to satisfy for the key, or an expected value for equalTo matching. + * @param valueMatcher The matcher to satisfy for the value, or an expected value for equalTo matching. + * @discussion Any argument that is not a matcher is implicitly wrapped in an equalTo + * matcher to check for equality. + * + * Examples
+ *
assertThat(myDictionary, hasEntry(equalTo(\@"foo"), equalTo(\@"bar")))
+ *
assertThat(myDictionary, hasEntry(\@"foo", \@"bar"))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasEntry instead. + */ +static inline id hasEntry(id keyMatcher, id valueMatcher) +{ + return HC_hasEntry(keyMatcher, valueMatcher); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContaining.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContaining.m new file mode 100644 index 0000000..127f5c7 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContaining.m @@ -0,0 +1,56 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsDictionaryContaining.h" + +#import "HCRequireNonNilObject.h" +#import "HCWrapInMatcher.h" + + +@interface HCIsDictionaryContaining () +@property (nonatomic, strong, readonly) id keyMatcher; +@property (nonatomic, strong, readonly) id valueMatcher; +@end + +@implementation HCIsDictionaryContaining + +- (instancetype)initWithKeyMatcher:(id )keyMatcher + valueMatcher:(id )valueMatcher +{ + self = [super init]; + if (self) + { + _keyMatcher = keyMatcher; + _valueMatcher = valueMatcher; + } + return self; +} + +- (BOOL)matches:(id)dict +{ + if ([dict isKindOfClass:[NSDictionary class]]) + for (id oneKey in dict) + if ([self.keyMatcher matches:oneKey] && [self.valueMatcher matches:dict[oneKey]]) + return YES; + return NO; +} + +- (void)describeTo:(id )description +{ + [[[[[description appendText:@"a dictionary containing { "] + appendDescriptionOf:self.keyMatcher] + appendText:@" = "] + appendDescriptionOf:self.valueMatcher] + appendText:@"; }"]; +} + +@end + + +id HC_hasEntry(id keyMatcher, id valueMatcher) +{ + HCRequireNonNilObject(keyMatcher); + HCRequireNonNilObject(valueMatcher); + return [[HCIsDictionaryContaining alloc] initWithKeyMatcher:HCWrapInMatcher(keyMatcher) + valueMatcher:HCWrapInMatcher(valueMatcher)]; +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingEntries.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingEntries.h new file mode 100644 index 0000000..c8e396c --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingEntries.h @@ -0,0 +1,68 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if dictionary contains entries that satisfy the list of keys and value + * matchers. + */ +@interface HCIsDictionaryContainingEntries : HCDiagnosingMatcher + +- (instancetype)initWithKeys:(NSArray *)keys + valueMatchers:(NSArray> *)valueMatchers NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +FOUNDATION_EXPORT id HC_hasEntriesIn(NSDictionary *valueMatchersForKeys); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for NSDictionaries that matches when the examined dictionary contains + * entries satisfying a dictionary of keys and their value matchers. + * @param valueMatchersForKeys A dictionary of keys (not matchers) and their value matchers. Any + * value argument that is not a matcher is implicitly wrapped in an equalTo matcher to + * check for equality. + * @discussion + * Examples
+ *
assertThat(personDict, hasEntriesIn(\@{\@"firstName": equalTo(\@"Jon"), \@"lastName": equalTo(\@"Reid")}))
+ *
assertThat(personDict, hasEntriesIn(\@{\@"firstName": \@"Jon", \@"lastName": \@"Reid"}))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasEntryIn instead. + */ +static inline id hasEntriesIn(NSDictionary *valueMatchersForKeys) +{ + return HC_hasEntriesIn(valueMatchersForKeys); +} +#endif + +FOUNDATION_EXPORT id HC_hasEntries(id keysAndValueMatchers, ...) NS_REQUIRES_NIL_TERMINATION; + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for NSDictionaries that matches when the examined dictionary contains + * entries satisfying a list of alternating keys and their value matchers. + * @param keysAndValueMatchers... A key (not a matcher) to look up, followed by a value matcher or + * an expected value for equalTo matching, in a comma-separated list ending + * with nil + * @discussion Note that the keys must be actual keys, not matchers. Any value argument that is not + * a matcher is implicitly wrapped in an equalTo matcher to check for equality. + * + * Examples
+ *
assertThat(personDict, hasEntries(\@"firstName", equalTo(\@"Jon"), \@"lastName", equalTo(\@"Reid"), nil))
+ *
assertThat(personDict, hasEntries(\@"firstName", \@"Jon", \@"lastName", \@"Reid", nil))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasEntry instead. + */ +#define hasEntries(keysAndValueMatchers...) HC_hasEntries(keysAndValueMatchers) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingEntries.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingEntries.m new file mode 100644 index 0000000..0b7b948 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingEntries.m @@ -0,0 +1,132 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsDictionaryContainingEntries.h" + +#import "HCWrapInMatcher.h" + + +@interface HCIsDictionaryContainingEntries () +@property (nonatomic, copy, readonly) NSArray *keys; +@property (nonatomic, copy, readonly) NSArray> *valueMatchers; +@end + +@implementation HCIsDictionaryContainingEntries + +- (instancetype)initWithKeys:(NSArray *)keys + valueMatchers:(NSArray> *)valueMatchers +{ + self = [super init]; + if (self) + { + _keys = [keys copy]; + _valueMatchers = [valueMatchers copy]; + } + return self; +} + +- (BOOL)matches:(id)dict describingMismatchTo:(id )mismatchDescription +{ + if (![dict isKindOfClass:[NSDictionary class]]) + { + [[mismatchDescription appendText:@"was non-dictionary "] appendDescriptionOf:dict]; + return NO; + } + + NSUInteger count = self.keys.count; + for (NSUInteger index = 0; index < count; ++index) + { + id key = self.keys[index]; + if (dict[key] == nil) + { + [[[[mismatchDescription appendText:@"no "] + appendDescriptionOf:key] + appendText:@" key in "] + appendDescriptionOf:dict]; + return NO; + } + + id valueMatcher = self.valueMatchers[index]; + id actualValue = dict[key]; + + if (![valueMatcher matches:actualValue]) + { + [[[[mismatchDescription appendText:@"value for "] + appendDescriptionOf:key] + appendText:@" was "] + appendDescriptionOf:actualValue]; + return NO; + } + } + + return YES; +} + +- (void)describeKeyValueAtIndex:(NSUInteger)index to:(id )description +{ + [[[[description appendDescriptionOf:self.keys[index]] + appendText:@" = "] + appendDescriptionOf:self.valueMatchers[index]] + appendText:@"; "]; +} + +- (void)describeTo:(id )description +{ + [description appendText:@"a dictionary containing { "]; + NSUInteger count = [self.keys count]; + NSUInteger index = 0; + for (; index < count - 1; ++index) + [self describeKeyValueAtIndex:index to:description]; + [self describeKeyValueAtIndex:index to:description]; + [description appendText:@"}"]; +} + +@end + + +static void requirePairedObject(id obj) +{ + if (obj == nil) + { + @throw [NSException exceptionWithName:@"NilObject" + reason:@"HC_hasEntries keys and value matchers must be paired" + userInfo:nil]; + } +} + + +id HC_hasEntriesIn(NSDictionary *valueMatchersForKeys) +{ + NSArray *keys = valueMatchersForKeys.allKeys; + NSMutableArray> *valueMatchers = [[NSMutableArray alloc] init]; + for (id key in keys) + [valueMatchers addObject:HCWrapInMatcher(valueMatchersForKeys[key])]; + + return [[HCIsDictionaryContainingEntries alloc] initWithKeys:keys + valueMatchers:valueMatchers]; +} + +id HC_hasEntries(id keysAndValueMatchers, ...) +{ + va_list args; + va_start(args, keysAndValueMatchers); + + id key = keysAndValueMatchers; + id valueMatcher = va_arg(args, id); + requirePairedObject(valueMatcher); + NSMutableArray *keys = [NSMutableArray arrayWithObject:key]; + NSMutableArray> *valueMatchers = [NSMutableArray arrayWithObject:HCWrapInMatcher(valueMatcher)]; + + key = va_arg(args, id); + while (key != nil) + { + [keys addObject:key]; + valueMatcher = va_arg(args, id); + requirePairedObject(valueMatcher); + [valueMatchers addObject:HCWrapInMatcher(valueMatcher)]; + key = va_arg(args, id); + } + + return [[HCIsDictionaryContainingEntries alloc] initWithKeys:keys + valueMatchers:valueMatchers]; +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingKey.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingKey.h new file mode 100644 index 0000000..bcdd124 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingKey.h @@ -0,0 +1,44 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if any entry in a dictionary has a key satisfying the nested matcher. + */ +@interface HCIsDictionaryContainingKey : HCBaseMatcher + +- (instancetype)initWithKeyMatcher:(id )keyMatcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_hasKey(id keyMatcher); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for NSDictionaries that matches when the examined dictionary contains + * at least key that satisfies the specified matcher. + * @param keyMatcher The matcher to satisfy for the key, or an expected value for equalTo matching. + * @discussion Any argument that is not a matcher is implicitly wrapped in an equalTo + * matcher to check for equality. + * + * Examples
+ *
assertThat(myDictionary, hasEntry(equalTo(\@"foo")))
+ *
assertThat(myDictionary, hasEntry(\@"foo"))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasKey instead. + */ +static inline id hasKey(id keyMatcher) +{ + return HC_hasKey(keyMatcher); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingKey.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingKey.m new file mode 100644 index 0000000..de53800 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingKey.m @@ -0,0 +1,46 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsDictionaryContainingKey.h" + +#import "HCRequireNonNilObject.h" +#import "HCWrapInMatcher.h" + + +@interface HCIsDictionaryContainingKey () +@property (nonatomic, strong, readonly) id keyMatcher; +@end + +@implementation HCIsDictionaryContainingKey + +- (instancetype)initWithKeyMatcher:(id )keyMatcher +{ + self = [super init]; + if (self) + _keyMatcher = keyMatcher; + return self; +} + +- (BOOL)matches:(id)dict +{ + if ([dict isKindOfClass:[NSDictionary class]]) + for (id oneKey in dict) + if ([self.keyMatcher matches:oneKey]) + return YES; + return NO; +} + +- (void)describeTo:(id )description +{ + [[description appendText:@"a dictionary containing key "] + appendDescriptionOf:self.keyMatcher]; +} + +@end + + +id HC_hasKey(id keyMatcher) +{ + HCRequireNonNilObject(keyMatcher); + return [[HCIsDictionaryContainingKey alloc] initWithKeyMatcher:HCWrapInMatcher(keyMatcher)]; +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingValue.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingValue.h new file mode 100644 index 0000000..8588b72 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingValue.h @@ -0,0 +1,46 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if any entry in a dictionary has a value satisfying the nested matcher. + */ +@interface HCIsDictionaryContainingValue : HCBaseMatcher + +- (instancetype)initWithValueMatcher:(id )valueMatcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_hasValue(id valueMatcher); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for NSDictionaries that matches when the examined dictionary contains + * at least value that satisfies the specified matcher. + * @param valueMatcher The matcher to satisfy for the value, or an expected value for equalTo matching. + * @discussion This matcher works on any collection that has an -allValues method. + * + * Any argument that is not a matcher is implicitly wrapped in an equalTo matcher to check + * for equality. + * + * Examples
+ *
assertThat(myDictionary, hasValue(equalTo(\@"bar")))
+ *
assertThat(myDictionary, hasValue(\@"bar"))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasValue instead. + */ +static inline id hasValue(id valueMatcher) +{ + return HC_hasValue(valueMatcher); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingValue.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingValue.m new file mode 100644 index 0000000..9e8ec6a --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsDictionaryContainingValue.m @@ -0,0 +1,46 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsDictionaryContainingValue.h" + +#import "HCRequireNonNilObject.h" +#import "HCWrapInMatcher.h" + + +@interface HCIsDictionaryContainingValue () +@property (nonatomic, strong, readonly) id valueMatcher; +@end + +@implementation HCIsDictionaryContainingValue + +- (instancetype)initWithValueMatcher:(id )valueMatcher +{ + self = [super init]; + if (self) + _valueMatcher = valueMatcher; + return self; +} + +- (BOOL)matches:(id)dict +{ + if ([dict respondsToSelector:@selector(allValues)]) + for (id oneValue in [dict allValues]) + if ([self.valueMatcher matches:oneValue]) + return YES; + return NO; +} + +- (void)describeTo:(id )description +{ + [[description appendText:@"a dictionary containing value "] + appendDescriptionOf:self.valueMatcher]; +} + +@end + + +id HC_hasValue(id valueMatcher) +{ + HCRequireNonNilObject(valueMatcher); + return [[HCIsDictionaryContainingValue alloc] initWithValueMatcher:HCWrapInMatcher(valueMatcher)]; +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsEmptyCollection.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsEmptyCollection.h new file mode 100644 index 0000000..c106828 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsEmptyCollection.h @@ -0,0 +1,39 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches empty collections. + */ +@interface HCIsEmptyCollection : HCHasCount + +- (instancetype)init; + +@end + + +FOUNDATION_EXPORT id HC_isEmpty(void); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches any examined object whose -count method + * returns zero. + * + * Example
+ *
assertThat(\@[], isEmpty())
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_isEmpty instead. + */ +static inline id isEmpty(void) +{ + return HC_isEmpty(); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsEmptyCollection.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsEmptyCollection.m new file mode 100644 index 0000000..95cd01a --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsEmptyCollection.m @@ -0,0 +1,33 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsEmptyCollection.h" + +#import "HCIsEqual.h" + + +@implementation HCIsEmptyCollection + +- (instancetype)init +{ + self = [super initWithMatcher:HC_equalTo(@0)]; + return self; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + [[mismatchDescription appendText:@"was "] appendDescriptionOf:item]; +} + +- (void)describeTo:(id )description +{ + [description appendText:@"empty collection"]; +} + +@end + + +FOUNDATION_EXPORT id HC_isEmpty(void) +{ + return [[HCIsEmptyCollection alloc] init]; +} diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsIn.h b/Pods/OCHamcrest/Source/Library/Collection/HCIsIn.h new file mode 100644 index 0000000..703075e --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsIn.h @@ -0,0 +1,43 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches if examined object is contained within the nested collection. + */ +@interface HCIsIn : HCBaseMatcher + +- (instancetype)initWithCollection:(id)collection NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_isIn(id aCollection); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is found within the specified + * collection. + * @param aCollection The collection to search. + * @discussion Invokes -containsObject: on aCollection to determine if the + * examined object is an element of the collection. + * + * Example
+ *
assertThat(\@"foo", isIn(\@@[\@"bar", \@"foo"]))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_isIn instead. + */ +static inline id isIn(id aCollection) +{ + return HC_isIn(aCollection); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Collection/HCIsIn.m b/Pods/OCHamcrest/Source/Library/Collection/HCIsIn.m new file mode 100644 index 0000000..fdce20c --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Collection/HCIsIn.m @@ -0,0 +1,45 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsIn.h" + + +@interface HCIsIn () +@property (nonatomic, strong, readonly) id collection; +@end + +@implementation HCIsIn + +- (instancetype)initWithCollection:(id)collection +{ + if (![collection respondsToSelector:@selector(containsObject:)]) + { + @throw [NSException exceptionWithName:@"NotAContainer" + reason:@"Object must respond to -containsObject:" + userInfo:nil]; + } + + self = [super init]; + if (self) + _collection = collection; + return self; +} + +- (BOOL)matches:(nullable id)item +{ + return [self.collection containsObject:item]; +} + +- (void)describeTo:(id )description +{ + [[description appendText:@"one of "] + appendList:self.collection start:@"{" separator:@", " end:@"}"]; +} + +@end + + +id HC_isIn(id aCollection) +{ + return [[HCIsIn alloc] initWithCollection:aCollection]; +} diff --git a/Pods/OCHamcrest/Source/Library/Decorator/HCDescribedAs.h b/Pods/OCHamcrest/Source/Library/Decorator/HCDescribedAs.h new file mode 100644 index 0000000..5c83ce9 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Decorator/HCDescribedAs.h @@ -0,0 +1,41 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Provides a custom description to another matcher. + */ +@interface HCDescribedAs : HCBaseMatcher + +- (instancetype)initWithDescription:(NSString *)description + forMatcher:(id )matcher + overValues:(NSArray *)templateValues NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_describedAs(NSString *description, id matcher, ...) NS_REQUIRES_NIL_TERMINATION; + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Wraps an existing matcher, overriding its description with that specified. All other + * functions are delegated to the decorated matcher, including its mismatch description. + * @param description The new description for the wrapped matcher. + * @param matcher The matcher to wrap, followed by a comma-separated list of substitution + * values ending with nil. + * @discussion The description may contain substitution placeholders %0, %1, etc. These will be + * replaced by any values that follow the matcher. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_describedAs instead. + */ +#define describedAs(description, matcher, ...) HC_describedAs(description, matcher, ##__VA_ARGS__) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Decorator/HCDescribedAs.m b/Pods/OCHamcrest/Source/Library/Decorator/HCDescribedAs.m new file mode 100644 index 0000000..f716afb --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Decorator/HCDescribedAs.m @@ -0,0 +1,121 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCDescribedAs.h" + + +@interface NSString (OCHamcrest) +@end + +@implementation NSString (OCHamcrest) + +// Parse decimal number (-1 if not found) and return remaining string. +- (NSString *)och_getDecimalNumber:(int *)number +{ + int decimal = 0; + BOOL readDigit = NO; + + NSUInteger length = self.length; + NSUInteger index; + for (index = 0; index < length; ++index) + { + unichar character = [self characterAtIndex:index]; + if (!isdigit(character)) + break; + decimal = decimal * 10 + character - '0'; + readDigit = YES; + } + + if (!readDigit) + { + *number = -1; + return self; + } + *number = decimal; + return [self substringFromIndex:index]; +} + +@end + + +@interface HCDescribedAs () +@property (nonatomic, copy, readonly) NSString *descriptionTemplate; +@property (nonatomic, strong, readonly) id matcher; +@property (nonatomic, copy, readonly) NSArray *values; +@end + +@implementation HCDescribedAs + +- (instancetype)initWithDescription:(NSString *)description + forMatcher:(id )matcher + overValues:(NSArray *)templateValues +{ + self = [super init]; + if (self) + { + _descriptionTemplate = [description copy]; + _matcher = matcher; + _values = [templateValues copy]; + } + return self; +} + +- (BOOL)matches:(nullable id)item +{ + return [self.matcher matches:item]; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + [self.matcher describeMismatchOf:item to:mismatchDescription]; +} + +- (void)describeTo:(id )description +{ + NSArray *components = [self.descriptionTemplate componentsSeparatedByString:@"%"]; + BOOL firstComponent = YES; + for (NSString *component in components) + { + if (firstComponent) + { + firstComponent = NO; + [description appendText:component]; + } + else + { + [self appendTemplateForComponent:component toDescription:description]; + } + } +} + +- (void)appendTemplateForComponent:(NSString *)component toDescription:(id )description +{ + int index; + NSString *remainder = [component och_getDecimalNumber:&index]; + if (index < 0) + [[description appendText:@"%"] appendText:component]; + else + [[description appendDescriptionOf:self.values[(NSUInteger)index]] appendText:remainder]; +} + +@end + + +id HC_describedAs(NSString *description, id matcher, ...) +{ + NSMutableArray *valueList = [NSMutableArray array]; + + va_list args; + va_start(args, matcher); + id value = va_arg(args, id); + while (value != nil) + { + [valueList addObject:value]; + value = va_arg(args, id); + } + va_end(args); + + return [[HCDescribedAs alloc] initWithDescription:description + forMatcher:matcher + overValues:valueList]; +} diff --git a/Pods/OCHamcrest/Source/Library/Decorator/HCIs.h b/Pods/OCHamcrest/Source/Library/Decorator/HCIs.h new file mode 100644 index 0000000..63ad139 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Decorator/HCIs.h @@ -0,0 +1,55 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Decorates another matcher. + */ +@interface HCIs : HCBaseMatcher + +- (instancetype)initWithMatcher:(id )matcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_is(_Nullable id value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Wraps an existing matcher, or provides a shortcut to the frequently + * used is(equalTo(x)). + * @param value The matcher to satisfy, or an expected value for equalTo matching. + * @discussion + * If valueis a matcher, its behavior is retained, but the test may be slightly more + * expressive. For example: + *
    + *
  • assertThat(\@(value), equalTo(\@5))
  • + *
  • assertThat(\@(value), is(equalTo(\@5)))
  • + *
+ * + * If valueis not a matcher, it is wrapped in an equalTo matcher. This makes the + * following statements equivalent: + *
    + *
  • assertThat(cheese, equalTo(smelly))
  • + *
  • assertThat(cheese, is(equalTo(smelly)))
  • + *
  • assertThat(cheese, is(smelly))
  • + *
+ * + * Choose the style that makes your expression most readable. This will vary depending on context. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_is instead. + */ +static inline id is(_Nullable id value) +{ + return HC_is(value); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Decorator/HCIs.m b/Pods/OCHamcrest/Source/Library/Decorator/HCIs.m new file mode 100644 index 0000000..d50db35 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Decorator/HCIs.m @@ -0,0 +1,44 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIs.h" + +#import "HCWrapInMatcher.h" + + +@interface HCIs () +@property (nonatomic, strong, readonly) id matcher; +@end + +@implementation HCIs + +- (instancetype)initWithMatcher:(id )matcher +{ + self = [super init]; + if (self) + _matcher = matcher; + return self; +} + +- (BOOL)matches:(nullable id)item +{ + return [self.matcher matches:item]; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + [self.matcher describeMismatchOf:item to:mismatchDescription]; +} + +- (void)describeTo:(id )description +{ + [description appendDescriptionOf:self.matcher]; +} + +@end + + +id HC_is(_Nullable id value) +{ + return [[HCIs alloc] initWithMatcher:HCWrapInMatcher(value)]; +} diff --git a/Pods/OCHamcrest/Source/Library/Logical/HCAllOf.h b/Pods/OCHamcrest/Source/Library/Logical/HCAllOf.h new file mode 100644 index 0000000..547abb7 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Logical/HCAllOf.h @@ -0,0 +1,64 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Calculates the logical conjunction of multiple matchers. + * @discussion Evaluation is shortcut, so subsequent matchers are not called if an earlier matcher + * returns NO. + */ +@interface HCAllOf : HCDiagnosingMatcher + +- (instancetype)initWithMatchers:(NSArray> *)matchers NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_allOfIn(NSArray> *matchers); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object matches all of the + * specified matchers. + * @param matchers An array of matchers. Any element that is not a matcher is implicitly wrapped in + * an equalTo matcher to check for equality. + * @discussion + * Example
+ *
assertThat(\@"myValue", allOfIn(\@[startsWith(\@"my"), containsSubstring(\@"Val")]))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_allOfIn instead. + */ +static inline id allOfIn(NSArray *matchers) +{ + return HC_allOfIn(matchers); +} +#endif + + +FOUNDATION_EXPORT id HC_allOf(id matchers, ...) NS_REQUIRES_NIL_TERMINATION; + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object matches all of the + * specified matchers. + * @param matchers... A comma-separated list of matchers ending with nil. Any argument + * that is not a matcher is implicitly wrapped in an equalTo matcher to check for equality. + * @discussion + * Example
+ *
assertThat(\@"myValue", allOf(startsWith(\@"my"), containsSubstring(\@"Val"), nil))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_allOf instead. + */ +#define allOf(matchers...) HC_allOf(matchers) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Logical/HCAllOf.m b/Pods/OCHamcrest/Source/Library/Logical/HCAllOf.m new file mode 100644 index 0000000..6c6761a --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Logical/HCAllOf.m @@ -0,0 +1,60 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCAllOf.h" + +#import "HCCollect.h" + + +@interface HCAllOf () +@property (nonatomic, copy, readonly) NSArray> *matchers; +@end + +@implementation HCAllOf + +- (instancetype)initWithMatchers:(NSArray> *)matchers +{ + self = [super init]; + if (self) + _matchers = [matchers copy]; + return self; +} + +- (BOOL)matches:(nullable id)item describingMismatchTo:(id )mismatchDescription +{ + for (id oneMatcher in self.matchers) + { + if (![oneMatcher matches:item]) + { + [[[mismatchDescription appendText:@"instead of "] + appendDescriptionOf:oneMatcher] + appendText:@", "]; + [oneMatcher describeMismatchOf:item to:mismatchDescription]; + return NO; + } + } + return YES; +} + +- (void)describeTo:(id )description +{ + [description appendList:self.matchers start:@"(" separator:@" and " end:@")"]; +} + +@end + + +id HC_allOfIn(NSArray *matchers) +{ + return [[HCAllOf alloc] initWithMatchers:HCWrapIntoMatchers(matchers)]; +} + +id HC_allOf(id matchers, ...) +{ + va_list args; + va_start(args, matchers); + NSArray *array = HCCollectItems(matchers, args); + va_end(args); + + return HC_allOfIn(array); +} diff --git a/Pods/OCHamcrest/Source/Library/Logical/HCAnyOf.h b/Pods/OCHamcrest/Source/Library/Logical/HCAnyOf.h new file mode 100644 index 0000000..8bfe2a6 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Logical/HCAnyOf.h @@ -0,0 +1,62 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Calculates the logical disjunction of multiple matchers. + * @discussion Evaluation is shortcut, so subsequent matchers are not called if an earlier matcher + * returns NO. + */ +@interface HCAnyOf : HCBaseMatcher + +- (instancetype)initWithMatchers:(NSArray> *)matchers NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +FOUNDATION_EXPORT id HC_anyOfIn(NSArray *matchers); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object matches any of the + * specified matchers. + * @param matchers An array of matchers. Any element that is not a matcher is implicitly wrapped in + * an equalTo matcher to check for equality. + * @discussion + * Example
+ *
assertThat(\@"myValue", allOf(\@[startsWith(\@"foo"), containsSubstring(\@"Val")]))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_anyOf instead. + */ +static inline id anyOfIn(NSArray *matchers) +{ + return HC_anyOfIn(matchers); +} +#endif + +FOUNDATION_EXPORT id HC_anyOf(id matchers, ...) NS_REQUIRES_NIL_TERMINATION; + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object matches any of the + * specified matchers. + * @param matchers... A comma-separated list of matchers ending with nil. Any argument + * that is not a matcher is implicitly wrapped in an equalTo matcher to check for equality. + * @discussion + * Example
+ *
assertThat(\@"myValue", allOf(startsWith(\@"foo"), containsSubstring(\@"Val"), nil))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_anyOf instead. + */ +#define anyOf(matchers...) HC_anyOf(matchers) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Logical/HCAnyOf.m b/Pods/OCHamcrest/Source/Library/Logical/HCAnyOf.m new file mode 100644 index 0000000..a575448 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Logical/HCAnyOf.m @@ -0,0 +1,52 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCAnyOf.h" + +#import "HCCollect.h" + + +@interface HCAnyOf () +@property (nonatomic, copy, readonly) NSArray> *matchers; +@end + +@implementation HCAnyOf + +- (instancetype)initWithMatchers:(NSArray> *)matchers +{ + self = [super init]; + if (self) + _matchers = [matchers copy]; + return self; +} + +- (BOOL)matches:(nullable id)item +{ + for (id oneMatcher in self.matchers) + if ([oneMatcher matches:item]) + return YES; + return NO; +} + +- (void)describeTo:(id )description +{ + [description appendList:self.matchers start:@"(" separator:@" or " end:@")"]; +} + +@end + + +id HC_anyOfIn(NSArray *matchers) +{ + return [[HCAnyOf alloc] initWithMatchers:HCWrapIntoMatchers(matchers)]; +} + +id HC_anyOf(id matchers, ...) +{ + va_list args; + va_start(args, matchers); + NSArray *array = HCCollectItems(matchers, args); + va_end(args); + + return HC_anyOfIn(array); +} diff --git a/Pods/OCHamcrest/Source/Library/Logical/HCIsAnything.h b/Pods/OCHamcrest/Source/Library/Logical/HCIsAnything.h new file mode 100644 index 0000000..244004c --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Logical/HCIsAnything.h @@ -0,0 +1,55 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches anything. + */ +@interface HCIsAnything : HCBaseMatcher + +- (instancetype)init; +- (instancetype)initWithDescription:(NSString *)description NS_DESIGNATED_INITIALIZER; + +@end + + +FOUNDATION_EXPORT id HC_anything(void); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that always matches, regardless of the examined object. + * @discussion + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_anything instead. + */ +static inline id anything(void) +{ + return HC_anything(); +} +#endif + + +FOUNDATION_EXPORT id HC_anythingWithDescription(NSString *description); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches anything, regardless of the examined object, but + * describes itself with the specified NSString. + * @param description A meaningful string used to describe this matcher. + * @discussion + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_anything instead. + */ +static inline id anythingWithDescription(NSString *description) +{ + return HC_anythingWithDescription(description); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Logical/HCIsAnything.m b/Pods/OCHamcrest/Source/Library/Logical/HCIsAnything.m new file mode 100644 index 0000000..c790cd9 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Logical/HCIsAnything.m @@ -0,0 +1,47 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsAnything.h" + + +@implementation HCIsAnything +{ + NSString *_description; +} + +- (instancetype)init +{ + self = [self initWithDescription:@"ANYTHING"]; + return self; +} + +- (instancetype)initWithDescription:(NSString *)description +{ + self = [super init]; + if (self) + _description = [description copy]; + return self; +} + +- (BOOL)matches:(nullable id)item +{ + return YES; +} + +- (void)describeTo:(id )aDescription +{ + [aDescription appendText:_description]; +} + +@end + + +id HC_anything() +{ + return [[HCIsAnything alloc] init]; +} + +id HC_anythingWithDescription(NSString *description) +{ + return [[HCIsAnything alloc] initWithDescription:description]; +} diff --git a/Pods/OCHamcrest/Source/Library/Logical/HCIsNot.h b/Pods/OCHamcrest/Source/Library/Logical/HCIsNot.h new file mode 100644 index 0000000..7f0eebb --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Logical/HCIsNot.h @@ -0,0 +1,44 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Calculates the logical negation of a matcher. + */ +@interface HCIsNot : HCBaseMatcher + +- (instancetype)initWithMatcher:(id )matcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_isNot(_Nullable id value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that wraps an existing matcher, but inverts the logic by which it + * will match. + * @param value The matcher to negate, or an expected value to match for inequality. + * @discussion If value is not a matcher, it is implicitly wrapped in an equalTo + * matcher to check for equality, and thus matches for inequality. + * + * Examples
+ *
assertThat(cheese, isNot(equalTo(smelly)))
+ *
assertThat(cheese, isNot(smelly))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_isNot instead. + */ +static inline id isNot(_Nullable id value) +{ + return HC_isNot(value); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Logical/HCIsNot.m b/Pods/OCHamcrest/Source/Library/Logical/HCIsNot.m new file mode 100644 index 0000000..4e54f32 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Logical/HCIsNot.m @@ -0,0 +1,43 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsNot.h" + +#import "HCWrapInMatcher.h" + + +@interface HCIsNot () +@property (nonatomic, strong, readonly) id matcher; +@end + +@implementation HCIsNot + +- (instancetype)initWithMatcher:(id )matcher +{ + self = [super init]; + if (self) + _matcher = matcher; + return self; +} + +- (BOOL)matches:(nullable id)item +{ + return ![self.matcher matches:item]; +} + +- (void)describeTo:(id )description +{ + [[description appendText:@"not "] appendDescriptionOf:self.matcher]; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + [self.matcher describeMismatchOf:item to:mismatchDescription]; +} +@end + + +id HC_isNot(_Nullable id value) +{ + return [[HCIsNot alloc] initWithMatcher:HCWrapInMatcher(value)]; +} diff --git a/Pods/OCHamcrest/Source/Library/Number/HCIsCloseTo.h b/Pods/OCHamcrest/Source/Library/Number/HCIsCloseTo.h new file mode 100644 index 0000000..190264f --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Number/HCIsCloseTo.h @@ -0,0 +1,43 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matchers numbers close to a value, within a delta range. + */ +@interface HCIsCloseTo : HCBaseMatcher + +- (instancetype)initWithValue:(double)value delta:(double)delta NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_closeTo(double value, double delta); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for NSNumbers that matches when the examined number is close to the + * specified value, within the specified delta. + * @param value The expected value of matching numbers. + * @param delta The delta within which matches will be allowed. + * @discussion Invokes -doubleValue on the examined number to get its value. + * + * Example
+ *
assertThat(\@1.03, closeTo(1.0, 0.03)
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_closeTo instead. + */ +static inline id closeTo(double value, double delta) +{ + return HC_closeTo(value, delta); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Number/HCIsCloseTo.m b/Pods/OCHamcrest/Source/Library/Number/HCIsCloseTo.m new file mode 100644 index 0000000..13099b1 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Number/HCIsCloseTo.m @@ -0,0 +1,69 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsCloseTo.h" + + +@interface HCIsCloseTo () +@property (nonatomic, assign, readonly) double value; +@property (nonatomic, assign, readonly) double delta; +@end + +@implementation HCIsCloseTo + +- (id)initWithValue:(double)value delta:(double)delta +{ + self = [super init]; + if (self) + { + _value = value; + _delta = delta; + } + return self; +} + +- (BOOL)matches:(nullable id)item +{ + if ([self itemIsNotNumber:item]) + return NO; + + return [self actualDelta:item] <= self.delta; +} + +- (double)actualDelta:(id)item +{ + return fabs([item doubleValue] - self.value); +} + +- (BOOL)itemIsNotNumber:(id)item +{ + return ![item isKindOfClass:[NSNumber class]]; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + if ([self itemIsNotNumber:item]) + [super describeMismatchOf:item to:mismatchDescription]; + else + { + [[[mismatchDescription appendDescriptionOf:item] + appendText:@" differed by "] + appendDescriptionOf:@([self actualDelta:item])]; + } +} + +- (void)describeTo:(id )description +{ + [[[[description appendText:@"a numeric value within "] + appendDescriptionOf:@(self.delta)] + appendText:@" of "] + appendDescriptionOf:@(self.value)]; +} + +@end + + +id HC_closeTo(double value, double delta) +{ + return [[HCIsCloseTo alloc] initWithValue:value delta:delta]; +} diff --git a/Pods/OCHamcrest/Source/Library/Number/HCIsEqualToNumber.h b/Pods/OCHamcrest/Source/Library/Number/HCIsEqualToNumber.h new file mode 100644 index 0000000..edbce06 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Number/HCIsEqualToNumber.h @@ -0,0 +1,289 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT id HC_equalToChar(char value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified char value. + * @param value The char value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToChar instead. + */ +static inline id equalToChar(char value) +{ + return HC_equalToChar(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToDouble(double value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified double value. + * @param value The double value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToDouble instead. + */ +static inline id equalToDouble(double value) +{ + return HC_equalToDouble(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToFloat(float value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified float value. + * @param value The float value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToFloat instead. + */ +static inline id equalToFloat(float value) +{ + return HC_equalToFloat(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToInt(int value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified int value. + * @param value The int value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToInt instead. + */ +static inline id equalToInt(int value) +{ + return HC_equalToInt(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToLong(long value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified long value. + * @param value The long value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToLong instead. + */ +static inline id equalToLong(long value) +{ + return HC_equalToLong(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToLongLong(long long value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified long long value. + * @param value The long long value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToLongLong instead. + */ +static inline id equalToLongLong(long long value) +{ + return HC_equalToLongLong(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToShort(short value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified short value. + * @param value The short value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToShort instead. + */ +static inline id equalToShort(short value) +{ + return HC_equalToShort(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToUnsignedChar(unsigned char value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract equalToUnsignedChar(value) - + * Creates a matcher that matches when the examined object is equal to an NSNumber created from the + * specified unsigned char value. + * @param value The unsigned char value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToUnsignedChar instead. + */ +static inline id equalToUnsignedChar(unsigned char value) +{ + return HC_equalToUnsignedChar(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToUnsignedInt(unsigned int value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified unsigned int value. + * @param value The unsigned int value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToUnsignedInt instead. + */ +static inline id equalToUnsignedInt(unsigned int value) +{ + return HC_equalToUnsignedInt(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToUnsignedLong(unsigned long value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified unsigned long value. + * @param value The unsigned long value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToUnsignedLong instead. + */ +static inline id equalToUnsignedLong(unsigned long value) +{ + return HC_equalToUnsignedLong(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToUnsignedLongLong(unsigned long long value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified unsigned long long value. + * @param value The unsigned long long value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToUnsignedLongLong instead. + */ +static inline id equalToUnsignedLongLong(unsigned long long value) +{ + return HC_equalToUnsignedLongLong(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToUnsignedShort(unsigned short value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified unsigned short value. + * @param value The unsigned short value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToUnsignedShort instead. + */ +static inline id equalToUnsignedShort(unsigned short value) +{ + return HC_equalToUnsignedShort(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToInteger(NSInteger value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified NSInteger value. + * @param value The NSInteger value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToInteger instead. + */ +static inline id equalToInteger(NSInteger value) +{ + return HC_equalToInteger(value); +} +#endif + + +FOUNDATION_EXPORT id HC_equalToUnsignedInteger(NSUInteger value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to an NSNumber created + * from the specified NSUInteger value. + * @param value The NSUInteger value from which to create an NSNumber. + * @discussion Consider using equalTo(\@(value)) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToUnsignedInteger instead. + */ +static inline id equalToUnsignedInteger(NSUInteger value) +{ + return HC_equalToUnsignedInteger(value); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Number/HCIsEqualToNumber.m b/Pods/OCHamcrest/Source/Library/Number/HCIsEqualToNumber.m new file mode 100644 index 0000000..ea58bb6 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Number/HCIsEqualToNumber.m @@ -0,0 +1,77 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsEqualToNumber.h" + +#import "HCIsEqual.h" + + +FOUNDATION_EXPORT id HC_equalToChar(char value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToDouble(double value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToFloat(float value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToInt(int value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToLong(long value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToLongLong(long long value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToShort(short value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToUnsignedChar(unsigned char value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToUnsignedInt(unsigned int value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToUnsignedLong(unsigned long value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToUnsignedLongLong(unsigned long long value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToUnsignedShort(unsigned short value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToInteger(NSInteger value) +{ + return HC_equalTo(@(value)); +} + +FOUNDATION_EXPORT id HC_equalToUnsignedInteger(NSUInteger value) +{ + return HC_equalTo(@(value)); +} diff --git a/Pods/OCHamcrest/Source/Library/Number/HCIsTrueFalse.h b/Pods/OCHamcrest/Source/Library/Number/HCIsTrueFalse.h new file mode 100644 index 0000000..bfdc9ea --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Number/HCIsTrueFalse.h @@ -0,0 +1,55 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches true values. + */ +@interface HCIsTrue : HCBaseMatcher +@end + +/*! + * @abstract Matches false values. + */ +@interface HCIsFalse : HCBaseMatcher +@end + + +FOUNDATION_EXPORT id HC_isTrue(void); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is an non-zero NSNumber. + * @discussion + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_isTrue instead. + */ +static inline id isTrue(void) +{ + return HC_isTrue(); +} +#endif + + +FOUNDATION_EXPORT id HC_isFalse(void); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is NSNumber zero. + * @discussion + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_isFalse instead. +*/ +static inline id isFalse(void) +{ + return HC_isFalse(); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Number/HCIsTrueFalse.m b/Pods/OCHamcrest/Source/Library/Number/HCIsTrueFalse.m new file mode 100644 index 0000000..ee6c866 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Number/HCIsTrueFalse.m @@ -0,0 +1,55 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsTrueFalse.h" + + +@implementation HCIsTrue + +- (BOOL)matches:(nullable id)item +{ + if (![item isKindOfClass:[NSNumber class]]) + return NO; + + return [item boolValue]; +} + +- (void)describeTo:(id )description +{ + [description appendText:@"true (non-zero)"]; +} + +@end + + +FOUNDATION_EXPORT id HC_isTrue(void) +{ + return [[HCIsTrue alloc] init]; +} + + +#pragma mark - + +@implementation HCIsFalse + +- (BOOL)matches:(nullable id)item +{ + if (![item isKindOfClass:[NSNumber class]]) + return NO; + + return ![item boolValue]; +} + +- (void)describeTo:(id )description +{ + [description appendText:@"false (zero)"]; +} + +@end + + +FOUNDATION_EXPORT id HC_isFalse(void) +{ + return [[HCIsFalse alloc] init]; +} + diff --git a/Pods/OCHamcrest/Source/Library/Number/HCNumberAssert.h b/Pods/OCHamcrest/Source/Library/Number/HCNumberAssert.h new file mode 100644 index 0000000..c6c3f14 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Number/HCNumberAssert.h @@ -0,0 +1,340 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + +@protocol HCMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT void HC_assertThatBoolWithLocation(id testCase, BOOL actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatBool(actual, matcher) \ + HC_assertThatBoolWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatBool(actual, matcher) - + * Asserts that BOOL actual value, converted to an NSNumber, satisfies matcher. + * @param actual The BOOL value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatBool instead. + */ +#define assertThatBool(actual, matcher) HC_assertThatBool(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatCharWithLocation(id testCase, char actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatChar(actual, matcher) \ + HC_assertThatCharWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatChar(actual, matcher) - + * Asserts that char actual value, converted to an NSNumber, satisfies matcher. + * @param actual The char value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatChar instead. + */ +#define assertThatChar(actual, matcher) HC_assertThatChar(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatDoubleWithLocation(id testCase, double actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatDouble(actual, matcher) \ + HC_assertThatDoubleWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract HC_assertThatDouble(actual, matcher) - + * Asserts that double actual value, converted to an NSNumber, satisfies matcher. + * @param actual The double value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatDouble instead. + */ +#define assertThatDouble(actual, matcher) HC_assertThatDouble(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatFloatWithLocation(id testCase, float actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatFloat(actual, matcher) \ + HC_assertThatFloatWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatFloat(actual, matcher) - + * Asserts that float actual value, converted to an NSNumber, satisfies matcher. + * @param actual The float value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatFloat instead. + */ +#define assertThatFloat(actual, matcher) HC_assertThatFloat(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatIntWithLocation(id testCase, int actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatInt(actual, matcher) \ + HC_assertThatIntWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatInt(actual, matcher) - + * Asserts that int actual value, converted to an NSNumber, satisfies matcher. + * @param actual The int value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatInt instead. + */ +#define assertThatInt(actual, matcher) HC_assertThatInt(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatLongWithLocation(id testCase, long actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatLong(actual, matcher) \ + HC_assertThatLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatLong(actual, matcher) - + * Asserts that long actual value, converted to an NSNumber, satisfies matcher. + * @param actual The long value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatLong instead. + */ +#define assertThatLong(actual, matcher) HC_assertThatLong(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatLongLongWithLocation(id testCase, long long actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatLongLong(actual, matcher) \ + HC_assertThatLongLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatLongLong(actual, matcher) - + * Asserts that long long actual value, converted to an NSNumber, satisfies matcher. + * @param actual The long long value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatLongLong instead. + */ +#define assertThatLongLong(actual, matcher) HC_assertThatLongLong(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatShortWithLocation(id testCase, short actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatShort(actual, matcher) \ + HC_assertThatShortWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatShort(actual, matcher) - + * Asserts that short actual value, converted to an NSNumber, satisfies matcher. + * @param actual The short value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatShort instead. + */ +#define assertThatShort(actual, matcher) HC_assertThatShort(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatUnsignedCharWithLocation(id testCase, unsigned char actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatUnsignedChar(actual, matcher) \ + HC_assertThatUnsignedCharWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatUnsignedChar(actual, matcher) - + * Asserts that unsigned char actual value, converted to an NSNumber, satisfies matcher. + * @param actual The unsigned char value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatUnsignedChar instead. + */ +#define assertThatUnsignedChar(actual, matcher) HC_assertThatUnsignedChar(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatUnsignedIntWithLocation(id testCase, unsigned int actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatUnsignedInt(actual, matcher) \ + HC_assertThatUnsignedIntWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatUnsignedInt(actual, matcher) - + * Asserts that unsigned int actual value, converted to an NSNumber, satisfies matcher. + * @param actual The unsigned int value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatUnsignedInt instead. + */ +#define assertThatUnsignedInt(actual, matcher) HC_assertThatUnsignedInt(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatUnsignedLongWithLocation(id testCase, unsigned long actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatUnsignedLong(actual, matcher) \ + HC_assertThatUnsignedLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatUnsignedLong(actual, matcher) - + * Asserts that unsigned long actual value, converted to an NSNumber, satisfies matcher. + * @param actual The unsigned long value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatUnsignedLong instead. + */ +#define assertThatUnsignedLong(actual, matcher) HC_assertThatUnsignedLong(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatUnsignedLongLongWithLocation(id testCase, unsigned long long actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatUnsignedLongLong(actual, matcher) \ + HC_assertThatUnsignedLongLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatUnsignedLongLong(actual, matcher) - + * Asserts that unsigned long long actual value, converted to an NSNumber, satisfies matcher. + * @param actual The unsigned long long value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatUnsignedLongLong instead. + */ +#define assertThatUnsignedLongLong(actual, matcher) HC_assertThatUnsignedLongLong(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatUnsignedShortWithLocation(id testCase, unsigned short actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatUnsignedShort(actual, matcher) \ + HC_assertThatUnsignedShortWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatUnsignedShort(actual, matcher) - + * Asserts that unsigned short actual value, converted to an NSNumber, satisfies matcher. + * @param actual The unsigned short value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatUnsignedShort instead. + */ +#define assertThatUnsignedShort(actual, matcher) HC_assertThatUnsignedShort(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatIntegerWithLocation(id testCase, NSInteger actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatInteger(actual, matcher) \ + HC_assertThatIntegerWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatInteger(actual, matcher) - + * Asserts that NSInteger actual value, converted to an NSNumber, satisfies matcher. + * @param actual The NSInteger value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatInteger instead. + */ +#define assertThatInteger(actual, matcher) HC_assertThatInteger(actual, matcher) +#endif + + +FOUNDATION_EXPORT void HC_assertThatUnsignedIntegerWithLocation(id testCase, NSUInteger actual, + id matcher, char const *fileName, int lineNumber); + +#define HC_assertThatUnsignedInteger(actual, matcher) \ + HC_assertThatUnsignedIntegerWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract assertThatUnsignedInteger(actual, matcher) - + * Asserts that NSUInteger actual value, converted to an NSNumber, satisfies matcher. + * @param actual The NSUInteger value to convert to an NSNumber for evaluation. + * @param matcher The matcher to satisfy as the expected condition. + * @discussion Consider using assertThat(\@(actual), matcher) instead. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_assertThatUnsignedInteger instead. + */ +#define assertThatUnsignedInteger(actual, matcher) HC_assertThatUnsignedInteger(actual, matcher) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Number/HCNumberAssert.m b/Pods/OCHamcrest/Source/Library/Number/HCNumberAssert.m new file mode 100644 index 0000000..1410565 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Number/HCNumberAssert.m @@ -0,0 +1,97 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCNumberAssert.h" + +#import "HCAssertThat.h" + + +FOUNDATION_EXPORT void HC_assertThatBoolWithLocation(id testCase, BOOL actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatCharWithLocation(id testCase, char actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatDoubleWithLocation(id testCase, double actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatFloatWithLocation(id testCase, float actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatIntWithLocation(id testCase, int actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatLongWithLocation(id testCase, long actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatLongLongWithLocation(id testCase, long long actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatShortWithLocation(id testCase, short actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatUnsignedCharWithLocation(id testCase, unsigned char actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatUnsignedIntWithLocation(id testCase, unsigned int actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatUnsignedLongWithLocation(id testCase, unsigned long actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatUnsignedLongLongWithLocation(id testCase, unsigned long long actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatUnsignedShortWithLocation(id testCase, unsigned short actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatIntegerWithLocation(id testCase, NSInteger actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} + +FOUNDATION_EXPORT void HC_assertThatUnsignedIntegerWithLocation(id testCase, NSUInteger actual, + id matcher, char const * fileName, int lineNumber) +{ + HC_assertThatWithLocation(testCase, @(actual), matcher, fileName, lineNumber); +} diff --git a/Pods/OCHamcrest/Source/Library/Number/HCOrderingComparison.h b/Pods/OCHamcrest/Source/Library/Number/HCOrderingComparison.h new file mode 100644 index 0000000..870b35f --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Number/HCOrderingComparison.h @@ -0,0 +1,114 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches values with -compare:. + */ +@interface HCOrderingComparison : HCBaseMatcher + +- (instancetype)initComparing:(id)expectedValue + minCompare:(NSComparisonResult)min + maxCompare:(NSComparisonResult)max + comparisonDescription:(NSString *)comparisonDescription NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_greaterThan(id value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is greater than the specified + * value, as reported by the -compare: method of the examined object. + * @param value The value which, when passed to the -compare: method of the examined + * object, should return NSOrderedAscending. + * @discussion + * Example
+ *
assertThat(\@2, greaterThan(\@1))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_greaterThan instead. + */ +static inline id greaterThan(id value) +{ + return HC_greaterThan(value); +} +#endif + + +FOUNDATION_EXPORT id HC_greaterThanOrEqualTo(id value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is greater than or equal to the + * specified value, as reported by the -compare: method of the examined object. + * @param value The value which, when passed to the -compare: method of the examined + * object, should return NSOrderedAscending or NSOrderedSame. + * @discussion + * Example
+ *
assertThat(\@1, greaterThanOrEqualTo(\@1))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_greaterThanOrEqualTo instead. + */ +static inline id greaterThanOrEqualTo(id value) +{ + return HC_greaterThanOrEqualTo(value); +} +#endif + + +FOUNDATION_EXPORT id HC_lessThan(id value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is less than the specified + * value, as reported by the -compare: method of the examined object. + * @param value The value which, when passed to the -compare: method of the examined + * object, should return NSOrderedDescending. + * @discussion + * Example
+ *
assertThat(\@1, lessThan(\@2))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_lessThan instead. + */ +static inline id lessThan(id value) +{ + return HC_lessThan(value); +} +#endif + + +FOUNDATION_EXPORT id HC_lessThanOrEqualTo(id value); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is less than or equal to the + * specified value, as reported by the -compare: method of the examined object. + * @param value The value which, when passed to the -compare: method of the examined + * object, should return NSOrderedDescending or NSOrderedSame. + * @discussion + * Example
+ *
assertThat(\@1, lessThanOrEqualTo(\@1))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_lessThanOrEqualTo instead. + */ +static inline id lessThanOrEqualTo(id value) +{ + return HC_lessThanOrEqualTo(value); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Number/HCOrderingComparison.m b/Pods/OCHamcrest/Source/Library/Number/HCOrderingComparison.m new file mode 100644 index 0000000..e04eac5 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Number/HCOrderingComparison.m @@ -0,0 +1,97 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCOrderingComparison.h" + + +@interface HCOrderingComparison () +@property (nonatomic, strong, readonly) id expected; +@property (nonatomic, assign, readonly) NSComparisonResult minCompare; +@property (nonatomic, assign, readonly) NSComparisonResult maxCompare; +@property (nonatomic, copy, readonly) NSString *comparisonDescription; +@end + +@implementation HCOrderingComparison + +- (instancetype)initComparing:(id)expectedValue + minCompare:(NSComparisonResult)min + maxCompare:(NSComparisonResult)max + comparisonDescription:(NSString *)description +{ + if (![expectedValue respondsToSelector:@selector(compare:)]) + { + @throw [NSException exceptionWithName: @"UncomparableObject" + reason: @"Object must respond to compare:" + userInfo: nil]; + } + + self = [super init]; + if (self) + { + _expected = expectedValue; + _minCompare = min; + _maxCompare = max; + _comparisonDescription = [description copy]; + } + return self; +} + +- (BOOL)matches:(nullable id)item +{ + if (item == nil) + return NO; + + NSComparisonResult compare; + @try + { + compare = [self.expected compare:item]; + } + @catch (NSException *e) + { + return NO; + } + return self.minCompare <= compare && compare <= self.maxCompare; +} + +- (void)describeTo:(id )description +{ + [[[[description appendText:@"a value "] + appendText:self.comparisonDescription] + appendText:@" "] + appendDescriptionOf:self.expected]; +} + +@end + + +id HC_greaterThan(id value) +{ + return [[HCOrderingComparison alloc] initComparing:value + minCompare:NSOrderedAscending + maxCompare:NSOrderedAscending + comparisonDescription:@"greater than"]; +} + +id HC_greaterThanOrEqualTo(id value) +{ + return [[HCOrderingComparison alloc] initComparing:value + minCompare:NSOrderedAscending + maxCompare:NSOrderedSame + comparisonDescription:@"greater than or equal to"]; +} + +id HC_lessThan(id value) +{ + return [[HCOrderingComparison alloc] initComparing:value + minCompare:NSOrderedDescending + maxCompare:NSOrderedDescending + comparisonDescription:@"less than"]; +} + +id HC_lessThanOrEqualTo(id value) +{ + return [[HCOrderingComparison alloc] initComparing:value + minCompare:NSOrderedSame + maxCompare:NSOrderedDescending + comparisonDescription:@"less than or equal to"]; +} diff --git a/Pods/OCHamcrest/Source/Library/Object/HCArgumentCaptor.h b/Pods/OCHamcrest/Source/Library/Object/HCArgumentCaptor.h new file mode 100644 index 0000000..7aca2c8 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCArgumentCaptor.h @@ -0,0 +1,44 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches anything, capturing all values. + * @discussion This matcher captures all values it was given to match, and always evaluates to + * YES. Use it to capture argument values for further assertions. + * + * Unlike other matchers, this matcher is not idempotent. It should be created outside of any + * expression so that it can be queried for the items it captured. + */ +@interface HCArgumentCaptor : HCIsAnything + +/*! + * @abstract Returns the captured value. + * @discussion If -matches: was called more than once then this property returns the + * last captured value. + * + * If -matches: was never invoked and so no value was captured, this property returns + * nil. But if nil was captured, this property returns NSNull. + */ +@property (nullable, nonatomic, readonly) id value; + +/*! + * @abstract Returns all captured values. + * @discussion Returns an array containing all captured values, in the order in which they were + * captured. nil values are converted to NSNull. + */ +@property (nonatomic, readonly) NSArray *allValues; + +/*! + * @abstract Determines whether subsequent matched values are captured. + * @discussion YES by default. + */ +@property (nonatomic, assign) BOOL captureEnabled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCArgumentCaptor.m b/Pods/OCHamcrest/Source/Library/Object/HCArgumentCaptor.m new file mode 100644 index 0000000..0d17af0 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCArgumentCaptor.m @@ -0,0 +1,56 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCArgumentCaptor.h" + + +@interface HCArgumentCaptor () +@property (nonatomic, strong, readonly) NSMutableArray *values; +@end + +@implementation HCArgumentCaptor + +@dynamic allValues; +@dynamic value; + +- (instancetype)init +{ + self = [super initWithDescription:@""]; + if (self) + { + _values = [[NSMutableArray alloc] init]; + _captureEnabled = YES; + } + return self; +} + +- (BOOL)matches:(nullable id)item +{ + [self capture:item]; + return [super matches:item]; +} + +- (void)capture:(id)item +{ + if (self.captureEnabled) + { + id value = item ?: [NSNull null]; + if ([value conformsToProtocol:@protocol(NSCopying)]) + value = [value copy]; + [self.values addObject:value]; + } +} + +- (id)value +{ + if (!self.values.count) + return nil; + return self.values.lastObject; +} + +- (NSArray *)allValues +{ + return [self.values copy]; +} + +@end diff --git a/Pods/OCHamcrest/Source/Library/Object/HCClassMatcher.h b/Pods/OCHamcrest/Source/Library/Object/HCClassMatcher.h new file mode 100644 index 0000000..acfe479 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCClassMatcher.h @@ -0,0 +1,18 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCClassMatcher : HCBaseMatcher + +@property (nonatomic, strong, readonly) Class theClass; + +- (instancetype)initWithClass:(Class)aClass NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCClassMatcher.m b/Pods/OCHamcrest/Source/Library/Object/HCClassMatcher.m new file mode 100644 index 0000000..fd9d146 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCClassMatcher.m @@ -0,0 +1,43 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCClassMatcher.h" + +#import "HCRequireNonNilObject.h" + + +@interface HCClassMatcher (SubclassResponsibility) +- (NSString *)expectation; +@end + + +@implementation HCClassMatcher + +- (instancetype)initWithClass:(Class)aClass +{ + HCRequireNonNilObject(aClass); + + self = [super init]; + if (self) + _theClass = aClass; + return self; +} + +- (void)describeTo:(id )description +{ + [[description appendText:[self expectation]] + appendText:NSStringFromClass(self.theClass)]; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + [mismatchDescription appendText:@"was "]; + if (item) + { + [[mismatchDescription appendText:NSStringFromClass([item class])] + appendText:@" instance "]; + } + [mismatchDescription appendDescriptionOf:item]; +} + +@end diff --git a/Pods/OCHamcrest/Source/Library/Object/HCConformsToProtocol.h b/Pods/OCHamcrest/Source/Library/Object/HCConformsToProtocol.h new file mode 100644 index 0000000..39b2b41 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCConformsToProtocol.h @@ -0,0 +1,42 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt +// Contribution by Todd Farrell + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches objects that conform to specified protocol. + */ +@interface HCConformsToProtocol : HCBaseMatcher + +- (instancetype)initWithProtocol:(Protocol *)protocol NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_conformsTo(Protocol *aProtocol); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object conforms to the specified + * protocol. + * @param aProtocol The protocol to compare against as the expected protocol. + * @discussion + * Example
+ *
assertThat(myObject, conformsTo(\@protocol(NSCoding))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_conformsTo instead. + */ +static inline id conformsTo(Protocol *aProtocol) +{ + return HC_conformsTo(aProtocol); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCConformsToProtocol.m b/Pods/OCHamcrest/Source/Library/Object/HCConformsToProtocol.m new file mode 100644 index 0000000..06c65c3 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCConformsToProtocol.m @@ -0,0 +1,44 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt +// Contribution by Todd Farrell +// + +#import "HCConformsToProtocol.h" + +#import "HCRequireNonNilObject.h" + + +@interface HCConformsToProtocol () +@property (nonatomic, strong, readonly) Protocol *protocol; +@end + +@implementation HCConformsToProtocol + +- (instancetype)initWithProtocol:(Protocol *)protocol +{ + HCRequireNonNilObject(protocol); + + self = [super init]; + if (self) + _protocol = protocol; + return self; +} + +- (BOOL)matches:(nullable id)item +{ + return [item conformsToProtocol:self.protocol]; +} + +- (void)describeTo:(id )description +{ + [[description appendText:@"an object that conforms to "] + appendText:NSStringFromProtocol(self.protocol)]; +} + +@end + + +id HC_conformsTo(Protocol *aProtocol) +{ + return [[HCConformsToProtocol alloc] initWithProtocol:aProtocol]; +} diff --git a/Pods/OCHamcrest/Source/Library/Object/HCHasDescription.h b/Pods/OCHamcrest/Source/Library/Object/HCHasDescription.h new file mode 100644 index 0000000..3e54309 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCHasDescription.h @@ -0,0 +1,45 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches objects whose description satisfies a nested matcher. + */ +@interface HCHasDescription : HCInvocationMatcher + +- (instancetype)initWithDescription:(id )descriptionMatcher NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithInvocation:(NSInvocation *)anInvocation matching:(id )aMatcher NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_hasDescription(id descriptionMatcher); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object's -description + * satisfies the specified matcher. + * @param descriptionMatcher The matcher used to verify the description result, or an expected value + * for equalTo matching. + * @discussion If descriptionMatcher is not a matcher, it is implicitly wrapped in + * an equalTo matcher to check for equality. + * + * Examples
+ *
assertThat(myObject, hasDescription(equalTo(\@"foo"))
+ *
assertThat(myObject, hasDescription(\@"foo"))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasDescription instead. + */ +static inline id hasDescription(id descriptionMatcher) +{ + return HC_hasDescription(descriptionMatcher); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCHasDescription.m b/Pods/OCHamcrest/Source/Library/Object/HCHasDescription.m new file mode 100644 index 0000000..b44bfab --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCHasDescription.m @@ -0,0 +1,28 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCHasDescription.h" + +#import "HCWrapInMatcher.h" +#import "NSInvocation+OCHamcrest.h" + + +@implementation HCHasDescription + +- (instancetype)initWithDescription:(id )descriptionMatcher +{ + NSInvocation *anInvocation = [NSInvocation och_invocationOnObjectOfType:[NSObject class] + selector:@selector(description)]; + self = [super initWithInvocation:anInvocation matching:descriptionMatcher]; + if (self) + self.shortMismatchDescription = YES; + return self; +} + +@end + + +id HC_hasDescription(id descriptionMatcher) +{ + return [[HCHasDescription alloc] initWithDescription:HCWrapInMatcher(descriptionMatcher)]; +} diff --git a/Pods/OCHamcrest/Source/Library/Object/HCHasProperty.h b/Pods/OCHamcrest/Source/Library/Object/HCHasProperty.h new file mode 100644 index 0000000..51b66b7 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCHasProperty.h @@ -0,0 +1,47 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt +// Contribution by Justin Shacklette + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches objects whose "property" (or simple method) satisfies a nested matcher. + */ +@interface HCHasProperty : HCDiagnosingMatcher + +- (instancetype)initWithProperty:(NSString *)propertyName value:(id )valueMatcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_hasProperty(NSString *propertyName, _Nullable id valueMatcher); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object has an instance method with the + * specified name whose return value satisfies the specified matcher. + * @param propertyName The name of an instance method without arguments that returns an object. + * @param valueMatcher The matcher to satisfy for the return value, or an expected value for + * equalTo matching. + * @discussion Note: While this matcher factory is called "hasProperty", it applies to the return + * values of any instance methods without arguments, not just properties. + * + * Examples
+ *
assertThat(person, hasProperty(\@"firstName", equalTo(\@"Joe")))
+ *
assertThat(person, hasProperty(\@"firstName", \@"Joe"))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_hasProperty instead. + */ +static inline id hasProperty(NSString *propertyName, _Nullable id valueMatcher) +{ + return HC_hasProperty(propertyName, valueMatcher); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCHasProperty.m b/Pods/OCHamcrest/Source/Library/Object/HCHasProperty.m new file mode 100644 index 0000000..8bd7451 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCHasProperty.m @@ -0,0 +1,71 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt +// Contribution by Justin Shacklette + +#import "HCHasProperty.h" + +#import "HCRequireNonNilObject.h" +#import "HCWrapInMatcher.h" +#import "NSInvocation+OCHamcrest.h" + + +@interface HCHasProperty () +@property (nonatomic, copy, readonly) NSString *propertyName; +@property (nonatomic, strong, readonly) id valueMatcher; +@end + +@implementation HCHasProperty + +- (instancetype)initWithProperty:(NSString *)propertyName value:(id )valueMatcher +{ + HCRequireNonNilObject(propertyName); + + self = [super init]; + if (self != nil) + { + _propertyName = [propertyName copy]; + _valueMatcher = valueMatcher; + } + return self; +} + +- (BOOL)matches:(nullable id)item describingMismatchTo:(id )mismatchDescription +{ + SEL propertyGetter = NSSelectorFromString(self.propertyName); + if (![item respondsToSelector:propertyGetter]) + { + [[[[mismatchDescription appendText:@"no "] + appendText:self.propertyName] + appendText:@" on "] + appendDescriptionOf:item]; + return NO; + } + + NSInvocation *getterInvocation = [NSInvocation och_invocationWithTarget:item selector:propertyGetter]; + id propertyValue = [getterInvocation och_invoke]; + BOOL match = [self.valueMatcher matches:propertyValue]; + if (!match) + { + [[[[[mismatchDescription appendText:self.propertyName] + appendText:@" was "] + appendDescriptionOf:propertyValue] + appendText:@" on "] + appendDescriptionOf:item]; + } + return match; +} + +- (void)describeTo:(id )description +{ + [[[[description appendText:@"an object with "] + appendText:self.propertyName] + appendText:@" "] + appendDescriptionOf:self.valueMatcher]; +} +@end + + +id HC_hasProperty(NSString *propertyName, _Nullable id valueMatcher) +{ + return [[HCHasProperty alloc] initWithProperty:propertyName value:HCWrapInMatcher(valueMatcher)]; +} diff --git a/Pods/OCHamcrest/Source/Library/Object/HCIsEqual.h b/Pods/OCHamcrest/Source/Library/Object/HCIsEqual.h new file mode 100644 index 0000000..734ee52 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCIsEqual.h @@ -0,0 +1,41 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Is the value equal to another value, as tested by the -isEqual: method? + */ +@interface HCIsEqual : HCBaseMatcher + +- (instancetype)initEqualTo:(nullable id)expectedValue NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_equalTo(_Nullable id operand); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is equal to the specified + * object, as determined by calling the -isEqual: method on the examined object. + * @param operand The object to compare against as the expected value. + * @discussion If the specified operand is nil, then the created matcher will match if + * the examined object itself is nil, or if the examined object's -isEqual: + * method returns YES when passed a nil. + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalTo instead. + */ +static inline id equalTo(_Nullable id operand) +{ + return HC_equalTo(operand); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCIsEqual.m b/Pods/OCHamcrest/Source/Library/Object/HCIsEqual.m new file mode 100644 index 0000000..a422b0a --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCIsEqual.m @@ -0,0 +1,46 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsEqual.h" + + +@interface HCIsEqual () +@property (nullable, nonatomic, strong, readonly) id expectedValue; +@end + +@implementation HCIsEqual + +- (instancetype)initEqualTo:(nullable id)expectedValue +{ + self = [super init]; + if (self) + _expectedValue = expectedValue; + return self; +} + +- (BOOL)matches:(nullable id)item +{ + if (item == nil) + return self.expectedValue == nil; + return [item isEqual:self.expectedValue]; +} + +- (void)describeTo:(id )description +{ + if ([self.expectedValue conformsToProtocol:@protocol(HCMatcher)]) + { + [[[description appendText:@"<"] + appendDescriptionOf:self.expectedValue] + appendText:@">"]; + } + else + [description appendDescriptionOf:self.expectedValue]; +} + +@end + + +id HC_equalTo(_Nullable id operand) +{ + return [[HCIsEqual alloc] initEqualTo:operand]; +} diff --git a/Pods/OCHamcrest/Source/Library/Object/HCIsInstanceOf.h b/Pods/OCHamcrest/Source/Library/Object/HCIsInstanceOf.h new file mode 100644 index 0000000..1dc0b28 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCIsInstanceOf.h @@ -0,0 +1,37 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches objects that are of a given class or any subclass. + */ +@interface HCIsInstanceOf : HCClassMatcher +@end + + +FOUNDATION_EXPORT id HC_instanceOf(Class expectedClass); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is an instance of, or inherits + * from, the specified class. + * @param expectedClass The class to compare against as the expected class. + * @discussion + * Example
+ *
assertThat(canoe, instanceOf([Canoe class]))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_instanceOf instead. + */ +static inline id instanceOf(Class expectedClass) +{ + return HC_instanceOf(expectedClass); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCIsInstanceOf.m b/Pods/OCHamcrest/Source/Library/Object/HCIsInstanceOf.m new file mode 100644 index 0000000..3f2f34e --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCIsInstanceOf.m @@ -0,0 +1,25 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsInstanceOf.h" + + +@implementation HCIsInstanceOf + +- (BOOL)matches:(nullable id)item +{ + return [item isKindOfClass:self.theClass]; +} + +- (NSString *)expectation +{ + return @"an instance of "; +} + +@end + + +id HC_instanceOf(Class expectedClass) +{ + return [[HCIsInstanceOf alloc] initWithClass:expectedClass]; +} diff --git a/Pods/OCHamcrest/Source/Library/Object/HCIsNil.h b/Pods/OCHamcrest/Source/Library/Object/HCIsNil.h new file mode 100644 index 0000000..feef766 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCIsNil.h @@ -0,0 +1,55 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Is the value nil? + */ +@interface HCIsNil : HCBaseMatcher +@end + + +FOUNDATION_EXPORT id HC_nilValue(void); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is nil. + * @discussion + * Example
+ *
assertThat(myObject, nilValue())
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_nilValue instead. + */ +static inline id nilValue(void) +{ + return HC_nilValue(); +} +#endif + + +FOUNDATION_EXPORT id HC_notNilValue(void); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is not nil. + * @discussion + * Example
+ *
assertThat(myObject, notNilValue())
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_notNilValue instead. + */ +static inline id notNilValue(void) +{ + return HC_notNilValue(); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCIsNil.m b/Pods/OCHamcrest/Source/Library/Object/HCIsNil.m new file mode 100644 index 0000000..cfbc879 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCIsNil.m @@ -0,0 +1,32 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsNil.h" + +#import "HCIsNot.h" + + +@implementation HCIsNil + +- (BOOL)matches:(nullable id)item +{ + return item == nil; +} + +- (void)describeTo:(id )description +{ + [description appendText:@"nil"]; +} + +@end + + +id HC_nilValue() +{ + return [[HCIsNil alloc] init]; +} + +id HC_notNilValue() +{ + return HC_isNot([[HCIsNil alloc] init]); +} diff --git a/Pods/OCHamcrest/Source/Library/Object/HCIsSame.h b/Pods/OCHamcrest/Source/Library/Object/HCIsSame.h new file mode 100644 index 0000000..556f077 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCIsSame.h @@ -0,0 +1,41 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Is the value the same object as another value? + */ +@interface HCIsSame : HCBaseMatcher + +- (instancetype)initSameAs:(nullable id)object NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_sameInstance(_Nullable id expectedInstance); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches only when the examined object is the same instance as + * the specified target object. + * @param expectedInstance The expected instance. + * @discussion + * Example
+ *
assertThat(delegate, sameInstance(expectedDelegate))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_sameInstance instead. + */ +static inline id sameInstance(_Nullable id expectedInstance) +{ + return HC_sameInstance(expectedInstance); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCIsSame.m b/Pods/OCHamcrest/Source/Library/Object/HCIsSame.m new file mode 100644 index 0000000..e584b2e --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCIsSame.m @@ -0,0 +1,46 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsSame.h" + + +@interface HCIsSame () +@property (nonatomic, strong, readonly) id object; +@end + +@implementation HCIsSame + +- (instancetype)initSameAs:(nullable id)object +{ + self = [super init]; + if (self) + _object = object; + return self; +} + +- (BOOL)matches:(nullable id)item +{ + return item == self.object; +} + +- (void)describeMismatchOf:(nullable id)item to:(nullable id )mismatchDescription +{ + [mismatchDescription appendText:@"was "]; + if (item) + [mismatchDescription appendText:[NSString stringWithFormat:@"%p ", (__bridge void *)item]]; + [mismatchDescription appendDescriptionOf:item]; +} + +- (void)describeTo:(id )description +{ + [[description appendText:[NSString stringWithFormat:@"same instance as %p ", (__bridge void *)self.object]] + appendDescriptionOf:self.object]; +} + +@end + + +id HC_sameInstance(_Nullable id expectedInstance) +{ + return [[HCIsSame alloc] initSameAs:expectedInstance]; +} diff --git a/Pods/OCHamcrest/Source/Library/Object/HCIsTypeOf.h b/Pods/OCHamcrest/Source/Library/Object/HCIsTypeOf.h new file mode 100644 index 0000000..f9e1959 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCIsTypeOf.h @@ -0,0 +1,37 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Matches objects that are of a given class. + */ +@interface HCIsTypeOf : HCClassMatcher +@end + + +FOUNDATION_EXPORT id HC_isA(Class expectedClass); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is an instance of the specified + * class, but not of any subclass. + * @param expectedClass The class to compare against as the expected class. + * @discussion + * Example
+ *
assertThat(canoe, isA([Canoe class]))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_isA instead. + */ +static inline id isA(Class expectedClass) +{ + return HC_isA(expectedClass); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCIsTypeOf.m b/Pods/OCHamcrest/Source/Library/Object/HCIsTypeOf.m new file mode 100644 index 0000000..7447a10 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCIsTypeOf.m @@ -0,0 +1,25 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsTypeOf.h" + + +@implementation HCIsTypeOf + +- (BOOL)matches:(nullable id)item +{ + return [item isMemberOfClass:self.theClass]; +} + +- (NSString *)expectation +{ + return @"an exact instance of "; +} + +@end + + +id HC_isA(Class expectedClass) +{ + return [[HCIsTypeOf alloc] initWithClass:expectedClass]; +} diff --git a/Pods/OCHamcrest/Source/Library/Object/HCThrowsException.h b/Pods/OCHamcrest/Source/Library/Object/HCThrowsException.h new file mode 100644 index 0000000..f9b39c5 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCThrowsException.h @@ -0,0 +1,41 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Does executing a block throw an exception which satisfies a nested matcher? + */ +@interface HCThrowsException : HCDiagnosingMatcher + +- (id)initWithExceptionMatcher:(id)exceptionMatcher NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_throwsException(id exceptionMatcher); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is a block which, when + * executed, throws an exception satisfying the specified matcher. + * @param exceptionMatcher The matcher to satisfy when passed the exception. + * @discussion + * Example
+ *
assertThat(^{ [obj somethingBad]; }, throwsException(hasProperty(@"reason", @"EXPECTED REASON")))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_throwsException instead. + */ +static inline id throwsException(id exceptionMatcher) +{ + return HC_throwsException(exceptionMatcher); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Object/HCThrowsException.m b/Pods/OCHamcrest/Source/Library/Object/HCThrowsException.m new file mode 100644 index 0000000..78f5ad0 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Object/HCThrowsException.m @@ -0,0 +1,84 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCThrowsException.h" + + +static void HCRequireMatcher(id obj) +{ + if (![obj conformsToProtocol:@protocol(HCMatcher)]) + { + @throw [NSException exceptionWithName:@"NonMatcher" + reason:@"Must be matcher" + userInfo:nil]; + } +} + + +@interface HCThrowsException() +@property (nonatomic, strong, readonly) id exceptionMatcher; +@end + +@implementation HCThrowsException + +- (id)initWithExceptionMatcher:(id)exceptionMatcher +{ + HCRequireMatcher(exceptionMatcher); + + self = [super init]; + if (self) + _exceptionMatcher = exceptionMatcher; + return self; +} + +- (BOOL)matches:(nullable id)item describingMismatchTo:(id )mismatchDescription +{ + if (![self isBlock:item]) + { + [[mismatchDescription appendText:@"was non-block "] appendDescriptionOf:item]; + return NO; + } + + typedef void (^HCThrowsExceptionBlock)(void); + HCThrowsExceptionBlock block = item; + @try + { + block(); + } + @catch (id exception) + { + BOOL match = [self.exceptionMatcher matches:exception]; + if (!match) + { + [mismatchDescription appendText:@"exception thrown but "]; + [self.exceptionMatcher describeMismatchOf:exception to:mismatchDescription]; + } + return match; + } + + [mismatchDescription appendText:@"no exception thrown"]; + return NO; +} + +- (BOOL)isBlock:(id)item +{ + id block = ^{}; + Class blockClass = [block class]; + while ([blockClass superclass] != [NSObject class]) + blockClass = [blockClass superclass]; + return [item isKindOfClass:blockClass]; +} + +- (void)describeTo:(id )description +{ + [[description appendText:@"a block with no arguments, throwing an exception which is "] + appendDescriptionOf:self.exceptionMatcher]; +} + +@end + + +id HC_throwsException(id exceptionMatcher) +{ + return [[HCThrowsException alloc] initWithExceptionMatcher:exceptionMatcher]; +} diff --git a/Pods/OCHamcrest/Source/Library/Text/HCIsEqualCompressingWhiteSpace.h b/Pods/OCHamcrest/Source/Library/Text/HCIsEqualCompressingWhiteSpace.h new file mode 100644 index 0000000..65a3168 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCIsEqualCompressingWhiteSpace.h @@ -0,0 +1,46 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Tests if a string is equal to another string, when whitespace differences are (mostly) ignored. + */ +@interface HCIsEqualCompressingWhiteSpace : HCBaseMatcher + +- (instancetype)initWithString:(NSString *)string NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_equalToCompressingWhiteSpace(NSString *expectedString); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for NSStrings that matches when the examined string is equal to the + * specified expected string, when whitespace differences are (mostly) ignored. + * @param expectedString The expected value of matched strings. (Must not be nil.) + * @discussion To be exact, the following whitespace rules are applied: + *
    + *
  • all leading and trailing whitespace of both the expectedString and the examined string are ignored
  • + *
  • any remaining whitespace, appearing within either string, is collapsed to a single space before comparison
  • + *
+ * + * Example
+ *
assertThat(\@"   my\tfoo  bar ", equalToCompressingWhiteSpace(\@" my  foo bar"))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToCompressingWhiteSpace instead. + */ +static inline id equalToCompressingWhiteSpace(NSString *expectedString) +{ + return HC_equalToCompressingWhiteSpace(expectedString); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Text/HCIsEqualCompressingWhiteSpace.m b/Pods/OCHamcrest/Source/Library/Text/HCIsEqualCompressingWhiteSpace.m new file mode 100644 index 0000000..a1b52e0 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCIsEqualCompressingWhiteSpace.m @@ -0,0 +1,62 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsEqualCompressingWhiteSpace.h" + +#import "HCRequireNonNilObject.h" + + +static NSString *stripSpaces(NSString *string) +{ + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"\\s+" + options:0 + error:NULL]; + NSString *modifiedString = [regex stringByReplacingMatchesInString:string + options:0 + range:NSMakeRange(0, string.length) + withTemplate:@" "]; + return [modifiedString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; +} + + +@interface HCIsEqualCompressingWhiteSpace () +@property (nonatomic, copy, readonly) NSString *originalString; +@property (nonatomic, copy, readonly) NSString *strippedString; +@end + +@implementation HCIsEqualCompressingWhiteSpace + +- (instancetype)initWithString:(NSString *)string +{ + HCRequireNonNilObject(string); + + self = [super init]; + if (self) + { + _originalString = [string copy]; + _strippedString = [stripSpaces(string) copy]; + } + return self; +} + +- (BOOL)matches:(nullable id)item +{ + if (![item isKindOfClass:[NSString class]]) + return NO; + + return [self.strippedString isEqualToString:stripSpaces(item)]; +} + +- (void)describeTo:(id )description +{ + [[description appendDescriptionOf:self.originalString] + appendText:@" ignoring whitespace"]; +} + +@end + + +id HC_equalToCompressingWhiteSpace(NSString *expectedString) +{ + return [[HCIsEqualCompressingWhiteSpace alloc] initWithString:expectedString]; +} diff --git a/Pods/OCHamcrest/Source/Library/Text/HCIsEqualIgnoringCase.h b/Pods/OCHamcrest/Source/Library/Text/HCIsEqualIgnoringCase.h new file mode 100644 index 0000000..59ff2e8 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCIsEqualIgnoringCase.h @@ -0,0 +1,41 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Tests if a string is equal to another string, regardless of the case. + */ +@interface HCIsEqualIgnoringCase : HCBaseMatcher + +- (instancetype)initWithString:(NSString *)string NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_equalToIgnoringCase(NSString *expectedString); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher for NSStrings that matches when the examined string is equal to the + * specified expected string, ignoring case differences. + * @param expectedString The expected value of matched strings. (Must not be nil.) + * @discussion + * Example
+ *
assertThat(\@"Foo", equalToIgnoringCase(\@"FOO"))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_equalToIgnoringCase instead. + */ +static inline id equalToIgnoringCase(NSString *expectedString) +{ + return HC_equalToIgnoringCase(expectedString); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Text/HCIsEqualIgnoringCase.m b/Pods/OCHamcrest/Source/Library/Text/HCIsEqualIgnoringCase.m new file mode 100644 index 0000000..2bc380d --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCIsEqualIgnoringCase.m @@ -0,0 +1,45 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCIsEqualIgnoringCase.h" + +#import "HCRequireNonNilObject.h" + + +@interface HCIsEqualIgnoringCase () +@property (nonatomic, copy, readonly) NSString *string; +@end + +@implementation HCIsEqualIgnoringCase + +- (instancetype)initWithString:(NSString *)string +{ + HCRequireNonNilObject(string); + + self = [super init]; + if (self) + _string = [string copy]; + return self; +} + +- (BOOL)matches:(nullable id)item +{ + if (![item isKindOfClass:[NSString class]]) + return NO; + + return [self.string caseInsensitiveCompare:item] == NSOrderedSame; +} + +- (void)describeTo:(id )description +{ + [[description appendDescriptionOf:self.string] + appendText:@" ignoring case"]; +} + +@end + + +id HC_equalToIgnoringCase(NSString *expectedString) +{ + return [[HCIsEqualIgnoringCase alloc] initWithString:expectedString]; +} diff --git a/Pods/OCHamcrest/Source/Library/Text/HCStringContains.h b/Pods/OCHamcrest/Source/Library/Text/HCStringContains.h new file mode 100644 index 0000000..a34f0ba --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCStringContains.h @@ -0,0 +1,39 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Tests if string that contains a substring. + */ +@interface HCStringContains : HCSubstringMatcher +@end + + +FOUNDATION_EXPORT id HC_containsSubstring(NSString *substring); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is a string containing the + * specified substring anywhere. + * @param substring The string to search for. (Must not be nil.) + * @discussion The matcher invokes -rangeOfString: on the examined object, passing the + * specified substring and matching if it is found. + * + * Example
+ *
assertThat(\@"myStringOfNote", containsSubstring(\@"ring"))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_containsSubstring instead. + */ +static inline id containsSubstring(NSString *substring) +{ + return HC_containsSubstring(substring); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Text/HCStringContains.m b/Pods/OCHamcrest/Source/Library/Text/HCStringContains.m new file mode 100644 index 0000000..8bc861b --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCStringContains.m @@ -0,0 +1,28 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCStringContains.h" + + +@implementation HCStringContains + +- (BOOL)matches:(nullable id)item +{ + if (![item respondsToSelector:@selector(rangeOfString:)]) + return NO; + + return [item rangeOfString:self.substring].location != NSNotFound; +} + +- (NSString *)relationship +{ + return @"containing"; +} + +@end + + +id HC_containsSubstring(NSString *substring) +{ + return [[HCStringContains alloc] initWithSubstring:substring]; +} diff --git a/Pods/OCHamcrest/Source/Library/Text/HCStringContainsInOrder.h b/Pods/OCHamcrest/Source/Library/Text/HCStringContainsInOrder.h new file mode 100644 index 0000000..b8c8000 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCStringContainsInOrder.h @@ -0,0 +1,62 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Tests if string that contains a list of substrings in relative order. + */ +@interface HCStringContainsInOrder : HCBaseMatcher + +- (instancetype)initWithSubstrings:(NSArray *)substrings NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + + +FOUNDATION_EXPORT id HC_stringContainsInOrderIn(NSArray *substrings); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates matcher for NSStrings that matches when the examined string contains all of the + * specified substrings, considering the order of their appearance. + * @param substrings An array of strings. + * @discussion + * Example
+ *
assertThat(\@"myfoobarbaz", stringContainsInOrderIn(\@[\@"bar", \@"foo"]))
+ * fails as "foo" occurs before "bar" in the string "myfoobarbaz" + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_stringContainsInOrderIn instead. + */ +static inline id stringContainsInOrderIn(NSArray *substrings) +{ + return HC_stringContainsInOrderIn(substrings); +} +#endif + + +FOUNDATION_EXPORT id HC_stringContainsInOrder(NSString *substrings, ...) NS_REQUIRES_NIL_TERMINATION; + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates matcher for NSStrings that matches when the examined string contains all of the + * specified substrings, considering the order of their appearance. + * @param substrings... A comma-separated list of strings, ending with nil. + * @discussion + * Example
+ *
assertThat(\@"myfoobarbaz", stringContainsInOrder(\@"bar", \@"foo", nil))
+ * fails as "foo" occurs before "bar" in the string "myfoobarbaz" + * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_stringContainsInOrder instead. + */ +#define stringContainsInOrder(substrings...) HC_stringContainsInOrder(substrings) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Text/HCStringContainsInOrder.m b/Pods/OCHamcrest/Source/Library/Text/HCStringContainsInOrder.m new file mode 100644 index 0000000..031adbe --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCStringContainsInOrder.m @@ -0,0 +1,78 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCStringContainsInOrder.h" + +#import "HCCollect.h" + + +static void requireElementsToBeStrings(NSArray *array) +{ + for (id element in array) + { + if (![element isKindOfClass:[NSString class]]) + { + @throw [NSException exceptionWithName:@"NotAString" + reason:@"Arguments must be strings" + userInfo:nil]; + } + } +} + + +@interface HCStringContainsInOrder () +@property (nonatomic, copy, readonly) NSArray *substrings; +@end + +@implementation HCStringContainsInOrder + +- (instancetype)initWithSubstrings:(NSArray *)substrings +{ + self = [super init]; + if (self) + { + requireElementsToBeStrings(substrings); + _substrings = [substrings copy]; + } + return self; +} + +- (BOOL)matches:(nullable id)item +{ + if (![item isKindOfClass:[NSString class]]) + return NO; + + NSRange searchRange = NSMakeRange(0, [item length]); + for (NSString *substring in self.substrings) + { + NSRange substringRange = [item rangeOfString:substring options:0 range:searchRange]; + if (substringRange.location == NSNotFound) + return NO; + searchRange.location = substringRange.location + substringRange.length; + searchRange.length = [item length] - searchRange.location; + } + return YES; +} + +- (void)describeTo:(id )description +{ + [description appendList:self.substrings start:@"a string containing " separator:@", " end:@" in order"]; +} + +@end + + +id HC_stringContainsInOrderIn(NSArray *substrings) +{ + return [[HCStringContainsInOrder alloc] initWithSubstrings:substrings]; +} + +id HC_stringContainsInOrder(NSString *substrings, ...) +{ + va_list args; + va_start(args, substrings); + NSArray *array = HCCollectItems(substrings, args); + va_end(args); + + return HC_stringContainsInOrderIn(array); +} diff --git a/Pods/OCHamcrest/Source/Library/Text/HCStringEndsWith.h b/Pods/OCHamcrest/Source/Library/Text/HCStringEndsWith.h new file mode 100644 index 0000000..1e28aaf --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCStringEndsWith.h @@ -0,0 +1,40 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Tests if string ends with a substring. + */ +@interface HCStringEndsWith : HCSubstringMatcher +@end + + +FOUNDATION_EXPORT id HC_endsWith(NSString *suffix); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is a string that ends with the + * specified string. + * @param suffix The substring that the returned matcher will expect at the end of any examined + * string. (Must not be nil.) + * @discussion The matcher invokes -hasSuffix: on the examined object, passing the + * specified suffix. + * + * Example
+ *
assertThat(\@"myStringOfNote", endsWith(\@"Note"))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_endsWith instead. + */ +static inline id endsWith(NSString *suffix) +{ + return HC_endsWith(suffix); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Text/HCStringEndsWith.m b/Pods/OCHamcrest/Source/Library/Text/HCStringEndsWith.m new file mode 100644 index 0000000..aa5acfb --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCStringEndsWith.m @@ -0,0 +1,28 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCStringEndsWith.h" + + +@implementation HCStringEndsWith + +- (BOOL)matches:(nullable id)item +{ + if (![item respondsToSelector:@selector(hasSuffix:)]) + return NO; + + return [item hasSuffix:self.substring]; +} + +- (NSString *)relationship +{ + return @"ending with"; +} + +@end + + +id HC_endsWith(NSString *suffix) +{ + return [[HCStringEndsWith alloc] initWithSubstring:suffix]; +} diff --git a/Pods/OCHamcrest/Source/Library/Text/HCStringStartsWith.h b/Pods/OCHamcrest/Source/Library/Text/HCStringStartsWith.h new file mode 100644 index 0000000..29a6914 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCStringStartsWith.h @@ -0,0 +1,40 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Tests string starts with a substring. + */ +@interface HCStringStartsWith : HCSubstringMatcher +@end + + +FOUNDATION_EXPORT id HC_startsWith(NSString *prefix); + +#ifndef HC_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates a matcher that matches when the examined object is a string that starts with + * the specified string. + * @param prefix The substring that the returned matcher will expect at the start of any examined + * string. (Must not be nil.) + * @discussion The matcher invokes -hasPrefix: on the examined object, passing the + * specified prefix. + * + * Example
+ *
assertThat(\@"myStringOfNote", startsWith(\@"my"))
+ * + * Name Clash
+ * In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym + * HC_startsWith instead. + */ +static inline id startsWith(NSString *prefix) +{ + return HC_startsWith(prefix); +} +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Text/HCStringStartsWith.m b/Pods/OCHamcrest/Source/Library/Text/HCStringStartsWith.m new file mode 100644 index 0000000..98e001e --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCStringStartsWith.m @@ -0,0 +1,28 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCStringStartsWith.h" + + +@implementation HCStringStartsWith + +- (BOOL)matches:(nullable id)item +{ + if (![item respondsToSelector:@selector(hasPrefix:)]) + return NO; + + return [item hasPrefix:self.substring]; +} + +- (NSString *)relationship +{ + return @"starting with"; +} + +@end + + +id HC_startsWith(NSString *prefix) +{ + return [[HCStringStartsWith alloc] initWithSubstring:prefix]; +} diff --git a/Pods/OCHamcrest/Source/Library/Text/HCSubstringMatcher.h b/Pods/OCHamcrest/Source/Library/Text/HCSubstringMatcher.h new file mode 100644 index 0000000..d8abc70 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCSubstringMatcher.h @@ -0,0 +1,18 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +@interface HCSubstringMatcher : HCBaseMatcher + +@property (nonatomic, copy, readonly) NSString *substring; + +- (instancetype)initWithSubstring:(NSString *)substring NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCHamcrest/Source/Library/Text/HCSubstringMatcher.m b/Pods/OCHamcrest/Source/Library/Text/HCSubstringMatcher.m new file mode 100644 index 0000000..34653f4 --- /dev/null +++ b/Pods/OCHamcrest/Source/Library/Text/HCSubstringMatcher.m @@ -0,0 +1,34 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import "HCSubstringMatcher.h" + +#import "HCRequireNonNilObject.h" + + +@interface HCSubstringMatcher (SubclassResponsibility) +- (NSString *)relationship; +@end + + +@implementation HCSubstringMatcher + +- (instancetype)initWithSubstring:(NSString *)substring +{ + HCRequireNonNilObject(substring); + + self = [super init]; + if (self) + _substring = [substring copy]; + return self; +} + +- (void)describeTo:(id )description +{ + [[[[description appendText:@"a string "] + appendText:[self relationship]] + appendText:@" "] + appendDescriptionOf:self.substring]; +} + +@end diff --git a/Pods/OCHamcrest/Source/OCHamcrest.h b/Pods/OCHamcrest/Source/OCHamcrest.h new file mode 100644 index 0000000..91bed59 --- /dev/null +++ b/Pods/OCHamcrest/Source/OCHamcrest.h @@ -0,0 +1,59 @@ +// OCHamcrest by Jon Reid, https://qualitycoding.org/ +// Copyright 2019 hamcrest.org. See LICENSE.txt + +#import + +FOUNDATION_EXPORT double OCHamcrestVersionNumber; +FOUNDATION_EXPORT const unsigned char OCHamcrestVersionString[]; + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +// Carthage workaround: Include transitive public headers +#import +#import +#import +#import +#import diff --git a/Pods/OCMockito/LICENSE.txt b/Pods/OCMockito/LICENSE.txt new file mode 100644 index 0000000..bac00e2 --- /dev/null +++ b/Pods/OCMockito/LICENSE.txt @@ -0,0 +1,35 @@ +OCMockito by Jon Reid, https://qualitycoding.org/ +Copyright 2020 Quality Coding, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +(MIT License) + +----- + +TPDWeakProxy: + +The MIT License (MIT) + +Copyright © 2013 Tetherpad + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Pods/OCMockito/README.md b/Pods/OCMockito/README.md new file mode 100644 index 0000000..797dce4 --- /dev/null +++ b/Pods/OCMockito/README.md @@ -0,0 +1,415 @@ +![mockito](https://raw.githubusercontent.com/mockito/mockito.github.io/master/img/logo.png) + +[![Build Status](https://travis-ci.org/jonreid/OCMockito.svg?branch=master)](https://travis-ci.org/jonreid/OCMockito) +[![Coverage Status](https://coveralls.io/repos/jonreid/OCMockito/badge.svg?branch=master)](https://coveralls.io/r/jonreid/OCMockito?branch=master) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Cocoapods Version](https://cocoapod-badges.herokuapp.com/v/OCMockito/badge.png)](http://cocoapods.org/pods/OCMockito) +[![Twitter Follow](https://img.shields.io/twitter/follow/qcoding.svg?style=social)](https://twitter.com/qcoding) + + +OCMockito is an Objective-C implementation of Mockito, supporting creation, +verification and stubbing of mock objects. + +Key differences from other mocking frameworks: + +* Mock objects are always "nice," recording their calls instead of throwing + exceptions about unspecified invocations. This makes tests less fragile. + +* No expect-run-verify, making tests more readable. Mock objects record their + calls, then you verify the methods you want. + +* Verification failures are reported as unit test failures, identifying specific + lines instead of throwing exceptions. This makes it easier to identify + failures. + + +Let's verify some behavior! +--------------------------- + +```obj-c +// mock creation +NSMutableArray *mockArray = mock([NSMutableArray class]); + +// using mock object +[mockArray addObject:@"one"]; +[mockArray removeAllObjects]; + +// verification +[verify(mockArray) addObject:@"one"]; +[verify(mockArray) removeAllObjects]; +``` + +Once created, the mock will remember all interactions. Then you can selectively +verify whatever interactions you are interested in. + +(If Xcode complains about multiple methods with the same name, cast `verify` +to the mocked class.) + + +How about some stubbing? +------------------------ + +```obj-c +// mock creation +NSArray *mockArray = mock([NSArray class]); + +// stubbing +[given([mockArray objectAtIndex:0]) willReturn:@"first"]; +[given([mockArray objectAtIndex:1]) willThrow:[NSException exceptionWithName:@"name" + reason:@"reason" + userInfo:nil]]; + +// following prints "first" +NSLog(@"%@", [mockArray objectAtIndex:0]); + +// follows throws exception +NSLog(@"%@", [mockArray objectAtIndex:1]); + +// following prints "(null)" because objectAtIndex:999 was not stubbed +NSLog(@"%@", [mockArray objectAtIndex:999]); +``` + + +How do you mock a class object? +------------------------------- + +```obj-c +__strong Class mockStringClass = mockClass([NSString class]); +``` + +(In the iOS 64-bit runtime, Class objects aren't strong by default. Either make +it explicitly strong as shown above, or use `id` instead.) + + +How do you mock a protocol? +--------------------------- + +```obj-c +id delegate = mockProtocol(@protocol(MyDelegate)); +``` + +Or, if you don't want it to contain any optional methods: + +```obj-c +id delegate = mockProtocolWithoutOptionals(@protocol(MyDelegate)); +``` + + +How do you mock an object that also implements a protocol? +---------------------------------------------------------- + +```obj-c +UIViewController *controller = + mockObjectAndProtocol([UIViewController class], @protocol(CustomProtocol)); +``` + + +How do you stub methods that return primitives? +----------------------------------------------- + +To stub methods that return primitive scalars, box the scalars into NSValues: + +```obj-c +[given([mockArray count]) willReturn:@3]; +``` + + +How do you stub methods that return structs? +-------------------------------------------- + +Use `willReturnStruct:objCType:` passing a pointer to your structure and its +type from the Objective-C `@encode()` compiler directive: + +```obj-c +SomeStruct aStruct = {...}; +[given([mockObject methodReturningStruct]) willReturnStruct:&aStruct + objCType:@encode(SomeStruct)]; +``` + + +How do you stub a property so that KVO works? +--------------------------------------------- + +Use `stubProperty(mock, property, stubbedValue)`. For example, say you have a +mock object named `mockEmployee`. It has a property `firstName`. You want to +stub it to return the value "FIRST-NAME": + +```obj-c +stubProperty(mockEmployee, firstName, @"FIRST-NAME"); +``` + +This stubs the `firstName` property, `valueForKey:` and `valueForKeyPath:`. + + +Argument matchers +----------------- + +OCMockito verifies argument values by testing for equality. But when extra +flexibility is required, you can specify + [OCHamcrest](https://github.com/hamcrest/OCHamcrest) matchers. + +```obj-c +// mock creation +NSMutableArray *mockArray = mock([NSMutableArray class]); + +// using mock object +[mockArray removeObject:@"This is a test"]; + +// verification +[verify(mockArray) removeObject:startsWith(@"This is")]; +``` + +OCHamcrest matchers can be specified as arguments for both verification and +stubbing. + +Typed arguments will issue a warning that the matcher is the wrong type. Just +cast the matcher to `id`. + + +How do you specify matchers for non-object arguments? +----------------------------------------------------- + +To stub a method that takes a non-object argument but specify a matcher, invoke +the method with a dummy argument, then call `-withMatcher:forArgument:` + +```obj-c +[[given([mockArray objectAtIndex:0]) withMatcher:anything() forArgument:0] + willReturn:@"foo"]; +``` + +This is particularly useful for ignoring `NSError **` parameters: pass in `NULL`, but override it with an `anything()` matcher. + +Use the shortcut `-withMatcher:` to specify a matcher for a single argument: + +```obj-c +[[given([mockArray objectAtIndex:0]) withMatcher:anything()] + willReturn:@"foo"]; +``` + +These methods are also available to specify matchers for verification. Just call +them after `verify(…)` but before the invocation you want to verify: + +```obj-c +[[verify(mockArray) withMatcher:greaterThan(@5])] removeObjectAtIndex:0]; +``` + + +Verifying exact number of invocations / at least x / never +---------------------------------------------------------- + +```obj-c +// using mock +[mockArray addObject:@"once"]; + +[mockArray addObject:@"twice"]; +[mockArray addObject:@"twice"]; + +// the following two verifications work exactly the same +[verify(mockArray) addObject:@"once"]; +[verifyCount(mockArray, times(1)) addObject:@"once"]; + +// verify exact number of invocations +[verifyCount(mockArray, times(2)) addObject:@"twice"]; +[verifyCount(mockArray, times(3)) addObject:@"three times"]; + +// verify using never(), which is an alias for times(0) +[verifyCount(mockArray, never()) addObject:@"never happened"]; + +// verify using atLeast()/atMost() +[verifyCount(mockArray, atLeastOnce()) addObject:@"at least once"]; +[verifyCount(mockArray, atLeast(2)) addObject:@"at least twice"]; +[verifyCount(mockArray, atMost(5)) addObject:@"at most five times"]; +``` + + +Capturing arguments for further assertions +------------------------------------------ + +OCMockito verifies argument values using OCHamcrest matchers; non-matcher +arguments are implicitly wrapped in the `equalTo` matcher to test for equality. +In some situations though, it's helpful to capture an argument so you can send +it another message. + +OCHamcrest provides a special matcher for this purpose: HCArgumentCaptor. +Specify it as an argument, then query it with either the `value` or `allValues` +properties. + +For example, you may want to send the captured argument a message to query its +state: + +```obj-c +HCArgumentCaptor *argument = [[HCArgumentCaptor alloc] init]; +[verify(mockObject) doSomething:(id)argument]; +assertThat([argument.value nameAtIndex:0], is(@"Jon")); +``` + +Capturing arguments is especially handy for block arguments. Capture the +argument, cast it to the block type, then invoke the block directly to simulate +the ways it will be called by production code: + +```obj-c +HCArgumentCaptor *argument = [[HCArgumentCaptor alloc] init]; +[verify(mockArray) sortUsingComparator:(id)argument]; +NSComparator block = argument.value; +assertThat(@(block(@"a", @"z")), is(@(NSOrderedAscending))); +``` + + +Stubbing consecutive calls +-------------------------- + +```obj-c +[[given([mockObject someMethod:@"some arg"]) + willThrow:[NSException exceptionWithName:@"name" reason:@"reason" userInfo:nil]] + willReturn:@"foo"]; + +// First call: throws exception +[mockObject someMethod:@"some arg"]; + +// Second call: prints "foo" +NSLog(@"%@", [mockObject someMethod:@"some arg"]); + +// Any consecutive call: prints "foo" as well. (Last stubbing wins.) +NSLog(@"%@", [mockObject someMethod:@"some arg"]); +``` + + +Stubbing with blocks +-------------------- + +We recommend using simple stubbing with `willReturn:` or `willThrow:` only. But +`willDo:` using a block can sometimes be helpful. The block can easily access +invocation arguments by calling `mkt_arguments` from NSInvocation+OCMockito.h. +Whatever the block returns will be used as the stubbed return value. + +```obj-c +[given([mockObject someMethod:anything()]) willDo:^id (NSInvocation *invocation){ + NSArray *args = [invocation mkt_arguments]; + return @([args[0] intValue] * 2); +}]; + +// Following prints 4 +NSLog(@"%@", [mockObject someMethod:@2]); +``` + +You can stub a void method with a block by using `givenVoid` instead of `given`. + + +Problems with dealloc +--------------------- + +Use `stopMocking(…)` if a `-dealloc` of your System Under Test is trying to +message an object that is mocked. It disables message handling on the mock and +frees its retained arguments. This prevents retain cycles and crashes during +test clean-up. See StopMockingTests.m for an example. + + +How do you mock a singleton? +---------------------------- + +The short answer is: Don't. Instead of your class deciding who it's going to +talk to, inject those dependencies. + +The longer answer is: Well. Legacy code. Call `stubSingleton` on a mock class +object, specifying the name of the factory method. + +```obj-c +__strong Class mockUserDefaultsClass = mockClass([NSUserDefaults class]); +NSUserDefaults* mockDefaults = mock([NSUserDefaults class]); + +stubSingleton(mockUserDefaultsClass, standardUserDefaults); +[given([NSUserDefaults standardUserDefaults]) willReturn:mockDefaults]; +``` + +Beware! This uses swizzling. You need to make sure the mock class object gets +deallocated so that the swizzling is undone. + +In the example above, `mockUserDefaultsClass` will go out scope and be +destroyed. But what if you kept it in the test fixture, as an ivar or a +property? According to XCTest's design, it won't be implicitly destroyed. +You need to explicitly set it to nil in `-tearDown`, or the swizzling will +bleed over to your other tests, compromising their integrity. + +If you need more control over when the swizzling is undone, call +`stopMocking(…)` on the mock class. + + +How do I add OCMockito to my project? +------------------------------------- + +The Examples folder shows projects using OCMockito either through CocoaPods or +through the prebuilt frameworks, for iOS and macOS development. + +### CocoaPods + +If you want to add OCMockito using Cocoapods then add the following dependency +to your Podfile. Most people will want OCMockito in their test targets, and not +include any pods from their main targets: + +```ruby +target 'MyTests' do + inherit! :search_paths + use_frameworks! + pod 'OCMockito', '~> 5.0' +end +``` + +Use the following imports: + + @import OCHamcrest; + @import OCMockito; + +### Carthage + +Add the following to your Cartfile: + +``` +github "jonreid/OCMockito" ~> 5.0 +``` + +Then drag the the built frameworks (both OCHamcrest and OCMockito) from the +appropriate Carthage/Build directory into your project, but with "Copy items +into destination group's folder" disabled. + +### Prebuilt Frameworks + +Prebuilt binaries are available on GitHub for +[OCMockito](https://github.com/jonreid/OCMockito/releases/). You will also need +[OCHamcrest](https://github.com/hamcrest/OCHamcrest/releases/). +The binaries are packaged as frameworks: + +* __OCMockitoIOS.framework__ for iOS development +* __OCMockito.framework__ for macOS development + +OCHamcrest comes in a similar scheme. Drag the appropriate frameworks for both +both OCMockito and OCHamcrest into your project, specifying "Copy items into +destination group's folder". Then specify `-ObjC` in your "Other Linker Flags". + +#### iOS Development: + +Use the following imports: + + @import OCHamcrestIOS; + @import OCMockitoIOS; + + +#### macOS Development: + +Add a "Copy Files" build phase to copy OCMockito.framework and +OCHamcrest.framework to your Products Directory. + +Use the following imports: + + @import OCHamcrest; + @import OCMockito; + + +### Build Your Own + +If you want to build OCMockito yourself, clone the repo, then + +```sh +$ Frameworks/gethamcrest +$ cd Source +$ ./MakeDistribution.sh +``` diff --git a/Pods/OCMockito/Source/OCMockito/Core/MKTMockingProgress.h b/Pods/OCMockito/Source/OCMockito/Core/MKTMockingProgress.h new file mode 100644 index 0000000..281e764 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Core/MKTMockingProgress.h @@ -0,0 +1,35 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +#import "MKTTestLocation.h" + +@class MKTInvocationMatcher; +@class MKTOngoingStubbing; +@protocol HCMatcher; +@protocol MKTVerificationMode; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTMockingProgress : NSObject + +@property (nonatomic, assign, readonly) MKTTestLocation testLocation; + ++ (instancetype)sharedProgress; +- (void)reset; + +- (void)stubbingStartedAtLocation:(MKTTestLocation)location; +- (void)reportOngoingStubbing:(MKTOngoingStubbing *)ongoingStubbing; +- (MKTOngoingStubbing *)pullOngoingStubbing; + +- (void)verificationStarted:(id )mode atLocation:(MKTTestLocation)location; +- (id )pullVerificationMode; + +- (void)setMatcher:(id )matcher forArgument:(NSUInteger)index; +- (MKTInvocationMatcher *)pullInvocationMatcher; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Core/MKTMockingProgress.m b/Pods/OCMockito/Source/OCMockito/Core/MKTMockingProgress.m new file mode 100644 index 0000000..f7edc48 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Core/MKTMockingProgress.m @@ -0,0 +1,87 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTMockingProgress.h" + +#import "MKTInvocationMatcher.h" +#import "MKTOngoingStubbing.h" +#import "MKTVerificationMode.h" + + +@interface MKTMockingProgress () +@property (nonatomic, assign, readwrite) MKTTestLocation testLocation; +@property (nonatomic, strong) MKTInvocationMatcher *invocationMatcher; +@property (nonatomic, strong) id verificationMode; +@property (nonatomic, strong) MKTOngoingStubbing *ongoingStubbing; +@end + +@implementation MKTMockingProgress + ++ (instancetype)sharedProgress +{ + static id sharedProgress = nil; + if (!sharedProgress) + sharedProgress = [[self alloc] init]; + return sharedProgress; +} + +- (void)reset +{ + self.invocationMatcher = nil; + self.verificationMode = nil; + self.ongoingStubbing = nil; +} + +- (void)stubbingStartedAtLocation:(MKTTestLocation)location +{ + [self setTestLocation:location]; +} + +- (void)reportOngoingStubbing:(MKTOngoingStubbing *)ongoingStubbing +{ + self.ongoingStubbing = ongoingStubbing; +} + +- (MKTOngoingStubbing *)pullOngoingStubbing +{ + MKTOngoingStubbing *result = self.ongoingStubbing; + self.ongoingStubbing = nil; + return result; +} + +- (void)verificationStarted:(id )mode atLocation:(MKTTestLocation)location +{ + self.verificationMode = mode; + [self setTestLocation:location]; +} + +- (id )pullVerificationMode +{ + id result = self.verificationMode; + self.verificationMode = nil; + return result; +} + +- (void)setMatcher:(id )matcher forArgument:(NSUInteger)index +{ + if (!self.invocationMatcher) + self.invocationMatcher = [[MKTInvocationMatcher alloc] init]; + [self.invocationMatcher setMatcher:matcher atIndex:index]; +} + +- (MKTInvocationMatcher *)pullInvocationMatcher +{ + MKTInvocationMatcher *result = self.invocationMatcher; + self.invocationMatcher = nil; + return result; +} + +- (void)setOngoingStubbing:(MKTOngoingStubbing *)ongoingStubbing +{ + @synchronized (self) + { + _ongoingStubbing = ongoingStubbing; + } +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Core/MKTMockitoCore.h b/Pods/OCMockito/Source/OCMockito/Core/MKTMockitoCore.h new file mode 100644 index 0000000..8af043e --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Core/MKTMockitoCore.h @@ -0,0 +1,27 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +#import "MKTTestLocation.h" + +@class MKTObjectMock; +@class MKTOngoingStubbing; +@protocol MKTVerificationMode; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTMockitoCore : NSObject + ++ (instancetype)sharedCore; + +- (MKTOngoingStubbing *)stubAtLocation:(MKTTestLocation)location; + +- (id)verifyMock:(MKTObjectMock *)mock + withMode:(id )mode + atLocation:(MKTTestLocation)location; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Core/MKTMockitoCore.m b/Pods/OCMockito/Source/OCMockito/Core/MKTMockitoCore.m new file mode 100644 index 0000000..1491402 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Core/MKTMockitoCore.m @@ -0,0 +1,51 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTMockitoCore.h" + +#import "MKTMockingProgress.h" +#import "MKTVerificationMode.h" + + +@interface MKTMockitoCore () +@property (nonatomic, strong, readonly) MKTMockingProgress *mockingProgress; +@end + +@implementation MKTMockitoCore + ++ (instancetype)sharedCore +{ + static id sharedCore = nil; + if (!sharedCore) + sharedCore = [[self alloc] init]; + return sharedCore; +} + +- (instancetype)init +{ + self = [super init]; + if (self) + _mockingProgress = [MKTMockingProgress sharedProgress]; + return self; +} + +- (MKTOngoingStubbing *)stubAtLocation:(MKTTestLocation)location +{ + [self.mockingProgress stubbingStartedAtLocation:location]; + return [self stub]; +} + +- (MKTOngoingStubbing *)stub +{ + return [self.mockingProgress pullOngoingStubbing]; +} + +- (id)verifyMock:(MKTObjectMock *)mock + withMode:(id )mode + atLocation:(MKTTestLocation)location +{ + [self.mockingProgress verificationStarted:mode atLocation:location]; + return mock; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Core/MKTNonObjectArgumentMatching.h b/Pods/OCMockito/Source/OCMockito/Core/MKTNonObjectArgumentMatching.h new file mode 100644 index 0000000..8f515cf --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Core/MKTNonObjectArgumentMatching.h @@ -0,0 +1,44 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +@protocol HCMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Ability to specify OCHamcrest matchers for non-object arguments. + */ +@protocol MKTNonObjectArgumentMatching + +/*! + * @abstract Specifies OCHamcrest matcher for a specific argument of a method. + * @discussion For methods arguments that take objects, just pass the matcher directly as a method + * call. But for arguments that take non-objects, pass in a dummy value to satisfy the compiler, but + * call this to override it with the given matcher. Upon verification, the actual argument received + * will be converted to an object before being checked by the matcher. + * + * The argument index is 0-based, so the first argument of a method has index 0. + * + * Examples: + *
[[given([mockFetchedResultsController performFetch:NULL]) withMatcher:anything()] willReturn:\@YES];
+ * This stubs performFetch: to return YES for any NSError ** argument. + * + *
[[verify(mockArray) withMatcher:greaterThan(@5]) forArgument:0] removeObjectAtIndex:0];
+ * This verifies that removeObjectAtIndex: was called with an index greater than 5. + */ +- (id)withMatcher:(id )matcher forArgument:(NSUInteger)index; + +/*! + * @abstract Specifies OCHamcrest matcher for the first argument of a method. + * @discussion Equivalent to withMatcher:matcher forArgument:0. + * + * Example: + *
[[verify(mockArray) withMatcher:greaterThan(\@5)] removeObjectAtIndex:0];
+ * This verifies that removeObjectAtIndex: was called with an index greater than 5. +*/ +- (id)withMatcher:(id )matcher; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Core/MKTTestLocation.h b/Pods/OCMockito/Source/OCMockito/Core/MKTTestLocation.h new file mode 100644 index 0000000..57195e3 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Core/MKTTestLocation.h @@ -0,0 +1,29 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +typedef struct +{ + __unsafe_unretained id testCase; + const char *fileName; + int lineNumber; +} MKTTestLocation; + + +static inline MKTTestLocation MKTTestLocationMake(id test, const char *file, int line) +{ + MKTTestLocation location; + location.testCase = test; + location.fileName = file; + location.lineNumber = line; + return location; +} + +void MKTFailTest(id testCase, const char *fileName, int lineNumber, NSString *description); +void MKTFailTestLocation(MKTTestLocation testLocation, NSString *description); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Core/MKTTestLocation.m b/Pods/OCMockito/Source/OCMockito/Core/MKTTestLocation.m new file mode 100644 index 0000000..4c0b8c5 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Core/MKTTestLocation.m @@ -0,0 +1,23 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTTestLocation.h" + +#import +#import +#import + +void MKTFailTest(id testCase, const char *fileName, int lineNumber, NSString *description) +{ + HCTestFailure *failure = [[HCTestFailure alloc] initWithTestCase:testCase + fileName:[NSString stringWithUTF8String:fileName] + lineNumber:(NSUInteger)lineNumber + reason:description]; + HCTestFailureReporter *failureReporter = [HCTestFailureReporterChain reporterChain]; + [failureReporter handleFailure:failure]; +} + +void MKTFailTestLocation(MKTTestLocation testLocation, NSString *description) +{ + MKTFailTest(testLocation.testCase, testLocation.fileName, testLocation.lineNumber, description); +} diff --git a/Pods/OCMockito/Source/OCMockito/Core/OCMockito.h b/Pods/OCMockito/Source/OCMockito/Core/OCMockito.h new file mode 100644 index 0000000..e9bea65 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Core/OCMockito.h @@ -0,0 +1,402 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +FOUNDATION_EXPORT double OCMockitoVersionNumber; +FOUNDATION_EXPORT const unsigned char OCMockitoVersionString[]; + +#import +#import + +// Explicitly import transitive headers for complete "umbrella header" +#import +#import +#import +#import +#import + +@protocol MKTVerificationMode; + + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT id MKTMock(Class classToMock); + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates mock object of given class. + * @param classToMock The class for which to mock instance methods. + * @discussion The mock object will handle all instance methods of classToMock. Methods + * return 0 by default.
+ * Use given to stub different return values or behaviors.
+ * Use givenVoid to stub behaviors of void methods. + * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTMock instead. + */ +static inline id mock(Class classToMock) +{ + return MKTMock(classToMock); +} +#endif + + +FOUNDATION_EXPORT id MKTMockClass(Class classToMock); + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates mock class object of given class. + * @param classToMock The class for which to mock class methods. + * @discussion The mock object will handle all class methods of classToMock. Methods + * return 0 by default.
+ * Use given to stub different return values or behaviors.
+ * Use givenVoid to stub behaviors of void methods. + * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTMockClass instead. + */ +static inline id mockClass(Class classToMock) +{ + return MKTMockClass(classToMock); +} +#endif + + +FOUNDATION_EXPORT id MKTMockProtocol(Protocol *protocolToMock); + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates mock object of given protocol. + * @param protocolToMock The protocol to mock. + * @discussion The mock object will handle all methods of protocolToMock. Methods + * return 0 by default.
+ * Use given to stub different return values or behaviors.
+ * Use givenVoid to stub behaviors of void methods. + * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTMockProtocol instead. + */ +static inline id mockProtocol(Protocol *protocolToMock) +{ + return MKTMockProtocol(protocolToMock); +} +#endif + + +FOUNDATION_EXPORT id MKTMockProtocolWithoutOptionals(Protocol *protocolToMock); + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates mock object of given protocol, but without optional methods. + * @param protocolToMock The protocol to mock. + * @discussion The mock object will handle only required methods of protocolToMock. It + * will not respond to the protocol's optional methods. Methods return 0 by default.
+ * Use given to stub different return values or behaviors.
+ * Use givenVoid to stub behaviors of void methods. + * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTMockProtocolWithoutOptionals instead. +*/ +static inline id mockProtocolWithoutOptionals(Protocol *protocolToMock) +{ + return MKTMockProtocolWithoutOptionals(protocolToMock); +} +#endif + + +FOUNDATION_EXPORT id MKTMockObjectAndProtocol(Class classToMock, Protocol *protocolToMock); + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates mock object of given class that also implements given protocol. + * @param classToMock The class to mock. + * @param protocolToMock The protocol to mock. + * @discussion The mock object will handle all instance methods of classToMock, along + * with all methods of protocolToMock. Methods return 0 by default.
+ * Use given to stub different return values or behaviors.
+ * Use givenVoid to stub behaviors of void methods. + * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTMockObjectAndProtocol instead. + */ +static inline id mockObjectAndProtocol(Class classToMock, Protocol *protocolToMock) +{ + return MKTMockObjectAndProtocol(classToMock, protocolToMock); +} +#endif + + +FOUNDATION_EXPORT MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fileName, int lineNumber, ...); +#define MKTGiven(methodCall) MKTGivenWithLocation(self, __FILE__, __LINE__, methodCall) + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Stubs a method call. + * @discussion Creates an MKTOngoingStubbing used for any matching method calls. Call + * MKTOngoingStubbing methods to define the stub's return value or behavior. + * + * Method arguments are matched with specified OCHamcrest matchers. Any argument that is not a + * matcher is implicitly wrapped in equalTo to match for equality. + * + * Example: + *
[given([mockObject transform:\@"FOO"]) willReturn:\@"BAR"];
+ * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTGiven instead. + */ +#define given(methodCall) MKTGiven(methodCall) +#endif + + +FOUNDATION_EXPORT MKTOngoingStubbing *MKTGivenVoidWithLocation(id testCase, const char *fileName, int lineNumber, void(^methodCallWrapper)(void)); +#define MKTGivenVoid(methodCall) MKTGivenVoidWithLocation(self, __FILE__, __LINE__, ^{ methodCall; }) + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Stubs a call to a void method. + * @discussion Creates an MKTOngoingStubbing used for any matching method calls. Call + * MKTOngoingStubbing methods to define the stub's behavior. + * + * Method arguments are matched with specified OCHamcrest matchers. Any argument that is not a + * matcher is implicitly wrapped in equalTo to match for equality. + * + * Example: + *
[givenVoid([mockObject methodReturningVoid]) willDo:^id(NSInvocation *invocation) { magic(); return nil; }];
+ * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTGiven instead. + */ +#define givenVoid(methodCall) MKTGivenVoid(methodCall) +#endif + + +#define MKTStubProperty(mock, propertyName, stubbedValue) \ + do { \ + [MKTGiven([mock propertyName]) willReturn:stubbedValue]; \ + [MKTGiven([mock valueForKey:@#propertyName]) willReturn:stubbedValue]; \ + [MKTGiven([mock valueForKeyPath:@#propertyName]) willReturn:stubbedValue]; \ + } while(0) + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Stubs a property and its related KVO methods to return a given value. + * @discussion + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTStubProperty instead. + */ +#define stubProperty(mock, propertyName, stubbedValue) MKTStubProperty(mock, propertyName, stubbedValue) +#endif + + +FOUNDATION_EXPORT void MKTStubSingletonWithLocation(id mockClass, SEL aSelector, id testCase, const char *fileName, int lineNumber); +#define MKTStubSingleton(mockClass, methodName) MKTStubSingletonWithLocation(mockClass, @selector(methodName), self, __FILE__, __LINE__) + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Stubs a singleton to the mock class object. + * @discussion + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTStubSingleton instead. + */ +#define stubSingleton(mockClass, methodName) MKTStubSingleton(mockClass, methodName) +#endif + + +FOUNDATION_EXPORT _Nullable id MKTVerifyWithLocation(id mock, id testCase, const char *fileName, int lineNumber); +#define MKTVerify(mock) MKTVerifyWithLocation(mock, self, __FILE__, __LINE__) + +#ifndef MKT_DISABLE_SHORT_SYNTAX +#undef verify +/*! + * @abstract Verifies certain behavior happened once. + * @discussion Equivalent to verifyCount(mock, times(1)). + * + * Method arguments are matched with specified OCHamcrest matchers. Any argument that is + * not a matcher is implicitly wrapped in equalTo to match for equality. + * + * Examples: + *
[verify(mockObject) someMethod:startsWith(\@"foo")];
+ *
[verify(mockObject) someMethod:\@"bar"];
+ * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTVerify instead. + */ +#define verify(mock) MKTVerify(mock) +#endif + + +FOUNDATION_EXPORT id MKTVerifyCountWithLocation(id mock, id mode, id testCase, const char *fileName, int lineNumber); +#define MKTVerifyCount(mock, mode) MKTVerifyCountWithLocation(mock, mode, self, __FILE__, __LINE__) + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Verifies certain behavior happened a given number of times. + * @discussion Method arguments are matched with specified OCHamcrest matchers. Any argument that is + * not a matcher is implicitly wrapped in equalTo to match for equality. + * Examples: + *
[verifyCount(mockObject, times(5)) someMethod:\@"was called five times"];
+ *
[verifyCount(mockObject, never()) someMethod:\@"was never called"];
+ * verifyCount checks that a method was invoked the given number of times, with arguments that + * match given OCHamcrest matchers. If an argument is not a matcher, it is implicitly wrapped in an + * equalTo matcher to check for equality. + * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTVerifyCount instead. + */ +#define verifyCount(mock, mode) MKTVerifyCount(mock, mode) +#endif + + +FOUNDATION_EXPORT id MKTTimes(NSUInteger wantedNumberOfInvocations); + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates verifyCount mode verifying an exact number of invocations. + * @discussion Example: + *
[verifyCount(mockObject, times(2)) someMethod:\@"some arg"];
+ * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTTimes instead. + */ +static inline id times(NSUInteger wantedNumberOfInvocations) +{ + return MKTTimes(wantedNumberOfInvocations); +} +#endif + + +FOUNDATION_EXPORT id MKTNever(void); + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates verifyCount mode verifying that an interaction did not happen. + * @discussion Example: + *
[verifyCount(mockObject, never()) someMethod:\@"some arg"];
+ * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTNever instead. + */ +static inline id never(void) +{ + return MKTNever(); +} +#endif + + +FOUNDATION_EXPORT id MKTAtLeast(NSUInteger minNumberOfInvocations); + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates verifyCount mode verifying that an interaction happened at least + * the given number of times. + * @discussion + * Example: + *
[verifyCount(mockObject, atLeast(2)) someMethod:\@"some arg"];
+ * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTAtLeast instead. + */ +static inline id atLeast(NSUInteger minNumberOfInvocations) +{ + return MKTAtLeast(minNumberOfInvocations); +} +#endif + + +FOUNDATION_EXPORT id MKTAtLeastOnce(void); + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates verifyCount mode verifying that an interaction happened at least + * once. + * @discussion Same as atLeast(1). + * + * Example: + *
[verifyCount(mockObject, atLeastOnce()) someMethod:\@"some arg"];
+ * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTAtLeastOnce instead. + */ +static inline id atLeastOnce(void) +{ + return MKTAtLeastOnce(); +} +#endif + + +FOUNDATION_EXPORT id MKTAtMost(NSUInteger maxNumberOfInvocations); + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Creates verifyCount mode verifying that an interaction happened at most + * the given number of times. + * @discussion + * Example: + *
[verifyCount(mockObject, atMost(2)) someMethod:\@"some arg"];
+ * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTAtLeast instead. + */ +static inline id atMost(NSUInteger maxNumberOfInvocations) +{ + return MKTAtMost(maxNumberOfInvocations); +} +#endif + + +FOUNDATION_EXPORT void MKTDisableMockingWithLocation(id mock, id testCase, const char *fileName, int lineNumber); +#define MKTDisableMocking(mock) MKTDisableMockingWithLocation(mock, self, __FILE__, __LINE__) + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Disables mocking, preventing any more invocations from being handled. + * @discussion There are cases where calling stopMocking() on a mock can release code under test + * that was being retained. If that code under test's dealloc method then references another mock + * that has not yet been stopped, it will create a strong reference to an object that is in the + * process of being deallocated, resulting in an over-release at a later date. A solution to this is + * to call disableMocking() on all mocks before calling stopMocking(). This allows a test to call + * stopMocking on all of its mocks without having to worry about which order to call them. + * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTDisableMocking instead. + */ +#define disableMocking(mock) MKTDisableMocking(mock) +#endif + + +FOUNDATION_EXPORT void MKTStopMockingWithLocation(id mock, id testCase, const char *fileName, int lineNumber); +#define MKTStopMocking(mock) MKTStopMockingWithLocation(mock, self, __FILE__, __LINE__) + +#ifndef MKT_DISABLE_SHORT_SYNTAX +/*! + * @abstract Stops mocking and releases arguments. + * @discussion Mock objects normally retain all message arguments. This is not a problem for most + * tests, but can sometimes cause retain cycles. In such cases, call stopMocking to tell the mock + * to release its arguments, and to stop accepting messages. See StopMockingTests.m for an example. + * + * Name Clash
+ * In the event of a name clash, #define MKT_DISABLE_SHORT_SYNTAX and use the synonym + * MKTStopMocking instead. + */ +#define stopMocking(mock) MKTStopMocking(mock) +#endif + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Core/OCMockito.m b/Pods/OCMockito/Source/OCMockito/Core/OCMockito.m new file mode 100644 index 0000000..d662fb0 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Core/OCMockito.m @@ -0,0 +1,148 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "OCMockito.h" + +#import "MKTAtLeastTimes.h" +#import "MKTAtMostTimes.h" +#import "MKTExactTimes.h" +#import "MKTMockitoCore.h" + + +static NSString *actualTypeName(id mock) +{ + NSString *className = NSStringFromClass([mock class]); + if (!className) + return @"nil"; + return [@"type " stringByAppendingString:className]; +} + +static BOOL reportedInvalidMock(id mock, id testCase, const char *fileName, int lineNumber, NSString *functionName) +{ + if ([MKTBaseMockObject isMockObject:mock]) + return NO; + NSString *description = [NSString stringWithFormat: + @"Argument passed to %@ should be a mock, but was %@", + functionName, actualTypeName(mock)]; + MKTFailTest(testCase, fileName, lineNumber, description); + return YES; +} + +static BOOL reportedInvalidClassMock(id classMock, id testCase, const char *fileName, int lineNumber, NSString *functionName) +{ + NSString *className = NSStringFromClass([classMock class]); + if ([className isEqualToString:@"MKTClassObjectMock"]) + return NO; + NSString *description = [NSString stringWithFormat: + @"Argument passed to %@ should be a class mock, but was %@", + functionName, actualTypeName(classMock)]; + MKTFailTest(testCase, fileName, lineNumber, description); + return YES; +} + +static BOOL reportedInvalidClassMethod(MKTClassObjectMock *theMock, SEL aSelector, id testCase, const char *fileName, int lineNumber, NSString *functionName) +{ + if ([theMock respondsToSelector:aSelector]) + return NO; + NSString *description = [NSString stringWithFormat: + @"Method name passed to %@ should be a class method of %@, but was %@", + functionName, theMock.mockedClass, NSStringFromSelector(aSelector)]; + MKTFailTest(testCase, fileName, lineNumber, description); + return YES; +} + +id MKTMock(Class classToMock) +{ + return [[MKTObjectMock alloc] initWithClass:classToMock]; +} + +id MKTMockClass(Class classToMock) +{ + return [[MKTClassObjectMock alloc] initWithClass:classToMock]; +} + +id MKTMockProtocol(Protocol *protocolToMock) +{ + return [[MKTProtocolMock alloc] initWithProtocol:protocolToMock includeOptionalMethods:YES]; +} + +id MKTMockProtocolWithoutOptionals(Protocol *protocolToMock) +{ + return [[MKTProtocolMock alloc] initWithProtocol:protocolToMock includeOptionalMethods:NO]; +} + +id MKTMockObjectAndProtocol(Class classToMock, Protocol *protocolToMock) +{ + return [[MKTObjectAndProtocolMock alloc] initWithClass:classToMock protocol:protocolToMock]; +} + +MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fileName, int lineNumber, ...) +{ + return [[MKTMockitoCore sharedCore] stubAtLocation:MKTTestLocationMake(testCase, fileName, lineNumber)]; +} + +MKTOngoingStubbing *MKTGivenVoidWithLocation(id testCase, const char *fileName, int lineNumber, void(^methodCallWrapper)(void)) +{ + methodCallWrapper(); + return [[MKTMockitoCore sharedCore] stubAtLocation:MKTTestLocationMake(testCase, fileName, lineNumber)]; +} + +void MKTStubSingletonWithLocation(id mockClass, SEL aSelector, id testCase, const char *fileName, int lineNumber) +{ + if (reportedInvalidClassMock(mockClass, testCase, fileName, lineNumber, @"stubSingleton()")) + return; + MKTClassObjectMock *theMock = (MKTClassObjectMock *)mockClass; + if (reportedInvalidClassMethod(theMock, aSelector, testCase, fileName, lineNumber, @"stubSingleton()")) + return; + [theMock swizzleSingletonAtSelector:aSelector]; +} + +_Nullable id MKTVerifyWithLocation(id mock, id testCase, const char *fileName, int lineNumber) +{ + if (reportedInvalidMock(mock, testCase, fileName, lineNumber, @"verify()")) + return nil; + + return MKTVerifyCountWithLocation(mock, MKTTimes(1), testCase, fileName, lineNumber); +} + +id MKTVerifyCountWithLocation(id mock, id mode, id testCase, const char *fileName, int lineNumber) +{ + if (reportedInvalidMock(mock, testCase, fileName, lineNumber, @"verifyCount()")) + return nil; + + return [[MKTMockitoCore sharedCore] verifyMock:mock + withMode:mode + atLocation:MKTTestLocationMake(testCase, fileName, lineNumber)]; +} + +id MKTTimes(NSUInteger wantedNumberOfInvocations) +{ + return [[MKTExactTimes alloc] initWithCount:wantedNumberOfInvocations]; +} + +id MKTNever() +{ + return MKTTimes(0); +} + +id MKTAtLeast(NSUInteger minNumberOfInvocations) +{ + return [[MKTAtLeastTimes alloc] initWithMinimumCount:minNumberOfInvocations]; +} + +id MKTAtLeastOnce() +{ + return MKTAtLeast(1); +} + +id MKTAtMost(NSUInteger maxNumberOfInvocations) +{ + return [[MKTAtMostTimes alloc] initWithMaximumCount:maxNumberOfInvocations]; +} + +void MKTStopMockingWithLocation(id mock, id testCase, const char *fileName, int lineNumber) +{ + if (reportedInvalidMock(mock, testCase, fileName, lineNumber, @"stopMocking()")) + return; + [mock stopMocking]; +} diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.h new file mode 100644 index 0000000..f57dff6 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.h @@ -0,0 +1,29 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Chain-of-responsibility for converting NSInvocation argument to object. + */ +@interface MKTArgumentGetter : NSObject + +/*! + * @abstract Initializes a newly allocated argument getter. + * @param handlerType Argument type managed by this getter. Assign with \@encode compiler directive. + * @param successor Successor in chain to handle argument type. + */ +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +/*! + * @abstract Retrieve designated argument of specified type from NSInvocation, or pass to successor. + */ +- (nullable id)retrieveArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.m new file mode 100644 index 0000000..a602dc8 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.m @@ -0,0 +1,42 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +@interface MKTArgumentGetter (SubclassResponsibility) +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation; +@end + +@interface MKTArgumentGetter () +@property (nonatomic, assign, readonly) char const *handlerType; +@property (nullable, nonatomic, strong, readonly) MKTArgumentGetter *successor; +@end + +@implementation MKTArgumentGetter + +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor +{ + self = [super init]; + if (self) + { + _handlerType = handlerType; + _successor = successor; + } + return self; +} + +- (BOOL)handlesArgumentType:(char const *)argType +{ + return argType[0] == self.handlerType[0]; +} + +- (nullable id)retrieveArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + if ([self handlesArgumentType:type]) + return [self getArgumentAtIndex:idx ofType:type onInvocation:invocation]; + + return [self.successor retrieveArgumentAtIndex:idx ofType:type onInvocation:invocation]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetterChain.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetterChain.h new file mode 100644 index 0000000..1ddc7a1 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetterChain.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +@class MKTArgumentGetter; + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Returns chain of argument getters. + */ +FOUNDATION_EXPORT MKTArgumentGetter *MKTArgumentGetterChain(void); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetterChain.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetterChain.m new file mode 100644 index 0000000..7253d86 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetterChain.m @@ -0,0 +1,52 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetterChain.h" + +#import "MKTObjectArgumentGetter.h" +#import "MKTSelectorArgumentGetter.h" +#import "MKTClassArgumentGetter.h" +#import "MKTCharArgumentGetter.h" +#import "MKTBoolArgumentGetter.h" +#import "MKTIntArgumentGetter.h" +#import "MKTShortArgumentGetter.h" +#import "MKTLongArgumentGetter.h" +#import "MKTLongLongArgumentGetter.h" +#import "MKTUnsignedCharArgumentGetter.h" +#import "MKTUnsignedIntArgumentGetter.h" +#import "MKTUnsignedShortArgumentGetter.h" +#import "MKTUnsignedLongArgumentGetter.h" +#import "MKTUnsignedLongLongArgumentGetter.h" +#import "MKTFloatArgumentGetter.h" +#import "MKTDoubleArgumentGetter.h" +#import "MKTPointerArgumentGetter.h" +#import "MKTStructArgumentGetter.h" + + +MKTArgumentGetter *MKTArgumentGetterChain(void) +{ + static MKTArgumentGetter *chain = nil; + if (!chain) + { + MKTArgumentGetter *structGetter = [[MKTStructArgumentGetter alloc] initWithSuccessor:nil]; + MKTArgumentGetter *pointerGetter = [[MKTPointerArgumentGetter alloc] initWithSuccessor:structGetter]; + MKTArgumentGetter *doubleGetter = [[MKTDoubleArgumentGetter alloc] initWithSuccessor:pointerGetter]; + MKTArgumentGetter *floatGetter = [[MKTFloatArgumentGetter alloc] initWithSuccessor:doubleGetter]; + MKTArgumentGetter *uLongLongGetter = [[MKTUnsignedLongLongArgumentGetter alloc] initWithSuccessor:floatGetter]; + MKTArgumentGetter *uLongGetter = [[MKTUnsignedLongArgumentGetter alloc] initWithSuccessor:uLongLongGetter]; + MKTArgumentGetter *uShortGetter = [[MKTUnsignedShortArgumentGetter alloc] initWithSuccessor:uLongGetter]; + MKTArgumentGetter *uIntGetter = [[MKTUnsignedIntArgumentGetter alloc] initWithSuccessor:uShortGetter]; + MKTArgumentGetter *uCharGetter = [[MKTUnsignedCharArgumentGetter alloc] initWithSuccessor:uIntGetter]; + MKTArgumentGetter *longLongGetter = [[MKTLongLongArgumentGetter alloc] initWithSuccessor:uCharGetter]; + MKTArgumentGetter *longGetter = [[MKTLongArgumentGetter alloc] initWithSuccessor:longLongGetter]; + MKTArgumentGetter *shortGetter = [[MKTShortArgumentGetter alloc] initWithSuccessor:longGetter]; + MKTArgumentGetter *intGetter = [[MKTIntArgumentGetter alloc] initWithSuccessor:shortGetter]; + MKTArgumentGetter *boolGetter = [[MKTBoolArgumentGetter alloc] initWithSuccessor:intGetter]; + MKTArgumentGetter *charGetter = [[MKTCharArgumentGetter alloc] initWithSuccessor:boolGetter]; + MKTArgumentGetter *classGetter = [[MKTClassArgumentGetter alloc] initWithSuccessor:charGetter]; + MKTArgumentGetter *selectorGetter = [[MKTSelectorArgumentGetter alloc] initWithSuccessor:classGetter]; + MKTArgumentGetter *objectGetter = [[MKTObjectArgumentGetter alloc] initWithSuccessor:selectorGetter]; + chain = objectGetter; + } + return chain; +} diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.h new file mode 100644 index 0000000..187835e --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTBoolArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.m new file mode 100644 index 0000000..7507cfa --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTBoolArgumentGetter.h" + +@implementation MKTBoolArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(BOOL) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + BOOL arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTCharArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTCharArgumentGetter.h new file mode 100644 index 0000000..c969ff8 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTCharArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTCharArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTCharArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTCharArgumentGetter.m new file mode 100644 index 0000000..ae6ae48 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTCharArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTCharArgumentGetter.h" + +@implementation MKTCharArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(char) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + char arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.h new file mode 100644 index 0000000..b7613af --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTClassArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.m new file mode 100644 index 0000000..d4ac445 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTClassArgumentGetter.h" + +@implementation MKTClassArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(Class) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + __unsafe_unretained Class arg = nil; + [invocation getArgument:&arg atIndex:idx]; + return arg; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTDoubleArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTDoubleArgumentGetter.h new file mode 100644 index 0000000..2476fa0 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTDoubleArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTDoubleArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTDoubleArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTDoubleArgumentGetter.m new file mode 100644 index 0000000..4e2aa65 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTDoubleArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTDoubleArgumentGetter.h" + +@implementation MKTDoubleArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(double) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + double arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTFloatArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTFloatArgumentGetter.h new file mode 100644 index 0000000..0c7c9cf --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTFloatArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTFloatArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTFloatArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTFloatArgumentGetter.m new file mode 100644 index 0000000..724a6f9 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTFloatArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTFloatArgumentGetter.h" + +@implementation MKTFloatArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(float) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + float arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTIntArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTIntArgumentGetter.h new file mode 100644 index 0000000..7b2b241 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTIntArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTIntArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTIntArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTIntArgumentGetter.m new file mode 100644 index 0000000..70d52ea --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTIntArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTIntArgumentGetter.h" + +@implementation MKTIntArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(int) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + int arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.h new file mode 100644 index 0000000..a76ec7e --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTLongArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.m new file mode 100644 index 0000000..93a8028 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTLongArgumentGetter.h" + +@implementation MKTLongArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(long) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + long arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongLongArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongLongArgumentGetter.h new file mode 100644 index 0000000..b0e2935 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongLongArgumentGetter.h @@ -0,0 +1,15 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTLongLongArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongLongArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongLongArgumentGetter.m new file mode 100644 index 0000000..a2e7c70 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTLongLongArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTLongLongArgumentGetter.h" + +@implementation MKTLongLongArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(long long) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + long long arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTObjectArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTObjectArgumentGetter.h new file mode 100644 index 0000000..d396080 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTObjectArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTObjectArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTObjectArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTObjectArgumentGetter.m new file mode 100644 index 0000000..0920e49 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTObjectArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTObjectArgumentGetter.h" + +@implementation MKTObjectArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(id) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + __unsafe_unretained id arg = nil; + [invocation getArgument:&arg atIndex:idx]; + return arg ? arg : [NSNull null]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTPointerArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTPointerArgumentGetter.h new file mode 100644 index 0000000..b73d651 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTPointerArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTPointerArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTPointerArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTPointerArgumentGetter.m new file mode 100644 index 0000000..23aea33 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTPointerArgumentGetter.m @@ -0,0 +1,22 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTPointerArgumentGetter.h" + + +@implementation MKTPointerArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(void *) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + void *arg; + [invocation getArgument:&arg atIndex:idx]; + return [NSValue valueWithPointer:arg]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTSelectorArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTSelectorArgumentGetter.h new file mode 100644 index 0000000..2d46af3 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTSelectorArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTSelectorArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTSelectorArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTSelectorArgumentGetter.m new file mode 100644 index 0000000..b0d778f --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTSelectorArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTSelectorArgumentGetter.h" + +@implementation MKTSelectorArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(SEL) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + SEL arg = nil; + [invocation getArgument:&arg atIndex:idx]; + return arg ? NSStringFromSelector(arg) : [NSNull null]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTShortArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTShortArgumentGetter.h new file mode 100644 index 0000000..3be2671 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTShortArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTShortArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTShortArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTShortArgumentGetter.m new file mode 100644 index 0000000..c97aae2 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTShortArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTShortArgumentGetter.h" + +@implementation MKTShortArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(short) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + short arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTStructArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTStructArgumentGetter.h new file mode 100644 index 0000000..5346e21 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTStructArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTStructArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTStructArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTStructArgumentGetter.m new file mode 100644 index 0000000..b43a057 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTStructArgumentGetter.m @@ -0,0 +1,28 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTStructArgumentGetter.h" + +typedef struct {} MKTDummyStructure; + + +@implementation MKTStructArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(MKTDummyStructure) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + NSUInteger structSize = 0; + NSGetSizeAndAlignment(type, &structSize, NULL); + void *structMem = calloc(1, structSize); + [invocation getArgument:structMem atIndex:idx]; + id arg = [NSData dataWithBytes:structMem length:structSize]; + free(structMem); + return arg; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.h new file mode 100644 index 0000000..f129972 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTUnsignedCharArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.m new file mode 100644 index 0000000..2a4be3b --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTUnsignedCharArgumentGetter.h" + +@implementation MKTUnsignedCharArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(unsigned char) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + unsigned char arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedIntArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedIntArgumentGetter.h new file mode 100644 index 0000000..fb4a2cf --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedIntArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTUnsignedIntArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedIntArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedIntArgumentGetter.m new file mode 100644 index 0000000..8e9ff06 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedIntArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTUnsignedIntArgumentGetter.h" + +@implementation MKTUnsignedIntArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(unsigned int) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + unsigned int arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongArgumentGetter.h new file mode 100644 index 0000000..04ac2b2 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTUnsignedLongArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongArgumentGetter.m new file mode 100644 index 0000000..1c0ff0c --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTUnsignedLongArgumentGetter.h" + +@implementation MKTUnsignedLongArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(unsigned long) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + unsigned long arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongLongArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongLongArgumentGetter.h new file mode 100644 index 0000000..0078651 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongLongArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTUnsignedLongLongArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongLongArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongLongArgumentGetter.m new file mode 100644 index 0000000..7ac32d9 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongLongArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTUnsignedLongLongArgumentGetter.h" + +@implementation MKTUnsignedLongLongArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(unsigned long long) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + unsigned long long arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedShortArgumentGetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedShortArgumentGetter.h new file mode 100644 index 0000000..f2bfb53 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedShortArgumentGetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTArgumentGetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTUnsignedShortArgumentGetter : MKTArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTArgumentGetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedShortArgumentGetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedShortArgumentGetter.m new file mode 100644 index 0000000..760aaee --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedShortArgumentGetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTUnsignedShortArgumentGetter.h" + +@implementation MKTUnsignedShortArgumentGetter + +- (instancetype)initWithSuccessor:(nullable MKTArgumentGetter *)successor +{ + self = [super initWithType:@encode(unsigned short) successor:successor]; + return self; +} + +- (id)getArgumentAtIndex:(NSInteger)idx ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + unsigned short arg; + [invocation getArgument:&arg atIndex:idx]; + return @(arg); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTBoolReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTBoolReturnSetter.h new file mode 100644 index 0000000..38bcf0c --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTBoolReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTBoolReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTBoolReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTBoolReturnSetter.m new file mode 100644 index 0000000..15335a9 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTBoolReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTBoolReturnSetter.h" + + +@implementation MKTBoolReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(BOOL) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + BOOL value = [returnValue boolValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.h new file mode 100644 index 0000000..f96c217 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTCharReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.m new file mode 100644 index 0000000..051ef87 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTCharReturnSetter.h" + + +@implementation MKTCharReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(char) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + char value = [returnValue charValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTClassReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTClassReturnSetter.h new file mode 100644 index 0000000..901da09 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTClassReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTClassReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTClassReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTClassReturnSetter.m new file mode 100644 index 0000000..30573ab --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTClassReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTClassReturnSetter.h" + + +@implementation MKTClassReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(Class) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + __unsafe_unretained Class value = returnValue; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTDoubleReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTDoubleReturnSetter.h new file mode 100644 index 0000000..a99e29b --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTDoubleReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTDoubleReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTDoubleReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTDoubleReturnSetter.m new file mode 100644 index 0000000..4d7cfb0 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTDoubleReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTDoubleReturnSetter.h" + + +@implementation MKTDoubleReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(double) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + double value = [returnValue doubleValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTFloatReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTFloatReturnSetter.h new file mode 100644 index 0000000..0e442ea --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTFloatReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTFloatReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTFloatReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTFloatReturnSetter.m new file mode 100644 index 0000000..c8c16c9 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTFloatReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTFloatReturnSetter.h" + + +@implementation MKTFloatReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(float) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + float value = [returnValue floatValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTIntReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTIntReturnSetter.h new file mode 100644 index 0000000..0bac9e7 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTIntReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTIntReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTIntReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTIntReturnSetter.m new file mode 100644 index 0000000..c2485f9 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTIntReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTIntReturnSetter.h" + + +@implementation MKTIntReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(int) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + int value = [returnValue intValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongLongReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongLongReturnSetter.h new file mode 100644 index 0000000..52ba557 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongLongReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTLongLongReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongLongReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongLongReturnSetter.m new file mode 100644 index 0000000..8e27213 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongLongReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTLongLongReturnSetter.h" + + +@implementation MKTLongLongReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(long long) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + long long value = [returnValue longLongValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongReturnSetter.h new file mode 100644 index 0000000..9c54586 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTLongReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongReturnSetter.m new file mode 100644 index 0000000..83f2fee --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTLongReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTLongReturnSetter.h" + + +@implementation MKTLongReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(long) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + long value = [returnValue longValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTObjectReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTObjectReturnSetter.h new file mode 100644 index 0000000..cb3a79c --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTObjectReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTObjectReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTObjectReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTObjectReturnSetter.m new file mode 100644 index 0000000..f76403f --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTObjectReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTObjectReturnSetter.h" + + +@implementation MKTObjectReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(id) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + __unsafe_unretained id value = returnValue; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetter.h new file mode 100644 index 0000000..9860a29 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetter.h @@ -0,0 +1,30 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Chain-of-responsibility for converting objects to NSInvocation return values. + */ +@interface MKTReturnValueSetter : NSObject + +/*! + * @abstract Initializes a newly allocated return value setter. + * @param handlerType Return type managed by this setter. Assign with \@encode compiler directive. + * @param successor Successor in chain to handle return type. + */ +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; +; + +/*! + * @abstract Set NSInvocation return value of specified type, or pass to successor. + */ +- (void)setReturnValue:(nullable id)returnValue ofType:(char const *)type onInvocation:(NSInvocation *)invocation; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetter.m new file mode 100644 index 0000000..eea1510 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetter.m @@ -0,0 +1,43 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +@interface MKTReturnValueSetter (SubclassResponsibility) +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation; +@end + +@interface MKTReturnValueSetter () +@property (nonatomic, assign, readonly) char const *handlerType; +@property (nullable, nonatomic, strong, readonly) MKTReturnValueSetter *successor; +@end + + +@implementation MKTReturnValueSetter + +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor +{ + self = [super init]; + if (self) + { + _handlerType = handlerType; + _successor = successor; + } + return self; +} + +- (BOOL)handlesReturnType:(char const *)returnType +{ + return returnType[0] == self.handlerType[0]; +} + +- (void)setReturnValue:(nullable id)returnValue ofType:(char const *)type onInvocation:(NSInvocation *)invocation +{ + if ([self handlesReturnType:type]) + [self setReturnValue:returnValue onInvocation:invocation]; + else + [self.successor setReturnValue:returnValue ofType:type onInvocation:invocation]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetterChain.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetterChain.h new file mode 100644 index 0000000..ae9973c --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetterChain.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +@class MKTReturnValueSetter; + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Returns chain of return value handlers. + */ +FOUNDATION_EXPORT MKTReturnValueSetter *MKTReturnValueSetterChain(void); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetterChain.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetterChain.m new file mode 100644 index 0000000..5539292 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetterChain.m @@ -0,0 +1,48 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetterChain.h" + +#import "MKTObjectReturnSetter.h" +#import "MKTClassReturnSetter.h" +#import "MKTCharReturnSetter.h" +#import "MKTBoolReturnSetter.h" +#import "MKTLongLongReturnSetter.h" +#import "MKTIntReturnSetter.h" +#import "MKTShortReturnSetter.h" +#import "MKTLongReturnSetter.h" +#import "MKTUnsignedCharReturnSetter.h" +#import "MKTUnsignedIntReturnSetter.h" +#import "MKTUnsignedShortReturnSetter.h" +#import "MKTUnsignedLongReturnSetter.h" +#import "MKTUnsignedLongLongReturnSetter.h" +#import "MKTFloatReturnSetter.h" +#import "MKTDoubleReturnSetter.h" +#import "MKTStructReturnSetter.h" + + +MKTReturnValueSetter *MKTReturnValueSetterChain(void) +{ + static MKTReturnValueSetter *chain = nil; + if (!chain) + { + MKTReturnValueSetter *structSetter = [[MKTStructReturnSetter alloc] initWithSuccessor:nil]; + MKTReturnValueSetter *doubleSetter = [[MKTDoubleReturnSetter alloc] initWithSuccessor:structSetter]; + MKTReturnValueSetter *floatSetter = [[MKTFloatReturnSetter alloc] initWithSuccessor:doubleSetter]; + MKTReturnValueSetter *uLongLongSetter = [[MKTUnsignedLongLongReturnSetter alloc] initWithSuccessor:floatSetter]; + MKTReturnValueSetter *uLongSetter = [[MKTUnsignedLongReturnSetter alloc] initWithSuccessor:uLongLongSetter]; + MKTReturnValueSetter *uShortSetter = [[MKTUnsignedShortReturnSetter alloc] initWithSuccessor:uLongSetter]; + MKTReturnValueSetter *uIntSetter = [[MKTUnsignedIntReturnSetter alloc] initWithSuccessor:uShortSetter]; + MKTReturnValueSetter *uCharSetter = [[MKTUnsignedCharReturnSetter alloc] initWithSuccessor:uIntSetter]; + MKTReturnValueSetter *longLongSetter = [[MKTLongLongReturnSetter alloc] initWithSuccessor:uCharSetter]; + MKTReturnValueSetter *longSetter = [[MKTLongReturnSetter alloc] initWithSuccessor:longLongSetter]; + MKTReturnValueSetter *shortSetter = [[MKTShortReturnSetter alloc] initWithSuccessor:longSetter]; + MKTReturnValueSetter *intSetter = [[MKTIntReturnSetter alloc] initWithSuccessor:shortSetter]; + MKTReturnValueSetter *boolSetter = [[MKTBoolReturnSetter alloc] initWithSuccessor:intSetter]; + MKTReturnValueSetter *charSetter = [[MKTCharReturnSetter alloc] initWithSuccessor:boolSetter]; + MKTReturnValueSetter *classSetter = [[MKTClassReturnSetter alloc] initWithSuccessor:charSetter]; + MKTReturnValueSetter *objectSetter = [[MKTObjectReturnSetter alloc] initWithSuccessor:classSetter]; + chain = objectSetter; + } + return chain; +} diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTShortReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTShortReturnSetter.h new file mode 100644 index 0000000..e9fd4a1 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTShortReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTShortReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTShortReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTShortReturnSetter.m new file mode 100644 index 0000000..a5ecb88 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTShortReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTShortReturnSetter.h" + + +@implementation MKTShortReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(short) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + short value = [returnValue shortValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTStructReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTStructReturnSetter.h new file mode 100644 index 0000000..46a91b6 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTStructReturnSetter.h @@ -0,0 +1,17 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTStructReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTStructReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTStructReturnSetter.m new file mode 100644 index 0000000..7668ec3 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTStructReturnSetter.m @@ -0,0 +1,23 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTStructReturnSetter.h" + + +@implementation MKTStructReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:"{" successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + NSMethodSignature *methodSignature = [invocation methodSignature]; + NSMutableData *value = [NSMutableData dataWithLength:[methodSignature methodReturnLength]]; + [returnValue getValue:[value mutableBytes]]; + [invocation setReturnValue:[value mutableBytes]]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedCharReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedCharReturnSetter.h new file mode 100644 index 0000000..09b686a --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedCharReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTUnsignedCharReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedCharReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedCharReturnSetter.m new file mode 100644 index 0000000..2894b99 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedCharReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTUnsignedCharReturnSetter.h" + + +@implementation MKTUnsignedCharReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(unsigned char) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + unsigned char value = [returnValue unsignedCharValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedIntReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedIntReturnSetter.h new file mode 100644 index 0000000..ff45791 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedIntReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTUnsignedIntReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedIntReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedIntReturnSetter.m new file mode 100644 index 0000000..7d91be6 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedIntReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTUnsignedIntReturnSetter.h" + + +@implementation MKTUnsignedIntReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(unsigned int) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + unsigned int value = [returnValue unsignedIntValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongLongReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongLongReturnSetter.h new file mode 100644 index 0000000..3a9e49c --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongLongReturnSetter.h @@ -0,0 +1,17 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTUnsignedLongLongReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongLongReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongLongReturnSetter.m new file mode 100644 index 0000000..9da379e --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongLongReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTUnsignedLongLongReturnSetter.h" + + +@implementation MKTUnsignedLongLongReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(unsigned long long) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + unsigned long long value = [returnValue unsignedLongLongValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.h new file mode 100644 index 0000000..055914c --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTUnsignedLongReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.m new file mode 100644 index 0000000..7a4bd10 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTUnsignedLongReturnSetter.h" + + +@implementation MKTUnsignedLongReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(unsigned long) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + unsigned long value = [returnValue unsignedLongValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedShortReturnSetter.h b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedShortReturnSetter.h new file mode 100644 index 0000000..13ef90a --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedShortReturnSetter.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnValueSetter.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTUnsignedShortReturnSetter : MKTReturnValueSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithType:(char const *)handlerType successor:(nullable MKTReturnValueSetter *)successor NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedShortReturnSetter.m b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedShortReturnSetter.m new file mode 100644 index 0000000..00380eb --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedShortReturnSetter.m @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTUnsignedShortReturnSetter.h" + + +@implementation MKTUnsignedShortReturnSetter + +- (instancetype)initWithSuccessor:(nullable MKTReturnValueSetter *)successor +{ + self = [super initWithType:@encode(unsigned short) successor:successor]; + return self; +} + +- (void)setReturnValue:(id)returnValue onInvocation:(NSInvocation *)invocation +{ + unsigned short value = [returnValue unsignedShortValue]; + [invocation setReturnValue:&value]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTCallStackElement.h b/Pods/OCMockito/Source/OCMockito/Invocation/MKTCallStackElement.h new file mode 100644 index 0000000..bd29f10 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTCallStackElement.h @@ -0,0 +1,19 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTCallStackElement : NSObject + +@property (nonatomic, copy, readonly) NSString *moduleName; +@property (nonatomic, copy, readonly) NSString *instruction; + +- (instancetype)initWithSymbols:(NSString *)element NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTCallStackElement.m b/Pods/OCMockito/Source/OCMockito/Invocation/MKTCallStackElement.m new file mode 100644 index 0000000..b9098d4 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTCallStackElement.m @@ -0,0 +1,53 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTCallStackElement.h" + + +static NSRange trimTrailingSpacesFromRange(NSString *string, NSRange range) +{ + while ([string characterAtIndex:range.location + range.length - 1] == ' ') + range.length -= 1; + return range; +} + +static NSString *extractModuleName(NSString *element) +{ + NSRange range = trimTrailingSpacesFromRange(element, NSMakeRange(4, 33)); + return [element substringWithRange:range]; +} + +static BOOL isAddress32Bit(NSString *element) +{ + return [element characterAtIndex:50] == ' '; +} + +static NSString *extractInstruction(NSString *element) +{ + NSUInteger loc = 59; + if (isAddress32Bit(element)) + loc -= 8; + NSRange range = NSMakeRange(loc, element.length - loc); + return [element substringWithRange:range]; +} + + +@implementation MKTCallStackElement + +- (instancetype)initWithSymbols:(NSString *)element +{ + self = [super init]; + if (self) + { + _moduleName = extractModuleName(element); + _instruction = extractInstruction(element); + } + return self; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"%@ %@", self.moduleName, self.instruction]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTFilterCallStack.h b/Pods/OCMockito/Source/OCMockito/Invocation/MKTFilterCallStack.h new file mode 100644 index 0000000..1a31ae0 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTFilterCallStack.h @@ -0,0 +1,13 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +@class MKTCallStackElement; + + +NS_ASSUME_NONNULL_BEGIN + +NSArray *MKTFilterCallStack(NSArray *callStackSymbols); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTFilterCallStack.m b/Pods/OCMockito/Source/OCMockito/Invocation/MKTFilterCallStack.m new file mode 100644 index 0000000..27dca30 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTFilterCallStack.m @@ -0,0 +1,34 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTFilterCallStack.h" + +#import "MKTCallStackElement.h" + + +static NSUInteger MKTFirstRelevantCallStackIndex(NSArray *parsedStack) +{ + NSUInteger firstIndex = [parsedStack indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { + MKTCallStackElement *element = obj; + return [element.instruction hasPrefix:@"-[MKTBaseMockObject forwardInvocation:]"]; + }]; + return firstIndex + 3; +} + +static NSUInteger MKTLastRelevantCallStackIndex(NSArray *parsedStack, + NSUInteger startBackFrom, + NSString *moduleName) +{ + NSUInteger lastIndex = startBackFrom; + while (lastIndex > 0 && ![[(parsedStack[lastIndex]) moduleName] isEqualToString:moduleName]) + lastIndex -= 1; + return [[(parsedStack[lastIndex]) moduleName] isEqualToString:moduleName] ? lastIndex : startBackFrom; +} + +NSArray *MKTFilterCallStack(NSArray *parsedStack) +{ + NSUInteger firstIndex = MKTFirstRelevantCallStackIndex(parsedStack); + NSUInteger lastIndex = MKTLastRelevantCallStackIndex(parsedStack, parsedStack.count - 1, @"XCTest"); + lastIndex = MKTLastRelevantCallStackIndex(parsedStack, lastIndex, [parsedStack[firstIndex] moduleName]); + return [parsedStack subarrayWithRange:NSMakeRange(firstIndex, lastIndex - firstIndex + 1)]; +} diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocation.h b/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocation.h new file mode 100644 index 0000000..2103a68 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocation.h @@ -0,0 +1,23 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +@class MKTLocation; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTInvocation : NSObject + +@property (nonatomic, strong, readonly) NSInvocation *invocation; +@property (nonatomic, strong, readonly) MKTLocation *location; +@property (nonatomic, assign) BOOL verified; + +- (instancetype)initWithInvocation:(NSInvocation *)invocation; +- (instancetype)initWithInvocation:(NSInvocation *)invocation location:(MKTLocation *)location NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocation.m b/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocation.m new file mode 100644 index 0000000..8e31aa4 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocation.m @@ -0,0 +1,27 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTInvocation.h" + +#import "MKTLocation.h" + + +@implementation MKTInvocation + +- (instancetype)initWithInvocation:(NSInvocation *)invocation +{ + return [self initWithInvocation:invocation + location:[[MKTLocation alloc] init]]; +} + +- (instancetype)initWithInvocation:(NSInvocation *)invocation location:(MKTLocation *)location +{ + self = [super init]; + if (self) { + _invocation = invocation; + _location = location; + } + return self; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocationMatcher.h b/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocationMatcher.h new file mode 100644 index 0000000..42c5914 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocationMatcher.h @@ -0,0 +1,27 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +@protocol HCMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTInvocationMatcher : NSObject + +@property (nonatomic, strong, readonly) NSInvocation *expected; +@property (nonatomic, assign, readonly) NSUInteger numberOfArguments; +@property (nonatomic, copy, readonly) NSArray> *matchers; + +- (instancetype)init NS_DESIGNATED_INITIALIZER; +- (void)setMatcher:(id )matcher atIndex:(NSUInteger)index; +- (void)setExpectedInvocation:(NSInvocation *)expectedInvocation; +- (BOOL)matches:(NSInvocation *)actual; +- (void)stopArgumentCapture; +- (void)enumerateMismatchesOf:(NSInvocation *)actual + usingBlock:(void (^)(NSUInteger idx, NSString *description))block; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocationMatcher.m b/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocationMatcher.m new file mode 100644 index 0000000..f76af00 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTInvocationMatcher.m @@ -0,0 +1,149 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTInvocationMatcher.h" + +#import "NSInvocation+OCMockito.h" +#import +#import +#import +#import + + +@interface MKTUnspecifiedArgumentPlaceholder : NSObject +@end + +@implementation MKTUnspecifiedArgumentPlaceholder + ++ (instancetype)sharedPlaceholder +{ + static MKTUnspecifiedArgumentPlaceholder *instance = nil; + if (!instance) + instance = [[self alloc] init]; + return instance; +} + +@end + + +@interface MKTInvocationMatcher () +@property (nonatomic, strong, readwrite) NSInvocation *expected; +@property (nonatomic, assign, readwrite) NSUInteger numberOfArguments; +@property (nonatomic, strong, readonly) NSMutableArray> *argumentMatchers; +@end + +@implementation MKTInvocationMatcher + +@dynamic matchers; + +- (instancetype)init +{ + self = [super init]; + if (self) + _argumentMatchers = [[NSMutableArray alloc] init]; + return self; +} + +- (NSArray> *)matchers +{ + return self.argumentMatchers; +} + +- (void)setMatcher:(id )matcher atIndex:(NSUInteger)index +{ + if (index < self.argumentMatchers.count) + self.argumentMatchers[index] = matcher; + else + { + [self trueUpArgumentMatchersToCount:index]; + [self.argumentMatchers addObject:matcher]; + } +} + +- (void)trueUpArgumentMatchersToCount:(NSUInteger)desiredCount +{ + NSUInteger count = self.argumentMatchers.count; + while (count < desiredCount) + { + [self.argumentMatchers addObject:[self placeholderForUnspecifiedMatcher]]; + ++count; + } +} + +- (void)setExpectedInvocation:(NSInvocation *)expectedInvocation +{ + [expectedInvocation mkt_retainArgumentsWithWeakTarget]; + self.expected = expectedInvocation; + + self.numberOfArguments = [[self.expected methodSignature] numberOfArguments] - 2; + [self trueUpArgumentMatchersToCount:self.numberOfArguments]; + [self replacePlaceholdersWithEqualityMatchersForArguments:[self.expected mkt_arguments]]; +} + +- (void)replacePlaceholdersWithEqualityMatchersForArguments:(NSArray *)expectedArgs +{ + for (NSUInteger index = 0; index < self.numberOfArguments; ++index) + { + if (self.argumentMatchers[index] == [self placeholderForUnspecifiedMatcher]) + self.argumentMatchers[index] = [self matcherForArgument:expectedArgs[index]]; + } +} + +- (id)placeholderForUnspecifiedMatcher +{ + return [MKTUnspecifiedArgumentPlaceholder sharedPlaceholder]; +} + +- (id )matcherForArgument:(id)arg +{ + if (arg == [NSNull null]) + return HC_nilValue(); + + return HCWrapInMatcher(arg); +} + +- (BOOL)matches:(NSInvocation *)actual +{ + if (self.expected.selector != actual.selector) + return NO; + + NSArray *actualArgs = [actual mkt_arguments]; + for (NSUInteger index = 0; index < self.numberOfArguments; ++index) + { + if ([self argument:actualArgs[index] doesNotMatch:self.argumentMatchers[index]]) + return NO; + } + return YES; +} + +- (void)stopArgumentCapture +{ + for (id matcher in self.argumentMatchers) + if ([matcher isKindOfClass:[HCArgumentCaptor class]]) + { + HCArgumentCaptor *captor = (HCArgumentCaptor *)matcher; + captor.captureEnabled = NO; + } +} + +- (void)enumerateMismatchesOf:(NSInvocation *)actual + usingBlock:(void (^)(NSUInteger idx, NSString *description))block +{ + NSArray *actualArgs = [actual mkt_arguments]; + for (NSUInteger index = 0; index < self.numberOfArguments; ++index) + if ([self argument:actualArgs[index] doesNotMatch:self.argumentMatchers[index]]) + { + id matcher = self.argumentMatchers[index]; + id argument = actualArgs[index]; + block(index, HCDescribeMismatch(matcher, argument)); + } +} + +- (BOOL)argument:(id)arg doesNotMatch:(id )matcher +{ + if (arg == [NSNull null]) + arg = nil; + return ![matcher matches:arg]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTLocation.h b/Pods/OCMockito/Source/OCMockito/Invocation/MKTLocation.h new file mode 100644 index 0000000..995452f --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTLocation.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTLocation : NSObject + +- (instancetype)init; +- (instancetype)initWithCallStack:(NSArray *)callStack NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTLocation.m b/Pods/OCMockito/Source/OCMockito/Invocation/MKTLocation.m new file mode 100644 index 0000000..d7b8366 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTLocation.m @@ -0,0 +1,36 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTLocation.h" + +#import "MKTFilterCallStack.h" +#import "MKTParseCallStack.h" + + +@interface MKTLocation () +@property (nonatomic, strong, readonly) NSArray *callStack; // strong not copy, for speed +@end + +@implementation MKTLocation + +- (instancetype)init +{ + self = [self initWithCallStack:[NSThread callStackSymbols]]; + return self; +} + +- (instancetype)initWithCallStack:(NSArray *)callStack +{ + self = [super init]; + if (self) + _callStack = callStack; + return self; +} + +- (NSString *)description +{ + NSArray *stack = MKTFilterCallStack(MKTParseCallStack(self.callStack)); + return [stack componentsJoinedByString:@"\n"]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTMatchingInvocationsFinder.h b/Pods/OCMockito/Source/OCMockito/Invocation/MKTMatchingInvocationsFinder.h new file mode 100644 index 0000000..4b28897 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTMatchingInvocationsFinder.h @@ -0,0 +1,24 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +@class MKTInvocation; +@class MKTInvocationMatcher; +@class MKTLocation; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTMatchingInvocationsFinder : NSObject + +@property (nonatomic, assign, readonly) NSUInteger count; + +- (void)findInvocationsInList:(NSArray *)invocations matching:(MKTInvocationMatcher *)wanted; +- (MKTLocation *)locationOfInvocationAtIndex:(NSUInteger)index; +- (MKTLocation *)locationOfLastInvocation; +- (void)markInvocationsAsVerified; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTMatchingInvocationsFinder.m b/Pods/OCMockito/Source/OCMockito/Invocation/MKTMatchingInvocationsFinder.m new file mode 100644 index 0000000..148d072 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTMatchingInvocationsFinder.m @@ -0,0 +1,50 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTMatchingInvocationsFinder.h" + +#import "MKTInvocation.h" +#import "MKTInvocationMatcher.h" + + +@interface MKTMatchingInvocationsFinder () +@property (nonatomic, copy) NSArray *invocations; +@end + +@implementation MKTMatchingInvocationsFinder + +@dynamic count; + +- (void)findInvocationsInList:(NSArray *)invocations matching:(MKTInvocationMatcher *)wanted +{ + self.invocations = [invocations filteredArrayUsingPredicate: + [NSPredicate predicateWithBlock:^BOOL(id obj, NSDictionary *bindings) { + MKTInvocation *invocation = obj; + return !invocation.verified && [wanted matches:invocation.invocation]; + }]]; +} + +- (NSUInteger)count +{ + return self.invocations.count; +} + +- (MKTLocation *)locationOfInvocationAtIndex:(NSUInteger)index +{ + MKTInvocation *invocation = self.invocations[index]; + return invocation.location; +} + +- (MKTLocation *)locationOfLastInvocation +{ + MKTInvocation *invocation = self.invocations.lastObject; + return invocation.location; +} + +- (void)markInvocationsAsVerified +{ + for (MKTInvocation *invocation in self.invocations) + invocation.verified = YES; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTParseCallStack.h b/Pods/OCMockito/Source/OCMockito/Invocation/MKTParseCallStack.h new file mode 100644 index 0000000..a3690ed --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTParseCallStack.h @@ -0,0 +1,13 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +@class MKTCallStackElement; + + +NS_ASSUME_NONNULL_BEGIN + +NSArray *MKTParseCallStack(NSArray *callStackSymbols); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTParseCallStack.m b/Pods/OCMockito/Source/OCMockito/Invocation/MKTParseCallStack.m new file mode 100644 index 0000000..f40cba9 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTParseCallStack.m @@ -0,0 +1,18 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTParseCallStack.h" + +#import "MKTCallStackElement.h" + + +NSArray *MKTParseCallStack(NSArray *callStackSymbols) +{ + NSMutableArray *result = [[NSMutableArray alloc] init]; + for (NSString *rawElement in callStackSymbols) + { + MKTCallStackElement *element = [[MKTCallStackElement alloc] initWithSymbols:rawElement]; + [result addObject:element]; + } + return result; +} diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTPrinter.h b/Pods/OCMockito/Source/OCMockito/Invocation/MKTPrinter.h new file mode 100644 index 0000000..ec19c01 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTPrinter.h @@ -0,0 +1,24 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +@class MKTInvocation; +@class MKTInvocationMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTPrinter : NSObject + +- (NSString *)printMatcher:(MKTInvocationMatcher *)matcher; +- (NSString *)printInvocation:(MKTInvocation *)invocation; +- (NSString *)printMismatchOf:(MKTInvocation *)invocation + expectation:(MKTInvocationMatcher *)expectation; + +@end + + +FOUNDATION_EXPORT NSString *MKTOrdinal(NSUInteger index); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/MKTPrinter.m b/Pods/OCMockito/Source/OCMockito/Invocation/MKTPrinter.m new file mode 100644 index 0000000..437407e --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/MKTPrinter.m @@ -0,0 +1,170 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTPrinter.h" + +#import "MKTInvocation.h" +#import "MKTInvocationMatcher.h" +#import "NSInvocation+OCMockito.h" +#import +#import + + +@implementation MKTPrinter + +- (NSString *)printMatcher:(MKTInvocationMatcher *)matcher +{ + if (matcher.matchers.count == 0) + return [self printInvocationWithNoArguments:matcher.expected]; + return [self printMatcherWithArguments:matcher]; + +} + +- (NSString *)printMatcherWithArguments:(MKTInvocationMatcher *)matcher +{ + NSArray> *matchers = matcher.matchers; + NSArray *selectorParts = [NSStringFromSelector(matcher.expected.selector) componentsSeparatedByString:@":"]; + NSMutableString *result = [[NSMutableString alloc] init]; + for (NSUInteger index = 0; index < matchers.count; ++index) + { + HCStringDescription *description = [[HCStringDescription alloc] init]; + [matchers[index] describeTo:description]; + [result appendFormat:@" %@:%@", selectorParts[index], description]; + } + return [result substringFromIndex:1]; // Remove first space +} + +- (NSString *)printInvocation:(MKTInvocation *)invocation +{ + NSString *result; + if ([self invocationHasNoArguments:invocation.invocation]) + result = [self printInvocationWithNoArguments:invocation.invocation]; + else + result = [self printInvocationWithArguments:invocation.invocation]; + if (invocation.verified) + result = [@"✓ " stringByAppendingString:result]; + return result; +} + +- (BOOL)invocationHasNoArguments:(NSInvocation *)invocation +{ + return invocation.methodSignature.numberOfArguments == 2; // Indices 0 and 1 are self and _cmd +} + +- (NSString *)printInvocationWithNoArguments:(NSInvocation *)invocation +{ + return NSStringFromSelector(invocation.selector); +} + +- (NSString *)printInvocationWithArguments:(NSInvocation *)invocation +{ + NSArray *arguments = [invocation mkt_arguments]; + NSArray *selectorParts = [NSStringFromSelector(invocation.selector) componentsSeparatedByString:@":"]; + NSMutableString *result = [[NSMutableString alloc] init]; + for (NSUInteger index = 0; index < arguments.count; ++index) + { + const char *argType = [invocation.methodSignature getArgumentTypeAtIndex:index + 2]; + [result appendFormat:@" %@:%@", selectorParts[index], [self printArgument:arguments[index] type:argType]]; + } + return [result substringFromIndex:1]; // Remove first space +} + +- (NSString *)printArgument:(id)arg type:(const char *)type +{ + if (arg == [NSNull null]) + return [self printNil]; + if (type[0] == @encode(Class)[0]) + return [self printClass:arg]; + if (type[0] == @encode(SEL)[0]) + return [self printSelector:arg]; + if ([arg isKindOfClass:[NSString class]]) + return [self printString:arg]; + if ([arg isKindOfClass:[NSNumber class]]) + return [self printNumber:arg type:type]; + if ([arg isKindOfClass:[NSArray class]]) + return [self printArray:arg]; + if ([arg isKindOfClass:[NSDictionary class]]) + return [self printDictionary:arg]; + return [arg description]; +} + +- (NSString *)printNil +{ + return @"nil"; +} + +- (NSString *)printClass:(id)className +{ + return [NSString stringWithFormat:@"[%@ class]", className]; +} + +- (NSString *)printSelector:(id)arg +{ + return [NSString stringWithFormat:@"@selector(%@)", arg]; +} + +- (NSString *)printString:(id)arg +{ + return [NSString stringWithFormat:@"@\"%@\"", arg]; +} + +- (NSString *)printNumber:(id)arg type:(const char *)type +{ + if (type[0] == @encode(id)[0]) + return [NSString stringWithFormat:@"@%@", arg]; + if (type[0] == @encode(BOOL)[0]) + return [arg boolValue] ? @"YES" : @"NO"; + return [arg description]; +} + +- (NSString *)printArray:(id)arg +{ + NSMutableArray *printedArgs = [[NSMutableArray alloc] init]; + for (id item in arg) + [printedArgs addObject:[self printArgument:item type:@encode(id)]]; + NSString *joinedArgs = [printedArgs componentsJoinedByString:@", "]; + return [NSString stringWithFormat:@"@[ %@ ]", joinedArgs]; +} + +- (NSString *)printDictionary:(id)arg +{ + NSMutableArray *printedArgs = [[NSMutableArray alloc] init]; + for (id key in [[arg allKeys] sortedArrayUsingSelector:@selector(compare:)]) + { + NSString *printedKey = [self printArgument:key type:@encode(id)]; + NSString *printedValue = [self printArgument:[arg objectForKey:key] type:@encode(id)]; + [printedArgs addObject:[NSString stringWithFormat:@"%@ : %@", printedKey, printedValue]]; + } + NSString *joinedArgs = [printedArgs componentsJoinedByString:@", "]; + return [NSString stringWithFormat:@"@{ %@ }", joinedArgs]; +} + +- (NSString *)printMismatchOf:(MKTInvocation *)invocation + expectation:(MKTInvocationMatcher *)expectation +{ + NSMutableString *result = [[NSMutableString alloc] init]; + [expectation enumerateMismatchesOf:invocation.invocation + usingBlock:^(NSUInteger index, NSString *mismatchDescription) { + [result appendString:[NSString stringWithFormat: + @"\nMismatch in %@ argument. %@", MKTOrdinal(index), mismatchDescription]]; + }]; + return result; +} + +@end + + +NSString *MKTOrdinal(NSUInteger index) +{ + index += 1; + NSString *suffix; + if (index == 1) + suffix = @"st"; + else if (index == 2) + suffix = @"nd"; + else if (index == 3) + suffix = @"rd"; + else + suffix = @"th"; + return [NSString stringWithFormat:@"%lu%@", (unsigned long)index, suffix]; +} diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/NSInvocation+OCMockito.h b/Pods/OCMockito/Source/OCMockito/Invocation/NSInvocation+OCMockito.h new file mode 100644 index 0000000..99bddd3 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/NSInvocation+OCMockito.h @@ -0,0 +1,35 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract NSInvocation helper methods + */ +@interface NSInvocation (OCMockito) + +/*! + * @abstract Returns all invocation arguments in an NSArray. + * @discussion Non-object arguments are boxed as follows: + *
    + *
  • nil: NSNull
  • + *
  • Primitive numeric values: NSNumber
  • + *
  • Pointers: NSValue
  • + *
  • Selectors: NSString
  • + *
  • Structs: NSData
  • + *
+ */ +- (NSArray *)mkt_arguments; + +/*! @abstract Sets invocation return value. */ +- (void)mkt_setReturnValue:(nullable id)returnValue; + +/*! @abstract Retains arguments but with weak invocation target to avoid retain cycles. */ +- (void)mkt_retainArgumentsWithWeakTarget; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Invocation/NSInvocation+OCMockito.m b/Pods/OCMockito/Source/OCMockito/Invocation/NSInvocation+OCMockito.m new file mode 100644 index 0000000..5b7ae97 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Invocation/NSInvocation+OCMockito.m @@ -0,0 +1,52 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "NSInvocation+OCMockito.h" + +#import "MKTArgumentGetter.h" +#import "MKTArgumentGetterChain.h" +#import "MKTReturnValueSetter.h" +#import "MKTReturnValueSetterChain.h" +#import "MKT_TPDWeakProxy.h" + + +@implementation NSInvocation (OCMockito) + +- (NSArray *)mkt_arguments +{ + NSMethodSignature *signature = self.methodSignature; + NSUInteger numberOfArguments = signature.numberOfArguments; + NSMutableArray *arguments = [NSMutableArray arrayWithCapacity:numberOfArguments - 2]; + + for (NSUInteger idx = 2; idx < numberOfArguments; ++idx) // Indices 0 and 1 are self and _cmd + { + const char *argType = [signature getArgumentTypeAtIndex:idx]; + id arg = [MKTArgumentGetterChain() retrieveArgumentAtIndex:(NSInteger)idx ofType:argType onInvocation:self]; + if (arg) + [arguments addObject:arg]; + else + { + NSLog(@"mkt_arguments unhandled type: %s", argType); + [arguments addObject:[NSNull null]]; + } + } + + return arguments; +} + +- (void)mkt_setReturnValue:(nullable id)returnValue +{ + char const *returnType = self.methodSignature.methodReturnType; + [MKTReturnValueSetterChain() setReturnValue:returnValue ofType:returnType onInvocation:self]; +} + +- (void)mkt_retainArgumentsWithWeakTarget +{ + if (self.argumentsRetained) + return; + MKT_TPDWeakProxy *proxy = [[MKT_TPDWeakProxy alloc] initWithObject:self.target]; + self.target = proxy; + [self retainArguments]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTBaseMockObject.h b/Pods/OCMockito/Source/OCMockito/Mocking/MKTBaseMockObject.h new file mode 100644 index 0000000..557cbf5 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTBaseMockObject.h @@ -0,0 +1,19 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import +#import + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTBaseMockObject : NSProxy + ++ (BOOL)isMockObject:(nullable id)object; + +- (instancetype)init; +- (void)stopMocking; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTBaseMockObject.m b/Pods/OCMockito/Source/OCMockito/Mocking/MKTBaseMockObject.m new file mode 100644 index 0000000..399dd56 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTBaseMockObject.m @@ -0,0 +1,128 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTBaseMockObject.h" + +#import "MKTInvocationContainer.h" +#import "MKTInvocationMatcher.h" +#import "MKTMockingProgress.h" +#import "MKTOngoingStubbing.h" +#import "MKTStubbedInvocationMatcher.h" +#import "MKTVerificationData.h" +#import "MKTVerificationMode.h" +#import "NSInvocation+OCMockito.h" + + +@interface MKTBaseMockObject () +@property (nonatomic, strong, readonly) MKTMockingProgress *mockingProgress; +@property (nonatomic, strong) MKTInvocationContainer *invocationContainer; +@property (nonatomic, assign) BOOL stoppedMocking; +@end + +@implementation MKTBaseMockObject + ++ (BOOL)isMockObject:(nullable id)object +{ + NSString *className = NSStringFromClass([object class]); + return [className isEqualToString:@"MKTObjectMock"] || + [className isEqualToString:@"MKTProtocolMock"] || + [className isEqualToString:@"MKTClassObjectMock"] || + [className isEqualToString:@"MKTObjectAndProtocolMock"]; +} + +- (instancetype)init +{ + if (self) + { + _mockingProgress = [MKTMockingProgress sharedProgress]; + _invocationContainer = [[MKTInvocationContainer alloc] init]; + } + return self; +} + +- (void)stopMocking +{ + self.stoppedMocking = YES; + self.invocationContainer = nil; + [self.mockingProgress reset]; +} + +- (void)forwardInvocation:(NSInvocation *)invocation +{ + if (self.stoppedMocking) + return; + if ([self handlingVerifyOfInvocation:invocation]) + return; + + @synchronized (self) + { + [self prepareInvocationForStubbing:invocation]; + [self answerInvocation:invocation]; + } +} + +- (BOOL)handlingVerifyOfInvocation:(NSInvocation *)invocation +{ + id verificationMode = [self.mockingProgress pullVerificationMode]; + if (verificationMode) + [self verifyInvocation:invocation usingVerificationMode:verificationMode]; + return verificationMode != nil; + } + +- (void)verifyInvocation:(NSInvocation *)invocation usingVerificationMode:(id )verificationMode +{ + MKTInvocationMatcher *invocationMatcher = [self matcherWithInvocation:invocation]; + MKTVerificationData *data = [self verificationDataWithMatcher:invocationMatcher]; + [verificationMode verifyData:data testLocation:self.mockingProgress.testLocation]; +} + +- (MKTInvocationMatcher *)matcherWithInvocation:(NSInvocation *)invocation +{ + MKTInvocationMatcher *invocationMatcher = [self.mockingProgress pullInvocationMatcher]; + if (!invocationMatcher) + invocationMatcher = [[MKTInvocationMatcher alloc] init]; + [invocationMatcher setExpectedInvocation:invocation]; + return invocationMatcher; +} + +- (MKTVerificationData *)verificationDataWithMatcher:(MKTInvocationMatcher *)invocationMatcher +{ + return [[MKTVerificationData alloc] initWithInvocationContainer:self.invocationContainer + invocationMatcher:invocationMatcher]; +} + +- (void)prepareInvocationForStubbing:(NSInvocation *)invocation +{ + [self.invocationContainer setInvocationForPotentialStubbing:invocation]; + MKTOngoingStubbing *ongoingStubbing = + [[MKTOngoingStubbing alloc] initWithInvocationContainer:self.invocationContainer]; + [self.mockingProgress reportOngoingStubbing:ongoingStubbing]; +} + +- (void)answerInvocation:(NSInvocation *)invocation +{ + MKTStubbedInvocationMatcher *stubbedInvocation = [self.invocationContainer findAnswerFor:invocation]; + if (stubbedInvocation) + [self useExistingAnswerInStub:stubbedInvocation forInvocation:invocation]; +} + +- (void)useExistingAnswerInStub:(MKTStubbedInvocationMatcher *)stub forInvocation:(NSInvocation *)invocation +{ + [invocation mkt_setReturnValue:[stub answerInvocation:invocation]]; +} + + +#pragma mark - MKTNonObjectArgumentMatching + +- (id)withMatcher:(id )matcher forArgument:(NSUInteger)index +{ + [self.mockingProgress setMatcher:matcher forArgument:index]; + return self; +} + +- (id)withMatcher:(id )matcher +{ + return [self withMatcher:matcher forArgument:0]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTClassObjectMock.h b/Pods/OCMockito/Source/OCMockito/Mocking/MKTClassObjectMock.h new file mode 100644 index 0000000..fd3840d --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTClassObjectMock.h @@ -0,0 +1,23 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt +// Contribution by David Hart + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Mock object of a given class object. + */ +@interface MKTClassObjectMock : MKTBaseMockObject + +@property (nonatomic, strong, readonly) Class mockedClass; + +- (instancetype)initWithClass:(Class)aClass NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; +- (void)swizzleSingletonAtSelector:(SEL)singletonSelector; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTClassObjectMock.m b/Pods/OCMockito/Source/OCMockito/Mocking/MKTClassObjectMock.m new file mode 100644 index 0000000..6f380fe --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTClassObjectMock.m @@ -0,0 +1,63 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt +// Contribution by David Hart + +#import "MKTClassObjectMock.h" + +#import "MKTSingletonSwizzler.h" + + +@interface MKTClassObjectMock () +@property (nonatomic, strong) MKTSingletonSwizzler *swizzler; +@end + +@implementation MKTClassObjectMock + +- (instancetype)initWithClass:(Class)aClass +{ + self = [super init]; + if (self) + _mockedClass = aClass; + return self; +} + +- (MKTSingletonSwizzler *)swizzler +{ + if (!_swizzler) + _swizzler = [[MKTSingletonSwizzler alloc] initWithMock:self]; + return _swizzler; +} + +- (void)stopMocking +{ + if (_swizzler) + { + [_swizzler unswizzleSingletonsForMock]; // Explicitly call for 32-bit iOS because dealloc is called too late. + _swizzler = nil; + } + [super stopMocking]; +} + +- (NSString *)description +{ + return [@"mock class of " stringByAppendingString:NSStringFromClass(self.mockedClass)]; +} + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [self.mockedClass methodSignatureForSelector:aSelector]; +} + +- (void)swizzleSingletonAtSelector:(SEL)singletonSelector +{ + [self.swizzler swizzleSingletonAtSelector:singletonSelector]; +} + +#pragma mark - NSObject protocol + +- (BOOL)respondsToSelector:(SEL)aSelector +{ + return [self.mockedClass respondsToSelector:aSelector]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTDynamicProperties.h b/Pods/OCMockito/Source/OCMockito/Mocking/MKTDynamicProperties.h new file mode 100644 index 0000000..0c5e878 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTDynamicProperties.h @@ -0,0 +1,17 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTDynamicProperties : NSObject + +- (instancetype)initWithClass:(Class)aClass NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTDynamicProperties.m b/Pods/OCMockito/Source/OCMockito/Mocking/MKTDynamicProperties.m new file mode 100644 index 0000000..edd83c4 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTDynamicProperties.m @@ -0,0 +1,146 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTDynamicProperties.h" + +#import + + +@interface MKTDynamicProperties () +@property (nonnull, nonatomic, copy, readonly) NSDictionary *selectorToSignature; +@end + +@implementation MKTDynamicProperties + ++ (NSDictionary *)dynamicPropertySelectorsForClass:(Class)aClass +{ + NSMutableDictionary *result = [[NSMutableDictionary alloc] init]; + for (Class cls = aClass; cls != Nil; cls = [cls superclass]) + { + NSDictionary *properties = [self dynamicPropertySelectorsForSingleClass:cls]; + [result addEntriesFromDictionary:properties]; + } + return result; +} + ++ (NSDictionary *)dynamicPropertySelectorsForSingleClass:(Class)aClass +{ + NSMutableDictionary *result = [[NSMutableDictionary alloc] init]; + unsigned int propertyCount; + objc_property_t *properties = class_copyPropertyList(aClass, &propertyCount); + for (unsigned int i = 0; i < propertyCount; ++i) + [self addSelectorsForDynamicProperty:properties[i] toDictionary:result]; + free(properties); + return result; +} + ++ (void)addSelectorsForDynamicProperty:(objc_property_t)aProperty + toDictionary:(NSMutableDictionary *)dict +{ + BOOL isDynamic = [self isAttributeSet:"D" onProperty:aProperty]; + if (isDynamic) + [self addSelectorsForProperty:aProperty toDictionary:dict]; +} + ++ (BOOL)isAttributeSet:(const char *)attributeName onProperty:(objc_property_t)aProperty +{ + char *attributeValue = property_copyAttributeValue(aProperty, attributeName); + BOOL isSet = attributeValue != 0; + free(attributeValue); + return isSet; +} + ++ (NSString *)attributeNamed:(const char *)attributeName onProperty:(objc_property_t)aProperty +{ + NSString *attributeString; + char *attributeValue = property_copyAttributeValue(aProperty, attributeName); + if (attributeValue) + attributeString = [NSString stringWithUTF8String:attributeValue]; + free(attributeValue); + return attributeString; +} + ++ (void)addSelectorsForProperty:(objc_property_t)aProperty + toDictionary:(NSMutableDictionary *)dict +{ + dict[ [self getterNameForProperty:aProperty] ] = [self getterSignatureForProperty:aProperty]; + BOOL isReadonly = [self isAttributeSet:"R" onProperty:aProperty]; + if (!isReadonly) + dict[ [self setterNameForProperty:aProperty] ] = [self setterSignatureForProperty:aProperty]; +} + ++ (NSString *)getterNameForProperty:(objc_property_t)aProperty +{ + NSString *name = [self customGetterNameForProperty:aProperty]; + if (name) + return name; + return [self standardGetterNameForProperty:aProperty]; +} + ++ (NSString *)customGetterNameForProperty:(objc_property_t)aProperty +{ + return [self attributeNamed:"G" onProperty:aProperty]; +} + ++ (NSString *)standardGetterNameForProperty:(objc_property_t)aProperty +{ + return [NSString stringWithUTF8String:property_getName(aProperty)]; +} + ++ (NSString *)setterNameForProperty:(objc_property_t)aProperty +{ + NSString *name = [self customSetterNameForProperty:aProperty]; + if (name) + return name; + return [self standardSetterNameForProperty:aProperty]; +} + ++ (NSString *)customSetterNameForProperty:(objc_property_t)aProperty +{ + return [self attributeNamed:"S" onProperty:aProperty]; +} + ++ (NSString *)standardSetterNameForProperty:(objc_property_t)aProperty +{ + NSString *propertyName = [NSString stringWithUTF8String:property_getName(aProperty)]; + NSString *capitalizedFirstCharacter = [[propertyName substringToIndex:1] uppercaseString]; + NSString *capitalizedPropertyName = [propertyName stringByReplacingCharactersInRange:NSMakeRange(0, 1) + withString:capitalizedFirstCharacter]; + return [NSString stringWithFormat:@"set%@:", capitalizedPropertyName]; +} + ++ (NSMethodSignature *)getterSignatureForProperty:(objc_property_t)aProperty +{ + return [self signatureWithFormat:@"%@@:" forProperty:aProperty]; +} + ++ (NSMethodSignature *)setterSignatureForProperty:(objc_property_t)aProperty +{ + return [self signatureWithFormat:@"v@:%@" forProperty:aProperty]; +} + ++ (NSMethodSignature *)signatureWithFormat:(NSString *)format forProperty:(objc_property_t)aProperty +{ + NSString *signatureTypes = [NSString stringWithFormat:format, [self propertyType:aProperty]]; + return [NSMethodSignature signatureWithObjCTypes:[signatureTypes UTF8String]]; +} + ++ (NSString *)propertyType:(objc_property_t)aProperty +{ + return [self attributeNamed:"T" onProperty:aProperty]; +} + +- (instancetype)initWithClass:(Class)aClass +{ + self = [super init]; + if (self) + _selectorToSignature = [[[self class] dynamicPropertySelectorsForClass:aClass] copy]; + return self; +} + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return self.selectorToSignature[ NSStringFromSelector(aSelector) ]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectAndProtocolMock.h b/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectAndProtocolMock.h new file mode 100644 index 0000000..5d35980 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectAndProtocolMock.h @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt +// Contribution by Kevin Lundberg + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Mock object of a given class that also implements a given protocol. + */ +@interface MKTObjectAndProtocolMock : MKTProtocolMock + +- (instancetype)initWithClass:(Class)aClass protocol:(Protocol *)protocol NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithProtocol:(Protocol *)aProtocol + includeOptionalMethods:(BOOL)includeOptionalMethods NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectAndProtocolMock.m b/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectAndProtocolMock.m new file mode 100644 index 0000000..0b1b83d --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectAndProtocolMock.m @@ -0,0 +1,61 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt +// Contribution by Kevin Lundberg + +#import "MKTObjectAndProtocolMock.h" + +#import "MKTDynamicProperties.h" +#import + + +@interface MKTObjectAndProtocolMock () +@property (nonatomic, strong, readonly) Class mockedClass; +@property (nonatomic, strong, readonly) MKTDynamicProperties *dynamicProperties; +@end + +@implementation MKTObjectAndProtocolMock + +- (instancetype)initWithClass:(Class)aClass protocol:(Protocol *)protocol +{ + self = [super initWithProtocol:protocol includeOptionalMethods:YES]; + if (self) + { + _mockedClass = aClass; + _dynamicProperties = [[MKTDynamicProperties alloc] initWithClass:aClass]; + } + return self; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"mock object of %@ implementing %@ protocol", + NSStringFromClass(self.mockedClass), NSStringFromProtocol(self.mockedProtocol)]; +} + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + NSMethodSignature *dynamicPropertySignature = [self.dynamicProperties methodSignatureForSelector:aSelector]; + if (dynamicPropertySignature) + return dynamicPropertySignature; + NSMethodSignature *signature = [self.mockedClass instanceMethodSignatureForSelector:aSelector]; + if (signature) + return signature; + return [super methodSignatureForSelector:aSelector]; +} + + +#pragma mark - NSObject protocol + +- (BOOL)isKindOfClass:(Class)aClass +{ + return [self.mockedClass isSubclassOfClass:aClass]; +} + +- (BOOL)respondsToSelector:(SEL)aSelector +{ + return [self.dynamicProperties methodSignatureForSelector:aSelector] || + [self.mockedClass instancesRespondToSelector:aSelector] || + [super respondsToSelector:aSelector]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectMock.h b/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectMock.h new file mode 100644 index 0000000..fc75c22 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectMock.h @@ -0,0 +1,19 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTBaseMockObject.h" + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Mock object of a given class. + */ +@interface MKTObjectMock : MKTBaseMockObject + +- (instancetype)initWithClass:(Class)aClass NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectMock.m b/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectMock.m new file mode 100644 index 0000000..fbe329c --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTObjectMock.m @@ -0,0 +1,54 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTObjectMock.h" + +#import "MKTDynamicProperties.h" + + +@interface MKTObjectMock () +@property (nonatomic, strong, readonly) Class mockedClass; +@property (nonatomic, strong, readonly) MKTDynamicProperties *dynamicProperties; +@end + +@implementation MKTObjectMock + +- (instancetype)initWithClass:(Class)aClass +{ + self = [super init]; + if (self) + { + _mockedClass = aClass; + _dynamicProperties = [[MKTDynamicProperties alloc] initWithClass:aClass]; + } + return self; +} + +- (NSString *)description +{ + return [@"mock object of " stringByAppendingString:NSStringFromClass(self.mockedClass)]; +} + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + NSMethodSignature *dynamicPropertySignature = [self.dynamicProperties methodSignatureForSelector:aSelector]; + if (dynamicPropertySignature) + return dynamicPropertySignature; + return [self.mockedClass instanceMethodSignatureForSelector:aSelector]; +} + + +#pragma mark - NSObject protocol + +- (BOOL)isKindOfClass:(Class)aClass +{ + return [self.mockedClass isSubclassOfClass:aClass]; +} + +- (BOOL)respondsToSelector:(SEL)aSelector +{ + return [self.dynamicProperties methodSignatureForSelector:aSelector] || + [self.mockedClass instancesRespondToSelector:aSelector]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTProtocolMock.h b/Pods/OCMockito/Source/OCMockito/Mocking/MKTProtocolMock.h new file mode 100644 index 0000000..5329355 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTProtocolMock.h @@ -0,0 +1,22 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Mock object implementing a given protocol. + */ +@interface MKTProtocolMock : MKTBaseMockObject + +@property (nonatomic, strong, readonly) Protocol *mockedProtocol; + +- (instancetype)initWithProtocol:(Protocol *)aProtocol + includeOptionalMethods:(BOOL)includeOptionalMethods NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTProtocolMock.m b/Pods/OCMockito/Source/OCMockito/Mocking/MKTProtocolMock.m new file mode 100644 index 0000000..7999f01 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTProtocolMock.m @@ -0,0 +1,68 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTProtocolMock.h" + +#import + + +@interface MKTProtocolMock () +@property (nonatomic, assign, readonly) BOOL includeOptionalMethods; +@end + +@implementation MKTProtocolMock + +- (instancetype)initWithProtocol:(Protocol *)aProtocol + includeOptionalMethods:(BOOL)includeOptionalMethods +{ + self = [super init]; + if (self) + { + _mockedProtocol = aProtocol; + _includeOptionalMethods = includeOptionalMethods; + } + return self; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"mock implementer of %@ protocol", + NSStringFromProtocol(self.mockedProtocol)]; +} + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + struct objc_method_description methodDescription = + protocol_getMethodDescription(self.mockedProtocol, aSelector, YES, YES); + if (!methodDescription.name && self.includeOptionalMethods) + methodDescription = protocol_getMethodDescription(self.mockedProtocol, aSelector, NO, YES); + if (!methodDescription.name) + methodDescription = protocol_getMethodDescription(self.mockedProtocol, aSelector, YES, NO); + if (!methodDescription.name && self.includeOptionalMethods) + methodDescription = protocol_getMethodDescription(self.mockedProtocol, aSelector, NO, NO); + if (!methodDescription.name) + return nil; + return [NSMethodSignature signatureWithObjCTypes:methodDescription.types]; +} + +#pragma mark - NSObject protocol + +- (BOOL)conformsToProtocol:(Protocol *)aProtocol +{ + return protocol_conformsToProtocol(self.mockedProtocol, aProtocol); +} + +- (BOOL)respondsToSelector:(SEL)aSelector +{ + return [self methodSignatureForSelector:aSelector] != nil; +} + +#pragma mark - Support being called as isEqual: argument + +- (BOOL)isNSArray__ { return NO; } +- (BOOL)isNSData__ { return NO; } +- (BOOL)isNSDictionary__ { return NO; } +- (BOOL)isNSNumber__ { return NO; } +- (BOOL)isNSString__ { return NO; } + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTSingletonSwizzler.h b/Pods/OCMockito/Source/OCMockito/Mocking/MKTSingletonSwizzler.h new file mode 100644 index 0000000..654d6ed --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTSingletonSwizzler.h @@ -0,0 +1,21 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt +// Contribution by Igor Sales + +#import + +@class MKTClassObjectMock; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTSingletonSwizzler : NSObject + +- (instancetype)initWithMock:(MKTClassObjectMock *)classMock NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; +- (void)swizzleSingletonAtSelector:(SEL)singletonSelector; +- (void)unswizzleSingletonsForMock; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Mocking/MKTSingletonSwizzler.m b/Pods/OCMockito/Source/OCMockito/Mocking/MKTSingletonSwizzler.m new file mode 100644 index 0000000..be6e420 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Mocking/MKTSingletonSwizzler.m @@ -0,0 +1,144 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt +// Contribution by Igor Sales + +#import "MKTSingletonSwizzler.h" + +#import "MKTClassObjectMock.h" +#import + +@class MKTSingletonMapEntry; + +static NSMutableDictionary *singletonMap = nil; + +static NSString *singletonKey(Class aClass, SEL aSelector) +{ + return [NSString stringWithFormat:@"%@-%@", aClass, NSStringFromSelector(aSelector)]; +} + + +@interface MKTSingletonMapEntry : NSObject +@property (nonatomic, weak, readonly) MKTClassObjectMock *mock; +@property (nonatomic, assign, readonly) void *mockPtr; +@property (nonatomic, weak, readonly) Class mockedClass; +@property (nonatomic, assign, readonly) IMP oldIMP; +@property (nonatomic, assign, readonly) SEL selector; +@end + +@implementation MKTSingletonMapEntry + +- (instancetype)initWithMock:(MKTClassObjectMock *)mock IMP:(IMP)oldIMP selector:(SEL)aSelector +{ + self = [super init]; + if (self) + { + _mock = mock; + _mockPtr = (__bridge void *)mock; + _mockedClass = mock.mockedClass; + _oldIMP = oldIMP; + _selector = aSelector; + } + return self; +} + +- (BOOL)isForMockPtr:(void *)theMockPtr +{ + // We use the mockPtr as the tag to the mock, since the mock can be nullified + // when dealloc is called. The ptr here works as a unique tag to the mock. + return _mockPtr == theMockPtr; +} + +- (void)unswizzleSingleton +{ + Method originalMethod = class_getClassMethod(self.mockedClass, self.selector); + method_setImplementation(originalMethod, self.oldIMP); +} + +@end + + +@interface MKTSingletonSwizzler () +@property (nonatomic, weak) MKTClassObjectMock *classMock; +@property (nonatomic, assign) void *classMockPtr; +@end + +@implementation MKTSingletonSwizzler + ++ (void)initialize +{ + if (!singletonMap) + singletonMap = [[NSMutableDictionary alloc] init]; +} + ++ (id)mockSingleton +{ + MKTSingletonMapEntry *singleton = singletonMap[singletonKey(self, _cmd)]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + return [singleton.mock performSelector:_cmd withObject:nil]; +#pragma clang diagnostic pop +} + +- (instancetype)initWithMock:(MKTClassObjectMock *)classMock +{ + self = [super init]; + if (self) + { + _classMock = classMock; + _classMockPtr = (__bridge void *)classMock; + } + return self; +} + +- (void)dealloc +{ + [self unswizzleSingletonsForMock]; +} + +- (void)swizzleSingletonAtSelector:(SEL)singletonSelector +{ + MKTClassObjectMock *theMock = self.classMock; + IMP oldIMP = [self swizzleSingleton:singletonSelector forMock:theMock]; + [self registerSingleton:singletonSelector forMock:theMock oldIMP:oldIMP]; +} + +- (IMP)swizzleSingleton:(SEL)singletonSelector forMock:(MKTClassObjectMock *)theMock +{ + Method oldMethod = class_getClassMethod(theMock.mockedClass, singletonSelector); + Method newMethod = class_getClassMethod([self class], @selector(mockSingleton)); + IMP newIMP = method_getImplementation(newMethod); + return method_setImplementation(oldMethod, newIMP); +} + +- (void)registerSingleton:(SEL)singletonSelector + forMock:(MKTClassObjectMock *)theMock + oldIMP:(IMP)oldIMP +{ + NSString *key = singletonKey(theMock.mockedClass, singletonSelector); + MKTSingletonMapEntry *existingSingleton = singletonMap[key]; + if (existingSingleton) + oldIMP = existingSingleton.oldIMP; + singletonMap[key] = [[MKTSingletonMapEntry alloc] initWithMock:theMock + IMP:oldIMP + selector:singletonSelector]; +} + +- (void)unswizzleSingletonsForMock +{ + void *theMockPtr = self.classMockPtr; + NSMutableArray *keysToRemove = [[NSMutableArray alloc] init]; + + [singletonMap enumerateKeysAndObjectsUsingBlock:^(NSString *key, + MKTSingletonMapEntry *swizzled, + BOOL *stop) { + if ([swizzled isForMockPtr:theMockPtr]) + { + [swizzled unswizzleSingleton]; + [keysToRemove addObject:key]; + } + }]; + + [singletonMap removeObjectsForKeys:keysToRemove]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTAnswer.h b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTAnswer.h new file mode 100644 index 0000000..bff0c35 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTAnswer.h @@ -0,0 +1,24 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Specifies an action that is executed and a return value that is returned when you + * interact with the mock. + */ +@protocol MKTAnswer + +/*! + * @abstract Answer a particular invocation. + * @param invocation Method invocation to answer. + * @return The value to be returned. + */ +- (nullable id)answerInvocation:(NSInvocation *)invocation; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTExecutesBlock.h b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTExecutesBlock.h new file mode 100644 index 0000000..5cb7904 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTExecutesBlock.h @@ -0,0 +1,19 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTAnswer.h" + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Method answer that executes a block. + */ +@interface MKTExecutesBlock : NSObject + +- (instancetype)initWithBlock:(id (^)(NSInvocation *))block NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTExecutesBlock.m b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTExecutesBlock.m new file mode 100644 index 0000000..e3816e8 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTExecutesBlock.m @@ -0,0 +1,26 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTExecutesBlock.h" + + +@interface MKTExecutesBlock () +@property (nonatomic, copy, readonly) id (^block)(NSInvocation *); +@end + +@implementation MKTExecutesBlock + +- (instancetype)initWithBlock:(id (^)(NSInvocation *))block +{ + self = [super init]; + if (self) + _block = [block copy]; + return self; +} + +- (nullable id)answerInvocation:(NSInvocation *)invocation +{ + return self.block(invocation); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTInvocationContainer.h b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTInvocationContainer.h new file mode 100644 index 0000000..6b5137a --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTInvocationContainer.h @@ -0,0 +1,28 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +@class MKTInvocation; +@class MKTInvocationMatcher; +@class MKTStubbedInvocationMatcher; +@protocol HCMatcher; +@protocol MKTAnswer; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTInvocationContainer : NSObject + +@property (nonatomic, copy, readonly) NSArray *registeredInvocations; + +- (instancetype)init NS_DESIGNATED_INITIALIZER; +- (void)setInvocationForPotentialStubbing:(NSInvocation *)invocation; +- (void)setMatcher:(id )matcher atIndex:(NSUInteger)argumentIndex; +- (void)addAnswer:(id )answer; +- (nullable MKTStubbedInvocationMatcher *)findAnswerFor:(NSInvocation *)invocation; +- (BOOL)isStubbingCopyMethod; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTInvocationContainer.m b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTInvocationContainer.m new file mode 100644 index 0000000..a18cd8e --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTInvocationContainer.m @@ -0,0 +1,74 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTInvocationContainer.h" + +#import "MKTStubbedInvocationMatcher.h" +#import "NSInvocation+OCMockito.h" +#import "MKTInvocation.h" + + +@interface MKTInvocationContainer () +@property (nonatomic, strong, readonly) NSMutableArray *mutableRegisteredInvocations; +@property (nonatomic, strong) MKTStubbedInvocationMatcher *invocationForStubbing; +@property (nonatomic, strong, readonly) NSMutableArray *stubbed; +@end + +@implementation MKTInvocationContainer + + +- (instancetype)init +{ + self = [super init]; + if (self) + { + _mutableRegisteredInvocations = [[NSMutableArray alloc] init]; + _stubbed = [[NSMutableArray alloc] init]; + } + return self; +} + +- (NSArray *)registeredInvocations +{ + return self.mutableRegisteredInvocations; +} + +- (void)setInvocationForPotentialStubbing:(NSInvocation *)invocation +{ + [invocation mkt_retainArgumentsWithWeakTarget]; + MKTInvocation *wrappedInvocation = [[MKTInvocation alloc] initWithInvocation:invocation]; + [self.mutableRegisteredInvocations addObject:wrappedInvocation]; + + MKTStubbedInvocationMatcher *s = [[MKTStubbedInvocationMatcher alloc] init]; + [s setExpectedInvocation:invocation]; + self.invocationForStubbing = s; +} + +- (void)setMatcher:(id )matcher atIndex:(NSUInteger)argumentIndex +{ + [self.invocationForStubbing setMatcher:matcher atIndex:argumentIndex]; +} + +- (void)addAnswer:(id )answer +{ + [self.mutableRegisteredInvocations removeLastObject]; + + [self.invocationForStubbing addAnswer:answer]; + [self.stubbed insertObject:self.invocationForStubbing atIndex:0]; +} + +- (nullable MKTStubbedInvocationMatcher *)findAnswerFor:(NSInvocation *)invocation +{ + for (MKTStubbedInvocationMatcher *s in [self.stubbed copy]) + if ([s matches:invocation]) + return s; + return nil; +} + +- (BOOL)isStubbingCopyMethod +{ + return self.registeredInvocations.count > 0 && + [self.registeredInvocations[0] invocation].selector == @selector(copy); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTOngoingStubbing.h b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTOngoingStubbing.h new file mode 100644 index 0000000..9771680 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTOngoingStubbing.h @@ -0,0 +1,152 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import +#import "MKTNonObjectArgumentMatching.h" + +@class MKTInvocationContainer; + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Methods to invoke on given(methodCall) to stub return values or behaviors. + * @discussion The methods return self to allow stubbing consecutive calls. The last + * stub determines the behavior of further consecutive calls. + */ +@interface MKTOngoingStubbing : NSObject + +- (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +/*! + * @abstract Sets an object to return when the method is called. + * @discussion Example: + *
[given([mock someMethod]) willReturn:@"FOO"];
+ * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturn:(nullable id)object; + +/*! + * @abstract Sets a struct to return when the method is called. + * @param value Pointer to struct. + * @param type \@encode() compiler directive called on the struct. + * @discussion + * Example: + *
[given([mock someMethod]) willReturnStruct:&myStruct objCType:\@encode(MyStructType)];
+ * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnStruct:(const void *)value objCType:(const char *)type; + +/*! + * @abstract Sets a BOOL to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnBool:(BOOL)value; + +/*! + * @abstract Sets a char to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnChar:(char)value; + +/*! + * @abstract Sets an int to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnInt:(int)value; + +/*! + * @abstract Sets a short to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnShort:(short)value; + +/*! + * @abstract Sets a long to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnLong:(long)value; + +/*! + * @abstract Sets a long long to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnLongLong:(long long)value; + +/*! + * @abstract Sets an NSInteger to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnInteger:(NSInteger)value; + +/*! + * @abstract Sets an unsigned char to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnUnsignedChar:(unsigned char)value; + +/*! + * @abstract Sets an unsigned int to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnUnsignedInt:(unsigned int)value; + +/*! + * @abstract Sets an unsigned short to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnUnsignedShort:(unsigned short)value; + +/*! + * @abstract Sets an unsigned long to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnUnsignedLong:(unsigned long)value; + +/*! + * @abstract Sets an unsigned long long to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnUnsignedLongLong:(unsigned long long)value; + +/*! + * @abstract Sets an NSUInteger to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnUnsignedInteger:(NSUInteger)value; + +/*! + * @abstract Sets a float to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnFloat:(float)value; + +/*! + * @abstract Sets a double to return when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willReturnDouble:(double)value; + +/*! + * @abstract Sets an NSException to be thrown when the method is called. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + * @discussion + * Example: + *
[given([mock someMethod]) willThrow:exception];
+ */ +- (MKTOngoingStubbing *)willThrow:(NSException *)exception; + +/*! + * @abstract Sets a block to be executed when the method is called. + * @discussion The block is evaluated when the method is called. The block can easily access + * invocation arguments by calling mkt_arguments. Whatever the block returns will be + * used as the stubbed return value. + * @return MKTOngoingStubbing object to allow stubbing consecutive calls + */ +- (MKTOngoingStubbing *)willDo:(id (^)(NSInvocation *))block; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTOngoingStubbing.m b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTOngoingStubbing.m new file mode 100644 index 0000000..942cd16 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTOngoingStubbing.m @@ -0,0 +1,180 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import +#import "MKTOngoingStubbing.h" + +#import "MKTBaseMockObject.h" +#import "MKTInvocationContainer.h" +#import "MKTReturnsValue.h" +#import "MKTThrowsException.h" +#import "MKTExecutesBlock.h" + + +@interface MKTOngoingStubbing () +@property (nonatomic, strong, readonly) MKTInvocationContainer *invocationContainer; +@end + +@implementation MKTOngoingStubbing + +- (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer +{ + self = [super init]; + if (self) + _invocationContainer = invocationContainer; + return self; +} + +- (MKTOngoingStubbing *)willReturn:(nullable id)object +{ + // Workaround for over-releasing mock object that is stubbed as return value for copy method. + if (self.invocationContainer.isStubbingCopyMethod && [MKTBaseMockObject isMockObject:object]) + CFBridgingRetain(object); + + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:object]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnStruct:(const void *)value objCType:(const char *)type +{ + NSValue *answer = [NSValue valueWithBytes:value objCType:type]; + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:answer]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnBool:(BOOL)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnChar:(char)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnInt:(int)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnShort:(short)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnLong:(long)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnLongLong:(long long)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnInteger:(NSInteger)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnUnsignedChar:(unsigned char)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnUnsignedInt:(unsigned int)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnUnsignedShort:(unsigned short)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnUnsignedLong:(unsigned long)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnUnsignedLongLong:(unsigned long long)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnUnsignedInteger:(NSUInteger)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnFloat:(float)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willReturnDouble:(double)value +{ + MKTReturnsValue *returnsValue = [[MKTReturnsValue alloc] initWithValue:@(value)]; + [self.invocationContainer addAnswer:returnsValue]; + return self; +} + +- (MKTOngoingStubbing *)willThrow:(NSException *)exception +{ + MKTThrowsException *throwsException = [[MKTThrowsException alloc] initWithException:exception]; + [self.invocationContainer addAnswer:throwsException]; + return self; +} + +- (MKTOngoingStubbing *)willDo:(id (^)(NSInvocation *))block +{ + MKTExecutesBlock *executesBlock = [[MKTExecutesBlock alloc] initWithBlock:block]; + [self.invocationContainer addAnswer:executesBlock]; + return self; +} + + +#pragma mark - MKTNonObjectArgumentMatching + +- (id)withMatcher:(id )matcher forArgument:(NSUInteger)index +{ + [self.invocationContainer setMatcher:matcher atIndex:index]; + return self; +} + +- (id)withMatcher:(id )matcher +{ + return [self withMatcher:matcher forArgument:0]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTReturnsValue.h b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTReturnsValue.h new file mode 100644 index 0000000..eddf1ad --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTReturnsValue.h @@ -0,0 +1,19 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTAnswer.h" + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Method answer that returns a value. + */ +@interface MKTReturnsValue : NSObject + +- (instancetype)initWithValue:(nullable id)value NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTReturnsValue.m b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTReturnsValue.m new file mode 100644 index 0000000..e0912dd --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTReturnsValue.m @@ -0,0 +1,26 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTReturnsValue.h" + + +@interface MKTReturnsValue () +@property (nullable, nonatomic, strong, readonly) id value; +@end + +@implementation MKTReturnsValue + +- (instancetype)initWithValue:(nullable id)value +{ + self = [super init]; + if (self) + _value = value; + return self; +} + +- (nullable id)answerInvocation:(NSInvocation *)invocation +{ + return self.value; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTStubbedInvocationMatcher.h b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTStubbedInvocationMatcher.h new file mode 100644 index 0000000..fc11383 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTStubbedInvocationMatcher.h @@ -0,0 +1,16 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTInvocationMatcher.h" +#import "MKTAnswer.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTStubbedInvocationMatcher : MKTInvocationMatcher + +- (void)addAnswer:(id )answer; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTStubbedInvocationMatcher.m b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTStubbedInvocationMatcher.m new file mode 100644 index 0000000..f2396de --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTStubbedInvocationMatcher.m @@ -0,0 +1,36 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTStubbedInvocationMatcher.h" + + +@interface MKTStubbedInvocationMatcher () +@property (nonatomic, copy, readonly) NSMutableArray> *answers; +@property (nonatomic, assign) NSUInteger index; +@end + +@implementation MKTStubbedInvocationMatcher + +- (instancetype)init +{ + self = [super init]; + if (self) + _answers = [[NSMutableArray alloc] init]; + return self; +} + +- (void)addAnswer:(id )answer +{ + [self.answers addObject:answer]; +} + +- (nullable id)answerInvocation:(NSInvocation *)invocation +{ + id a = self.answers[self.index]; + NSUInteger bumpedIndex = self.index + 1; + if (bumpedIndex < self.answers.count) + self.index = bumpedIndex; + return [a answerInvocation:invocation]; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTThrowsException.h b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTThrowsException.h new file mode 100644 index 0000000..d0f88e3 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTThrowsException.h @@ -0,0 +1,19 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTAnswer.h" + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Method answer that throws an exception. + */ +@interface MKTThrowsException : NSObject + +- (instancetype)initWithException:(NSException *)exception NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Stubbing/MKTThrowsException.m b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTThrowsException.m new file mode 100644 index 0000000..d678d90 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Stubbing/MKTThrowsException.m @@ -0,0 +1,27 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTThrowsException.h" + + +@interface MKTThrowsException () +@property (nonatomic, strong, readonly) NSException *exception; +@end + +@implementation MKTThrowsException + +- (instancetype)initWithException:(NSException *)exception +{ + self = [super init]; + if (self) + _exception = exception; + return self; +} + +- (nullable id)answerInvocation:(NSInvocation *)invocation +{ + [self.exception raise]; + return nil; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.h b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.h new file mode 100644 index 0000000..ba656ea --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.h @@ -0,0 +1,22 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTInvocationsChecker.h" + +@class MKTInvocation; +@class MKTInvocationMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTAtLeastNumberOfInvocationsChecker : MKTInvocationsChecker + +- (instancetype)init NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithWantedDescription:(NSString *)wantedDescription NS_UNAVAILABLE; +- (nullable NSString *)checkInvocations:(NSArray *)invocations + wanted:(MKTInvocationMatcher *)wanted + wantedCount:(NSUInteger)wantedCount; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.m b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.m new file mode 100644 index 0000000..30d6dbd --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.m @@ -0,0 +1,29 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTAtLeastNumberOfInvocationsChecker.h" + +#import "MKTMatchingInvocationsFinder.h" + + +@implementation MKTAtLeastNumberOfInvocationsChecker + +- (instancetype)init +{ + self = [super initWithWantedDescription:@"Wanted at least"]; + return self; +} + +- (nullable NSString *)checkInvocations:(NSArray *)invocations + wanted:(MKTInvocationMatcher *)wanted + wantedCount:(NSUInteger)wantedCount +{ + [self.invocationsFinder findInvocationsInList:invocations matching:wanted]; + NSUInteger actualCount = self.invocationsFinder.count; + NSString *description; + if (wantedCount > actualCount) + description = [self tooLittleActual:actualCount wantedCount:wantedCount]; + return description; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastTimes.h b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastTimes.h new file mode 100644 index 0000000..a2104b1 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastTimes.h @@ -0,0 +1,18 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt +// Contribution by Markus Gasser + +#import +#import "MKTVerificationMode.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTAtLeastTimes : NSObject + +- (instancetype)initWithMinimumCount:(NSUInteger)minNumberOfInvocations NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastTimes.m b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastTimes.m new file mode 100644 index 0000000..a4473f3 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtLeastTimes.m @@ -0,0 +1,38 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt +// Contribution by Markus Gasser + +#import "MKTAtLeastTimes.h" + +#import "MKTAtLeastNumberOfInvocationsChecker.h" +#import "MKTVerificationData.h" + + +@interface MKTAtLeastTimes () +@property (nonatomic, assign, readonly) NSUInteger wantedCount; +@end + +@implementation MKTAtLeastTimes + +- (instancetype)initWithMinimumCount:(NSUInteger)minNumberOfInvocations +{ + self = [super init]; + if (self) + _wantedCount = minNumberOfInvocations; + return self; +} + + +#pragma mark - MKTVerificationMode + +- (void)verifyData:(MKTVerificationData *)data testLocation:(MKTTestLocation)testLocation +{ + MKTAtLeastNumberOfInvocationsChecker *checker = [[MKTAtLeastNumberOfInvocationsChecker alloc] init]; + NSString *failureDescription = [checker checkInvocations:data.invocations + wanted:data.wanted + wantedCount:self.wantedCount]; + if (failureDescription) + MKTFailTestLocation(testLocation, failureDescription); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostNumberOfInvocationsChecker.h b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostNumberOfInvocationsChecker.h new file mode 100644 index 0000000..3f49bd1 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostNumberOfInvocationsChecker.h @@ -0,0 +1,22 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTInvocationsChecker.h" + +@class MKTInvocation; +@class MKTInvocationMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTAtMostNumberOfInvocationsChecker : MKTInvocationsChecker + +- (instancetype)init NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithWantedDescription:(NSString *)wantedDescription NS_UNAVAILABLE; +- (nullable NSString *)checkInvocations:(NSArray *)invocations + wanted:(MKTInvocationMatcher *)wanted + wantedCount:(NSUInteger)wantedCount; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostNumberOfInvocationsChecker.m b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostNumberOfInvocationsChecker.m new file mode 100644 index 0000000..01397cf --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostNumberOfInvocationsChecker.m @@ -0,0 +1,31 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTAtMostNumberOfInvocationsChecker.h" + +#import "MKTMatchingInvocationsFinder.h" + + +@implementation MKTAtMostNumberOfInvocationsChecker + +- (instancetype)init +{ + self = [super initWithWantedDescription:@"Wanted at most"]; + return self; +} + +- (nullable NSString *)checkInvocations:(NSArray *)invocations + wanted:(MKTInvocationMatcher *)wanted + wantedCount:(NSUInteger)wantedCount +{ + [self.invocationsFinder findInvocationsInList:invocations matching:wanted]; + NSUInteger actualCount = self.invocationsFinder.count; + NSString *description; + if (wantedCount == 0 && actualCount > 0) + description = [self neverWantedButActual:actualCount]; + else if (wantedCount < actualCount) + description = [self tooManyActual:actualCount wantedCount:wantedCount]; + return description; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostTimes.h b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostTimes.h new file mode 100644 index 0000000..11fbba6 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostTimes.h @@ -0,0 +1,18 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt +// Contribution by Emile Cantin + +#import +#import "MKTVerificationMode.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTAtMostTimes : NSObject + +- (instancetype)initWithMaximumCount:(NSUInteger)maxNumberOfInvocations NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostTimes.m b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostTimes.m new file mode 100644 index 0000000..6e812c1 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTAtMostTimes.m @@ -0,0 +1,38 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt +// Contribution by Emile Cantin + +#import "MKTAtMostTimes.h" + +#import "MKTAtMostNumberOfInvocationsChecker.h" +#import "MKTVerificationData.h" + + +@interface MKTAtMostTimes () +@property (nonatomic, assign, readonly) NSUInteger wantedCount; +@end + +@implementation MKTAtMostTimes + +- (instancetype)initWithMaximumCount:(NSUInteger)maxNumberOfInvocations +{ + self = [super init]; + if (self) + _wantedCount = maxNumberOfInvocations; + return self; +} + + +#pragma mark - MKTVerificationMode + +- (void)verifyData:(MKTVerificationData *)data testLocation:(MKTTestLocation)testLocation +{ + MKTAtMostNumberOfInvocationsChecker *checker = [[MKTAtMostNumberOfInvocationsChecker alloc] init]; + NSString *failureDescription = [checker checkInvocations:data.invocations + wanted:data.wanted + wantedCount:self.wantedCount]; + if (failureDescription) + MKTFailTestLocation(testLocation, failureDescription); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTExactTimes.h b/Pods/OCMockito/Source/OCMockito/Verifying/MKTExactTimes.h new file mode 100644 index 0000000..2da4e5c --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTExactTimes.h @@ -0,0 +1,17 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import +#import "MKTVerificationMode.h" + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTExactTimes : NSObject + +- (instancetype)initWithCount:(NSUInteger)wantedNumberOfInvocations NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTExactTimes.m b/Pods/OCMockito/Source/OCMockito/Verifying/MKTExactTimes.m new file mode 100644 index 0000000..67a9145 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTExactTimes.m @@ -0,0 +1,50 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTExactTimes.h" + +#import "MKTInvocationMatcher.h" +#import "MKTNumberOfInvocationsChecker.h" +#import "MKTVerificationData.h" +#import "MKTMissingInvocationChecker.h" + + +@interface MKTExactTimes () +@property (nonatomic, assign, readonly) NSUInteger wantedCount; +@end + +@implementation MKTExactTimes + +- (instancetype)initWithCount:(NSUInteger)wantedNumberOfInvocations +{ + self = [super init]; + if (self) + _wantedCount = wantedNumberOfInvocations; + return self; +} + + +#pragma mark - MKTVerificationMode + +- (void)verifyData:(MKTVerificationData *)data testLocation:(MKTTestLocation)testLocation +{ + NSString *failureDescription; + if (self.wantedCount > 0) + { + MKTMissingInvocationChecker *missingInvocation = [[MKTMissingInvocationChecker alloc] init]; + failureDescription = [missingInvocation checkInvocations:data.invocations wanted:data.wanted]; + [data.wanted stopArgumentCapture]; + } + if (!failureDescription) + { + MKTNumberOfInvocationsChecker *numberOfInvocations = [[MKTNumberOfInvocationsChecker alloc] init]; + failureDescription = [numberOfInvocations checkInvocations:data.invocations + wanted:data.wanted + wantedCount:self.wantedCount]; + } + + if (failureDescription) + MKTFailTestLocation(testLocation, failureDescription); +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTInvocationsChecker.h b/Pods/OCMockito/Source/OCMockito/Verifying/MKTInvocationsChecker.h new file mode 100644 index 0000000..689294b --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTInvocationsChecker.h @@ -0,0 +1,23 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +@class MKTMatchingInvocationsFinder; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTInvocationsChecker : NSObject + +@property (nonatomic, strong) MKTMatchingInvocationsFinder *invocationsFinder; + +- (instancetype)initWithWantedDescription:(NSString *)wantedDescription NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; +- (NSString *)tooLittleActual:(NSUInteger)actualCount wantedCount:(NSUInteger)wantedCount; +- (NSString *)tooManyActual:(NSUInteger)actualCount wantedCount:(NSUInteger)wantedCount; +- (NSString *)neverWantedButActual:(NSUInteger)actualCount; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTInvocationsChecker.m b/Pods/OCMockito/Source/OCMockito/Verifying/MKTInvocationsChecker.m new file mode 100644 index 0000000..b32c10d --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTInvocationsChecker.m @@ -0,0 +1,84 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTNumberOfInvocationsChecker.h" + +#import "MKTMatchingInvocationsFinder.h" +#import "MKTLocation.h" + + +@interface MKTInvocationsChecker () +@property (nonatomic, copy) NSString *wantedDescription; +@end + +@implementation MKTInvocationsChecker + +- (instancetype)initWithWantedDescription:(NSString *)wantedDescription +{ + self = [super init]; + if (self) + self.wantedDescription = [wantedDescription copy]; + return self; +} + +- (MKTMatchingInvocationsFinder *)invocationsFinder +{ + if (!_invocationsFinder) + _invocationsFinder = [[MKTMatchingInvocationsFinder alloc] init]; + return _invocationsFinder; +} + +- (NSString *)tooLittleActual:(NSUInteger)actualCount wantedCount:(NSUInteger)wantedCount +{ + NSString *problem = [self describeWanted:wantedCount butWasCalled:actualCount]; + MKTLocation *location = [self.invocationsFinder locationOfLastInvocation]; + return [self joinProblem:problem location:location locationLabel:@"Last invocation:"]; +} + +- (NSString *)tooManyActual:(NSUInteger)actualCount wantedCount:(NSUInteger)wantedCount +{ + NSString *problem = [self describeWanted:wantedCount butWasCalled:actualCount]; + MKTLocation *location = [self.invocationsFinder locationOfInvocationAtIndex:wantedCount]; + return [self joinProblem:problem location:location locationLabel:@"Undesired invocation:"]; +} + +- (NSString *)neverWantedButActual:(NSUInteger)actualCount +{ + NSString *problem = [self describeNeverWantedButWasCalled:actualCount]; + MKTLocation *location = [self.invocationsFinder locationOfInvocationAtIndex:0]; + return [self joinProblem:problem location:location locationLabel:@"Undesired invocation:"]; +} + +- (NSString *)describeWanted:(NSUInteger)wantedCount butWasCalled:(NSUInteger)actualCount +{ + return [NSString stringWithFormat:@"%@ %@ but was called %@.", + [self wantedDescription], + [self pluralizeTimes:wantedCount], + [self pluralizeTimes:actualCount]]; +} + +- (NSString *)describeNeverWantedButWasCalled:(NSUInteger)actualCount +{ + return [NSString stringWithFormat:@"Never wanted but was called %@.", + [self pluralizeTimes:actualCount]]; +} + +- (NSString *)pluralizeTimes:(NSUInteger)count +{ + return count == 1 ? @"1 time" : [NSString stringWithFormat:@"%lu times", (unsigned long)count]; +} + +- (NSString *)joinProblem:(NSString *)problem + location:(MKTLocation *)location + locationLabel:(NSString *)locationLabel +{ + if (!location) + return problem; + else + { + NSString *report = [problem stringByAppendingFormat:@" %@\n", locationLabel]; + return [report stringByAppendingString:location.description]; + } +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTMissingInvocationChecker.h b/Pods/OCMockito/Source/OCMockito/Verifying/MKTMissingInvocationChecker.h new file mode 100644 index 0000000..b826a72 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTMissingInvocationChecker.h @@ -0,0 +1,23 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTInvocationsChecker.h" + +@class MKTInvocation; +@class MKTInvocationMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTMissingInvocationChecker : MKTInvocationsChecker + +- (instancetype)init NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithWantedDescription:(NSString *)wantedDescription NS_UNAVAILABLE; +- (nullable NSString *)checkInvocations:(NSArray *)invocations wanted:(MKTInvocationMatcher *)wanted; + +@end + + +MKTInvocation *MKTFindSimilarInvocation(NSArray *invocations, MKTInvocationMatcher *wanted); + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTMissingInvocationChecker.m b/Pods/OCMockito/Source/OCMockito/Verifying/MKTMissingInvocationChecker.m new file mode 100644 index 0000000..d18b2da --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTMissingInvocationChecker.m @@ -0,0 +1,91 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTMissingInvocationChecker.h" + +#import "MKTInvocation.h" +#import "MKTInvocationMatcher.h" +#import "MKTLocation.h" +#import "MKTMatchingInvocationsFinder.h" +#import "MKTPrinter.h" + + +@implementation MKTMissingInvocationChecker + +- (instancetype)init +{ + self = [super initWithWantedDescription:@"Missing"]; + return self; +} + +- (nullable NSString *)checkInvocations:(NSArray *)invocations wanted:(MKTInvocationMatcher *)wanted +{ + [self.invocationsFinder findInvocationsInList:invocations matching:wanted]; + NSString *description; + if (self.invocationsFinder.count == 0) + { + MKTInvocation *similar = MKTFindSimilarInvocation(invocations, wanted); + if (similar) + description = [self argumentsAreDifferent:similar wanted:wanted]; + else + description = [self wantedButNotInvoked:wanted otherInvocations:invocations]; + } + return description; +} + +- (NSString *)argumentsAreDifferent:(MKTInvocation *)actual wanted:(MKTInvocationMatcher *)wanted +{ + MKTPrinter *printer = [[MKTPrinter alloc] init]; + NSArray *description = @[ + @"Argument(s) are different!", + [@"Wanted: " stringByAppendingString:[printer printMatcher:wanted]], + @"Actual invocation has different arguments:", + [printer printInvocation:actual], + [printer printMismatchOf:actual expectation:wanted], + @"", + actual.location.description, + ]; + return [description componentsJoinedByString:@"\n"]; +} + +- (NSString *)wantedButNotInvoked:(MKTInvocationMatcher *)wanted + otherInvocations:(NSArray *)invocations +{ + MKTPrinter *printer = [[MKTPrinter alloc] init]; + NSMutableArray *description = [@[ + @"Wanted but not invoked:", + [printer printMatcher:wanted], + ] mutableCopy]; + + if (!invocations.count) + [description addObject:@"Actually, there were zero interactions with this mock."]; + else + [self reportOtherInvocations:invocations toDescriptionArray:description]; + + return [description componentsJoinedByString:@"\n"]; +} + +- (void)reportOtherInvocations:(NSArray *)invocations + toDescriptionArray:(NSMutableArray *)description +{ + MKTPrinter *printer = [[MKTPrinter alloc] init]; + [description addObject:@"However, there were other interactions with this mock (✓ means already verified):"]; + for (MKTInvocation *invocation in invocations) + { + [description addObject:@""]; + [description addObject:[printer printInvocation:invocation]]; + [description addObject:invocation.location.description]; + } +} + +@end + + +MKTInvocation *MKTFindSimilarInvocation(NSArray *invocations, MKTInvocationMatcher *wanted) +{ + NSUInteger index = [invocations indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { + MKTInvocation *inv = obj; + return !inv.verified && inv.invocation.selector == wanted.expected.selector; + }]; + return (index == NSNotFound) ? nil : invocations[index]; +} diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTNumberOfInvocationsChecker.h b/Pods/OCMockito/Source/OCMockito/Verifying/MKTNumberOfInvocationsChecker.h new file mode 100644 index 0000000..b77c62b --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTNumberOfInvocationsChecker.h @@ -0,0 +1,22 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTInvocationsChecker.h" + +@class MKTInvocation; +@class MKTInvocationMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTNumberOfInvocationsChecker : MKTInvocationsChecker + +- (instancetype)init NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithWantedDescription:(NSString *)wantedDescription NS_UNAVAILABLE; +- (nullable NSString *)checkInvocations:(NSArray *)invocations + wanted:(MKTInvocationMatcher *)wanted + wantedCount:(NSUInteger)wantedCount; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTNumberOfInvocationsChecker.m b/Pods/OCMockito/Source/OCMockito/Verifying/MKTNumberOfInvocationsChecker.m new file mode 100644 index 0000000..4bb52af --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTNumberOfInvocationsChecker.m @@ -0,0 +1,35 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTNumberOfInvocationsChecker.h" + +#import "MKTInvocationMatcher.h" +#import "MKTMatchingInvocationsFinder.h" + + +@implementation MKTNumberOfInvocationsChecker + +- (instancetype)init +{ + self = [super initWithWantedDescription:@"Wanted"]; + return self; +} + +- (nullable NSString *)checkInvocations:(NSArray *)invocations + wanted:(MKTInvocationMatcher *)wanted + wantedCount:(NSUInteger)wantedCount +{ + [self.invocationsFinder findInvocationsInList:invocations matching:wanted]; + NSUInteger actualCount = self.invocationsFinder.count; + NSString *description; + if (wantedCount > actualCount) + description = [self tooLittleActual:actualCount wantedCount:wantedCount]; + else if (wantedCount == 0 && actualCount > 0) + description = [self neverWantedButActual:actualCount]; + else if (wantedCount < actualCount) + description = [self tooManyActual:actualCount wantedCount:wantedCount]; + [self.invocationsFinder markInvocationsAsVerified]; + return description; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationData.h b/Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationData.h new file mode 100644 index 0000000..1385c2e --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationData.h @@ -0,0 +1,26 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import + +#import "MKTTestLocation.h" + +@class MKTInvocation; +@class MKTInvocationContainer; +@class MKTInvocationMatcher; + + +NS_ASSUME_NONNULL_BEGIN + +@interface MKTVerificationData : NSObject + +@property (nonatomic, copy, readonly) NSArray *invocations; +@property (nonatomic, strong, readonly) MKTInvocationMatcher *wanted; + +- (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer + invocationMatcher:(MKTInvocationMatcher *)wanted NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationData.m b/Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationData.m new file mode 100644 index 0000000..8264e21 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationData.m @@ -0,0 +1,35 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import "MKTVerificationData.h" + +#import "MKTInvocationContainer.h" + + +@interface MKTVerificationData () +@property (nonatomic, strong, readonly) MKTInvocationContainer *invocationContainer; +@end + + +@implementation MKTVerificationData + +@dynamic invocations; + +- (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer + invocationMatcher:(MKTInvocationMatcher *)wanted +{ + self = [super init]; + if (self) + { + _invocationContainer = invocationContainer; + _wanted = wanted; + } + return self; +} + +- (NSArray *)invocations +{ + return self.invocationContainer.registeredInvocations; +} + +@end diff --git a/Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationMode.h b/Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationMode.h new file mode 100644 index 0000000..e4b58a1 --- /dev/null +++ b/Pods/OCMockito/Source/OCMockito/Verifying/MKTVerificationMode.h @@ -0,0 +1,22 @@ +// OCMockito by Jon Reid, https://qualitycoding.org/ +// Copyright 2020 Quality Coding, Inc. See LICENSE.txt + +#import +#import "MKTTestLocation.h" + +@class MKTVerificationData; + + +NS_ASSUME_NONNULL_BEGIN + +/*! + * @abstract Allows verifying that certain behavior happened at least once / exact number of times / + * never. + */ +@protocol MKTVerificationMode + +- (void)verifyData:(MKTVerificationData *)data testLocation:(MKTTestLocation)testLocation; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Pods/OCMockito/Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.h b/Pods/OCMockito/Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.h new file mode 100644 index 0000000..e8a98d7 --- /dev/null +++ b/Pods/OCMockito/Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.h @@ -0,0 +1,25 @@ +// +// TPDWeakProxy.h +// TPDWeakProxy +// +// Copyright 2013 Tetherpad. +// + +#import + +/** + Instances of `TPDWeakProxy` hold a weak reference to the target object. + */ + +@interface MKT_TPDWeakProxy : NSProxy + +/** + Initializes an `TPDWeakProxy` object with the specified target object. + + @param object The target object for the proxy. + + @return The newly initialized proxy. + */ +- (instancetype)initWithObject:(id)object; + +@end diff --git a/Pods/OCMockito/Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.m b/Pods/OCMockito/Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.m new file mode 100644 index 0000000..b2f53da --- /dev/null +++ b/Pods/OCMockito/Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.m @@ -0,0 +1,56 @@ +// +// TPDWeakProxy.m +// TPDWeakProxy +// +// Copyright 2013 Tetherpad. +// + +#import "MKT_TPDWeakProxy.h" + +@interface MKT_TPDWeakProxy () + +@property (nonatomic, weak) id theObject; + +@end + +@implementation MKT_TPDWeakProxy + +- (instancetype)initWithObject:(id)object { + // No init method in superclass + self.theObject = object; + return self; +} + +// First, try to use the fast forwarding path. If theObject is nil +// the Objective C runtime will fall back to the older, slow path. This +// speeds up message forwarding performance a lot from tests; it's nearly +// as fast as directly messaging the object. If we return nil (ie, theObject +// has become dereferenced or was nil to begin with), the Objective C runtime +// falls back to the slow forwarding path. +- (id)forwardingTargetForSelector:(SEL)aSelector { + return self.theObject; +} + +// First step of the slow forwarding path is to figure out the method signature. +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { + NSMethodSignature *methodSignature; + // Keep a strong reference so we can safely send messages + id object = self.theObject; + if (object) { + methodSignature = [object methodSignatureForSelector:aSelector]; + } else { + // If obj is nil, we need to synthesize a NSMethodSignature. Smallest signature + // is (self, _cmd) according to the documention for NSMethodSignature. + NSString *types = [NSString stringWithFormat:@"%s%s", @encode(id), @encode(SEL)]; + methodSignature = [NSMethodSignature signatureWithObjCTypes:[types UTF8String]]; + } + return methodSignature; +} + +// The runtime uses the method signature from above to create an NSInvocation and asks us to +// forward it along as we see fit. +- (void)forwardInvocation:(NSInvocation *)anInvocation { + [anInvocation invokeWithTarget:self.theObject]; +} + +@end diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f0ac369 --- /dev/null +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,2393 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 000D6AE9D229BC3F590DD0ADB1980D7A /* HCTestFailure.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C65C64152C04FD20CEF60176C490BB4 /* HCTestFailure.m */; }; + 007CFCACD1DE9E498C1861D1B0C0BD3E /* MKTDoubleReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 458BD2863290A21B82FD7CED07513B56 /* MKTDoubleReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 024B76E463B79D2B3FA07A14997E768D /* HCIs.h in Headers */ = {isa = PBXBuildFile; fileRef = D54441B89453B0E34C285B8D687059F9 /* HCIs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03FB2E02AE2B5D6A43C81A5679248527 /* HCIsEqualIgnoringCase.h in Headers */ = {isa = PBXBuildFile; fileRef = FA04F455620B0CE7ACFA33960D1467D0 /* HCIsEqualIgnoringCase.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 041B3B24700B7D7C26DB68E5DE980BA6 /* HCReturnValueGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 462CC631461FF0F792689156760B4CFA /* HCReturnValueGetter.m */; }; + 050D6F8B082950B8B7D6F47F329E27E5 /* MKTInvocationMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 55D3B5BA02D597325C1B47FC13E4DD62 /* MKTInvocationMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 053C477676E052053EC59D397E651967 /* HCThrowsException.h in Headers */ = {isa = PBXBuildFile; fileRef = 231441CCBAC14BE463F54A8F059ECBD6 /* HCThrowsException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 06FFF54B9956171BD9472D9291423144 /* Pods-MonsterCardsTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 84154B65BFEB374DB9854DC227635944 /* Pods-MonsterCardsTests-dummy.m */; }; + 07ECDC2719E67DD355FB0325627FA7DC /* MKTPrinter.m in Sources */ = {isa = PBXBuildFile; fileRef = 207D144CA82E0A26F82DB0E9EC77D3E5 /* MKTPrinter.m */; }; + 0890F81E354DFE1754875ED86A440E39 /* MKTMissingInvocationChecker.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F3E25D867C0D0F5A09D3154F903EE09 /* MKTMissingInvocationChecker.m */; }; + 08FB169085AC496C67A2824F01448F5C /* HCRunloopRunner.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E0DFD1C1DA3EF7E7A1159BE7112B7E /* HCRunloopRunner.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 09DC129AD1DC0D71C6CB9AFCB0C9F41E /* MKTLongLongReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DBC5E7D6E166C07300DC815A802EF4C /* MKTLongLongReturnSetter.m */; }; + 0A8BD5E29B81EF33969F0415DA7ACB7F /* MKTUnsignedIntReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A93CD9BCB843D55CA727E8D320AF65D /* MKTUnsignedIntReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0B4324A994045E035E758562466C1CF5 /* HCWrapInMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F2F1271D254511FF8828377A5661BD2 /* HCWrapInMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0B5B334011EF1B488EA03CC79A618C17 /* HCIsInstanceOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 2752DF9F1761F64AB71B969B0517A87F /* HCIsInstanceOf.m */; }; + 0B6362177CE78E5EC130E18139E24B8B /* HCLongReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F4468038A53A4E62772D3CE30C169A0 /* HCLongReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0C0B7EC23570E84975084D3CFA1B3BAD /* MKTUnsignedIntReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 01B75014846B68D5E4FC1E4EC926EF6B /* MKTUnsignedIntReturnSetter.m */; }; + 0D6C006E9856FDFA561540FADEF6FBCA /* HCSenTestFailureReporter.h in Headers */ = {isa = PBXBuildFile; fileRef = F7E2A688E8857F1B64A972EE63951BF8 /* HCSenTestFailureReporter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0EF4B577B19F7EF7A4DAD254CB364CC5 /* HCIsCollectionContainingInAnyOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = 40DF8028297082B83984B1BBC81028F4 /* HCIsCollectionContainingInAnyOrder.m */; }; + 10184F01D9DC99F32C4385D01B3D3A15 /* HCTestFailureReporterChain.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FF893E6E27D0CBC633522E472808186 /* HCTestFailureReporterChain.m */; }; + 11149CCB2A9A50704E02070CF5756C04 /* MKTAtLeastNumberOfInvocationsChecker.m in Sources */ = {isa = PBXBuildFile; fileRef = 4920D12A419167DF2D8531ABD0408C61 /* MKTAtLeastNumberOfInvocationsChecker.m */; }; + 1419344017A2CF917B2C4CB1AF57468C /* HCStringContainsInOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = 85CFD448D9D20C68710FAD8CCA67A71A /* HCStringContainsInOrder.m */; }; + 14DAC98DD61451E4A4A396D16DA8AACE /* MKTMockitoCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 712F548A01DB50EB28795FE309B808B7 /* MKTMockitoCore.m */; }; + 16036080395AA27596094E1032E833C0 /* HCIsNot.m in Sources */ = {isa = PBXBuildFile; fileRef = 7612833D4D9B0694826B1C7DD7B00F67 /* HCIsNot.m */; }; + 16574C1CE1FF653DFC10700594AFF3AD /* HCWrapInMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E2A45A1C15CCE3AD2136871E73C9242 /* HCWrapInMatcher.m */; }; + 16E12F7DED167D441BFFFC1B002F15C4 /* HCUnsignedIntReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E361895501CA52BB097C79F0F4BE0CF /* HCUnsignedIntReturnGetter.m */; }; + 173CE0C56F8C1DDFD1FA6E906B311B10 /* MKTIntArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = D051BD45BE36582FA4E2D7129242385D /* MKTIntArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 19250D4658FAAE01098BF0F9D024408C /* HCConformsToProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = F6BAE999C32491BA132692CE0D32AD26 /* HCConformsToProtocol.m */; }; + 1ADE23BEA27AA947A3B33FD6BDE3799A /* HCOrderingComparison.m in Sources */ = {isa = PBXBuildFile; fileRef = D896C9EEE2A6626F4E6E2A4B1E60C28F /* HCOrderingComparison.m */; }; + 1B1E6CCD7088156EE6D2920649A6E34C /* MKTReturnsValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E16709A0241EF15E3184FDAA283BD /* MKTReturnsValue.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1B61706E9591558F16B03527C02BFF91 /* MKTExecutesBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 558E1ABEFD37DE62DD0154E12F5F137D /* MKTExecutesBlock.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1BDBD560BE2664102CC6F31F4CD4082C /* HCStringDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = C2B34606F998B7575B73A3D15954018F /* HCStringDescription.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1C09FD0BF350C2FD844880797FF6CE6C /* MKTClassObjectMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 9394581F1369B80095EBE1419E6069F4 /* MKTClassObjectMock.m */; }; + 1C1CA4744E2842E1EDEAA3C5C9BCAAF3 /* HCStringDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F872B73FCED382A0048C7E512E978FB /* HCStringDescription.m */; }; + 1C91BC105424317143C13B148565BB9D /* MKTObjectMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E505D922B739313AC0C2215D7D81E4D /* MKTObjectMock.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1D05F6683DED2C604FF00FAB992E111B /* MKTInvocationsChecker.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BC22DEB3F87D03E9B03144C593ED633 /* MKTInvocationsChecker.m */; }; + 1D1548B8F214EA762EB426CB349AEEFC /* MKTCharReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BF2F90513A67534C2FE246C03A17258 /* MKTCharReturnSetter.m */; }; + 1E3F280A971FBD6A9CAF3A15143EE6E7 /* MKTAtMostTimes.m in Sources */ = {isa = PBXBuildFile; fileRef = 80D698976F97CA2D552BCDCA05FCCD60 /* MKTAtMostTimes.m */; }; + 1E546795686D6FA2194E6DC1FD6C15E4 /* MKTClassArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FA62431AB0240FF502CA857D80416D6 /* MKTClassArgumentGetter.m */; }; + 1E72B91030D22AAC3BD87BB102494033 /* HCIntReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 957CA7FD5A86036E96B76D8935F0DC5B /* HCIntReturnGetter.m */; }; + 1ED6BADF11E390B9AC5D8D73DD887D60 /* MKTUnsignedCharArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 01DABDA5B4A117EB894E1A7651BBFB1C /* MKTUnsignedCharArgumentGetter.m */; }; + 1F2B66E4B7808A57C91637523D43452C /* HCSelfDescribing.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F7EDB84755BA039B7EB74DB2B177280 /* HCSelfDescribing.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F56A53B585C6B67BC069E72589C45BF /* MKTInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = E7A67A1A44F2960A12360B506A358C52 /* MKTInvocation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 23454080FBB7928B3547BCD0C561F088 /* MKTClassReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 732C09647A1595A77A68B7E771EF2006 /* MKTClassReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 23B08FED481426587D18EAEB44B92E1A /* NSInvocation+OCMockito.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EBDA32FA00ED85D46F2295D74014DA /* NSInvocation+OCMockito.m */; }; + 24ED8A49EE0A0C6D20DD073E0834D9E3 /* HCIsEqualIgnoringCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 07F4BB29822D8B212B182F4B4B03FCD0 /* HCIsEqualIgnoringCase.m */; }; + 2521C50830E7E62A6EB309870963D3BF /* HCDoubleReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9019F0652E4A94C9696DABA14F41A520 /* HCDoubleReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 26381969909F3D73632939D66F249DA2 /* HCUnsignedCharReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = E281B9CD86CE2C3467AE9FB5A3DD9EC3 /* HCUnsignedCharReturnGetter.m */; }; + 26606F306B1109CCB5F87433DB7FA0CF /* HCIsIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A4260D5C243F2A8B09A94F2508498E0 /* HCIsIn.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 26975DACB89D02E43C89CDFDE2538A19 /* HCIsCollectionContainingInOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = 8536450243E3C741A2199972639521B7 /* HCIsCollectionContainingInOrder.m */; }; + 26C7860E85997D7D1197607E2277D7D1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007D801A3A0A0E324725CD8431143BD8 /* Foundation.framework */; }; + 274B39E65659441AE99814A8405EABDE /* HCUnsignedLongReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = A2F9D51794366A72B340EE6DFA57799B /* HCUnsignedLongReturnGetter.m */; }; + 28EEE26BBFCFF822B8A26F1233BE87B1 /* MKTBaseMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E55C8F60934B9E3486B5400144D51B87 /* MKTBaseMockObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2911C262344AD0563321F5AC71474213 /* MKTArgumentGetterChain.m in Sources */ = {isa = PBXBuildFile; fileRef = C9C01738313ACD89E9768B737A71D896 /* MKTArgumentGetterChain.m */; }; + 292F0919E2C83D6BC2867842545C257B /* MKTBoolReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CDAA4D816A7367C058B9D5DCE8F668F /* MKTBoolReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2A35381F01D76BF3AF0DC617B447E90E /* NSInvocation+OCHamcrest.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F37A006BF149397DE1FDAF316B7803 /* NSInvocation+OCHamcrest.m */; }; + 2B28295A93B8A50D8D4388B396B3A90F /* MKTUnsignedIntArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 92F55CA5F8286B06B44D09C3FB03A233 /* MKTUnsignedIntArgumentGetter.m */; }; + 2B91F5CC95A53EA986042D1BD3D53185 /* MKTCharArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 62A84E3A6452BF7BCDA4ACC79DF3C44D /* MKTCharArgumentGetter.m */; }; + 2C852CEA74C9330186E553DEBC7250E2 /* HCIsCollectionContaining.m in Sources */ = {isa = PBXBuildFile; fileRef = 22DA62B7B321F17AC6E36AF664082E51 /* HCIsCollectionContaining.m */; }; + 2DA738D870214032687E2FDB34A6D880 /* HCMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 60917429A02D22A583C0B23DC95EA619 /* HCMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2E33E9C8A54CB5FBA05D5B9C2104211A /* OCHamcrest-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E8294C7DDB7FB24726F50BBB9D28E5A1 /* OCHamcrest-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2E505965867024705AA426A062D7FF0A /* OCMockito-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E0DB57E72A0782B49D3F4814ABAED49 /* OCMockito-dummy.m */; }; + 31A50B6F4CA3361B5C2E881244383689 /* HCSubstringMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = F89117F44AD93D49B4A1F16A1BBDE2E8 /* HCSubstringMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 322F2973A1EDE086B9DA59EF7446BF11 /* HCIsEqualToNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = A8D514ACCE5F36DD82C7C62549DEC79F /* HCIsEqualToNumber.m */; }; + 326797EE2A2C6B1F2E9A2653A634DC9F /* MKTUnsignedLongArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E3E28E517D5E40573CDD1CF19D0E2D /* MKTUnsignedLongArgumentGetter.m */; }; + 33152241D7378A62B68AEC4CF718B46B /* HCIsSame.m in Sources */ = {isa = PBXBuildFile; fileRef = 6285D2EAAA6C08360F10C86E04B765E3 /* HCIsSame.m */; }; + 33D152396681BE5A669712E405638A79 /* MKTShortArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = CA6C0B1B678EBAEB826C065F5923DCD0 /* MKTShortArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 3430EB598C0B5589772BE5A5E7C63910 /* MKTReturnValueSetterChain.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C8C81419E6D62EF0816BC942BB02CD8 /* MKTReturnValueSetterChain.m */; }; + 346BBA5395BA3D644DEF2E11681BD1BC /* HCBaseMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 02EFC5FFFDE7AAEA0ADD71736996FFF4 /* HCBaseMatcher.m */; }; + 34E805EFA72682AB7C5B05EA9D0D307E /* HCBaseDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C94B7AA30C516765BC3AFDDD944530F /* HCBaseDescription.m */; }; + 384A035CC298DD97E0401484C91EE4A0 /* HCIntReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = F8B4307580176F1666012922CD068E35 /* HCIntReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 391ECA650097E58277098CDA7BC10BC2 /* HCStringContains.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BD4447D27068D9840D768D1650C8E62 /* HCStringContains.m */; }; + 392DAC72FAEDB310E13E68AC6AB36C90 /* MKTInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 44F69EEC25EFDAA9F7D5A5FB8AC73E58 /* MKTInvocation.m */; }; + 3C421D44F6E0B3B1644D7F7296E0610D /* HCIsCloseTo.h in Headers */ = {isa = PBXBuildFile; fileRef = 436E43E5E1772B0DFE8B0FC7D4999C78 /* HCIsCloseTo.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3D73D3DBF73BE2556CE0505E138D52E8 /* HCIsEmptyCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = 111C1B293FAE8443619252C488AFB789 /* HCIsEmptyCollection.m */; }; + 3DADAAD7FB2C71B7DD6ED54A274EA581 /* HCLongReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 081615EDD706D6D9D71741A5D532762C /* HCLongReturnGetter.m */; }; + 3E28F25F2E2DBCDF542F5FBA2EBD17A0 /* MKTExecutesBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 444C303DDC591C6E560D356151507DC8 /* MKTExecutesBlock.m */; }; + 3F4F5E740D197C366BDE4D467CBF96C1 /* HCCharReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 115F66A544E70A0704D1EFE773B6F6A4 /* HCCharReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 3FFCBE09C913D2717E80B00EBA43537C /* MKTArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1041B75357FE4417A40F02B99718EA2A /* MKTArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 40A926206018ABF3AFF0ADDF94324643 /* HCDescribedAs.h in Headers */ = {isa = PBXBuildFile; fileRef = 12ED103768B5C3E59B3D08ACBB1E0046 /* HCDescribedAs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 42B1E0631CA3B7885477A35F35CC7096 /* MKTCharReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B63E72018F8DCD27388CB9C1F84CDFE /* MKTCharReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 43167D2EC4F181461BD3AF7EA6E131D7 /* HCThrowsException.m in Sources */ = {isa = PBXBuildFile; fileRef = 35AA24F7451D1D549C6D719969227E73 /* HCThrowsException.m */; }; + 438442E1A3A9E149D456BA8B04FCA5EF /* MKTObjectAndProtocolMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 25BC887A7D50946D54F0744DE276C1C6 /* MKTObjectAndProtocolMock.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4634AC3EE7CAC64A0EE9997413A63DDC /* MKTCallStackElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CD7E1137210E2720DBC38CAC205A782 /* MKTCallStackElement.m */; }; + 475A2C2CA379FF544DC96B8DB0311529 /* MKTNonObjectArgumentMatching.h in Headers */ = {isa = PBXBuildFile; fileRef = A38F1F105CC9E903B09A16428560AC8D /* MKTNonObjectArgumentMatching.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 476A5EF81FD8094181502B5A55651C10 /* HCIsCollectionContainingInOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E94D97424388D22FBF3742D69F039AC /* HCIsCollectionContainingInOrder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 47CABB81555E8F3EB29931B9ED6FFBF8 /* HCShortReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = A1239CBBA69233BDD6AD85A47B384CDE /* HCShortReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 48A7EBE2B8C7BE624B0C41E3B25A96C5 /* MKTAtLeastNumberOfInvocationsChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = F49226BB7D1E996426B97D5CD3BEA20A /* MKTAtLeastNumberOfInvocationsChecker.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 48CCE0FE8DEE43F765585D27EF18478B /* MKTAnswer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E693B636DFDFDFAF93F34658B76D57F /* MKTAnswer.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 4B152F3CFE798136C7C1C77C58166079 /* HCEvery.h in Headers */ = {isa = PBXBuildFile; fileRef = FD0D54259FF67E141B1901E1F97E4B4D /* HCEvery.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4B356B8F499039E373153A378240E04A /* HCIsInstanceOf.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BBC8E0F13D9CA3CADBA9BCA0D35AC30 /* HCIsInstanceOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4BAAB9A0B7757952CB9985525FDBDFCA /* HCIsSame.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D5CCBF28758495E16A6F54CD6B1709B /* HCIsSame.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4DDDD7D819B2FD6A26E6347987792F13 /* MKTBoolReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 14234E40E334C9012B4C42D5A2E47B20 /* MKTBoolReturnSetter.m */; }; + 4F266690C5B9672CEEC4F08CE23DC76B /* HCDiagnosingMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = A13C27BA36912BCE0EF3BA1A66A150AE /* HCDiagnosingMatcher.m */; }; + 4FD71B974D5DB38E841A9B2130BD2031 /* HCFloatReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = E175F49EE37A7857D4EF8B1EBBCBA704 /* HCFloatReturnGetter.m */; }; + 5073D56FACA487D1D0323D7377851C19 /* MKTStructArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 77D4F4AE23915C4B14B3B927567A3F8C /* MKTStructArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 53CAB1BD2AF24E54EB9BB7FEB0DE74EC /* MKTObjectMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C5515B3CB3B2F502D3328E746F1B06A /* MKTObjectMock.m */; }; + 598FBA999C9B6D901424C568FEA6DE23 /* HCLongLongReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A1EBA997CF7C9388D26D1ACC66AE8B4 /* HCLongLongReturnGetter.m */; }; + 5AA2FA9999F045EDFDADD750A6DB65B0 /* MKTArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 86ECF9340D3AAB01F0B3067438D46B19 /* MKTArgumentGetter.m */; }; + 5AF7CA09EB576EA2A19C9E31D9381828 /* MKT_TPDWeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C360162E92AD2029386138F2644805C /* MKT_TPDWeakProxy.m */; }; + 5B61EF6263EF1665ACD489F89A32BA46 /* MKTReturnValueSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A9CE8C344883AB5517B9289D3CE62BC /* MKTReturnValueSetter.m */; }; + 5BF9B7A15063FCA7D36CBFAAD810CADF /* HCAnyOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D9C31FABA1E532E2DF36E696888E27A /* HCAnyOf.m */; }; + 5C4A9A26CF5B4A2B7F04412FFF10396C /* NSInvocation+OCHamcrest.h in Headers */ = {isa = PBXBuildFile; fileRef = F2F77FAFE27EF46F643D67889728A577 /* NSInvocation+OCHamcrest.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 5C77C6E837AAF1167CE4356F5471BAF5 /* MKTBoolArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 907F58A470288CFDAC15F6D91459EB9C /* MKTBoolArgumentGetter.m */; }; + 5D301890CAA04EB8F7DEBD915EEAEE24 /* HCUnsignedLongLongReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = DEF12651806E15F983894A3855670CBD /* HCUnsignedLongLongReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 5FD39A4832484B83B5CD465CA311F8F9 /* HCSenTestFailureReporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 42C2C9797F1DCE7ACA6935B537A36EAF /* HCSenTestFailureReporter.m */; }; + 61A99009293679EA4237AA9B56F60D6B /* HCStringContainsInOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = F924445CF95A74938C7388E9F4370AE9 /* HCStringContainsInOrder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6216AC5E8DB91BF6C47A7636D731B3B6 /* HCIsCollectionContainingInAnyOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = 765A1A6A77B82DF1348BC203DB8700E1 /* HCIsCollectionContainingInAnyOrder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6279C99C1D064A82A041398EE966BA86 /* OCHamcrest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD727EBE516A6C61AD5BEF3204E7C3BD /* OCHamcrest.framework */; }; + 63EE4C5601F67C91A37ADDA21E4648F2 /* MKTAtMostNumberOfInvocationsChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 37D46A9D7B5F034E52DBE429970C830C /* MKTAtMostNumberOfInvocationsChecker.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 63F7E8A5FE8BF4EBE9B6DAD3E5FF3B13 /* MKTNumberOfInvocationsChecker.m in Sources */ = {isa = PBXBuildFile; fileRef = 873ABF4AB8A7991B752747062FCB51AC /* MKTNumberOfInvocationsChecker.m */; }; + 642F6CD92A1AA04369480C340F60D555 /* HCTestFailureReporter.h in Headers */ = {isa = PBXBuildFile; fileRef = AAB9DF0E28478192160AB8EC6811D9D2 /* HCTestFailureReporter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 65396A0F5D3EF41C80038E877E53E767 /* MKTFloatReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = EA12E949C744BD577BDBF65DDF8CC435 /* MKTFloatReturnSetter.m */; }; + 66468CFD75F747A2E88DB2BFC4603565 /* HCIsEmptyCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = D183B16503E7E68A9E9B8BE77AB07DFF /* HCIsEmptyCollection.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 66AA3F4543A7956E7F6F16F3E6B775C5 /* HCUnsignedShortReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BB92E0E60BFC98484622AADC36943C8 /* HCUnsignedShortReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 67347AAF7D2BCE70198A1D8540790A21 /* MKTClassReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = D460A5436A5E4153406D082733140750 /* MKTClassReturnSetter.m */; }; + 67C16B2404EE5CA49EEB4E4C65A48E9D /* HCIsCollectionOnlyContaining.m in Sources */ = {isa = PBXBuildFile; fileRef = A22E6B20A8830376B58016019EA26EDA /* HCIsCollectionOnlyContaining.m */; }; + 68260450D822AD3B2DE3029349E81C98 /* HCStringEndsWith.h in Headers */ = {isa = PBXBuildFile; fileRef = 381B0683777C9C9E7E4338161EA448C4 /* HCStringEndsWith.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 68399EA1BD0515475AF2761BAEC3A610 /* HCIsDictionaryContainingValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A0B26C3786C41EA86867FAF702128578 /* HCIsDictionaryContainingValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 68E1041F416D4DE86787EA149F83C307 /* MKTStructArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B9EB0943A6508B78A258A4D1692D213 /* MKTStructArgumentGetter.m */; }; + 690E3691D8F8E2FC259909C6E0A64F33 /* MKTInvocationContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B266C09019B3F63F1051024F37771FD /* MKTInvocationContainer.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6A394ACDD5098D71EB2E739A19144609 /* HCHasProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DB108F42179EFC48AE416AECA985501 /* HCHasProperty.m */; }; + 6A98090947417A9148F40868D41101C5 /* HCFloatReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = D628B61620DB6EB0ED2B3759A1D601E8 /* HCFloatReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 6AB0AB9F781FA05AC37A7A3C0CE66A3D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007D801A3A0A0E324725CD8431143BD8 /* Foundation.framework */; }; + 6C116019E55219DE5A5E06B780D72787 /* MKTMockingProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A255A81CA4550C0F3EEC667B070699 /* MKTMockingProgress.m */; }; + 6C204CD45445332B0FD1DD70811EE3A5 /* HCGenericTestFailureReporter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8B57E0E4D34A609056D4F2567E0463 /* HCGenericTestFailureReporter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 6C9EAA0FE1130D13921A7DBC94CBF553 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007D801A3A0A0E324725CD8431143BD8 /* Foundation.framework */; }; + 6D8C6D536B0FA535D03DFA503F3D014A /* HCLongLongReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 99A28D2A94C88375EAD626ED771CDC26 /* HCLongLongReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 6E2DBB311FFA07EB22FB8449639E175E /* HCIsDictionaryContainingKey.h in Headers */ = {isa = PBXBuildFile; fileRef = DDDFECD0040D1732869BECAF0E382319 /* HCIsDictionaryContainingKey.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6EC2B53CD5D26ED9FD24C14ED7BB4919 /* HCIsTypeOf.h in Headers */ = {isa = PBXBuildFile; fileRef = 8D4B8DC415B66B703626B9AC6C7B8369 /* HCIsTypeOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6F103825E351527ECF806631AEA2017E /* HCTestFailureReporterChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A4143D42B3E84CC031BF0DCE10D9309 /* HCTestFailureReporterChain.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 71B0FC0118CC4421904123A85E3E3D84 /* HCCollect.m in Sources */ = {isa = PBXBuildFile; fileRef = EF258D86B6D6346812957BCD93695AE3 /* HCCollect.m */; }; + 72C2BE1059638420BA271DCEF5F530EC /* MKTPointerArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2331CBFB327757FBA88D0D7AF4B70673 /* MKTPointerArgumentGetter.m */; }; + 73D1058E8EF9CDAA4CB06A9B51ABB972 /* MKTUnsignedIntArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A90BB06D5CC2236A79A6C720310609A /* MKTUnsignedIntArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 740AE91269EDAC807DDA6CF8A75B6E34 /* HCIsDictionaryContainingValue.m in Sources */ = {isa = PBXBuildFile; fileRef = B0D745B85DCC5C30B2E1C136361909D3 /* HCIsDictionaryContainingValue.m */; }; + 75ADB2384221380DD610C47F388A9DC0 /* MKTUnsignedCharReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = B3D921AE4B051F447D0B6B48CDD60D27 /* MKTUnsignedCharReturnSetter.m */; }; + 75CA58A6B185B7BD441882BB94F156E4 /* HCIsDictionaryContainingKey.m in Sources */ = {isa = PBXBuildFile; fileRef = E0DE1344B442C69D0420A46FC37E5ADC /* HCIsDictionaryContainingKey.m */; }; + 785C5C4B0462F94602021DC62269E1B5 /* Pods-MonsterCards-MonsterCardsUITests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CE8542716C33029CD29A4F008FC51A2 /* Pods-MonsterCards-MonsterCardsUITests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 78AB4554BB596F2459D8B27D5918F5AA /* HCBoolReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = CD143063B07B1E23CF91C80AB43DFE1E /* HCBoolReturnGetter.m */; }; + 78E82F408FF82023E7F8B190D7E01B38 /* HCObjectReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E065739ADEF8013C3C2148C748DDB7D /* HCObjectReturnGetter.m */; }; + 795DF7E92814FC4C1C1288898672850F /* MKTCallStackElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FAACE62919A576A4BF47A82B23A1AA7 /* MKTCallStackElement.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 796CFF523641A040AFD811530127E85F /* MKTAtLeastTimes.m in Sources */ = {isa = PBXBuildFile; fileRef = E3FEB3E11884160D8606669A40E1D0B5 /* MKTAtLeastTimes.m */; }; + 79C7106C5B303A3FE86911820C4B7A17 /* HCEvery.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5EEA20F92E7BA00140098761E804CA /* HCEvery.m */; }; + 7B0F98BDE64CB1B1F21D9D4EAFC5DDD8 /* HCTestFailure.h in Headers */ = {isa = PBXBuildFile; fileRef = F406AE154752E4C1115CE738E4FD81EF /* HCTestFailure.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7B7CE7C02FE3F0525BCFB074CB6FBA57 /* MKTClassObjectMock.h in Headers */ = {isa = PBXBuildFile; fileRef = EBC11A631E69A7151B32E94EDA69A134 /* MKTClassObjectMock.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7C20FD5B9ECC4C2314EDBCDD6661B5A1 /* HCRequireNonNilObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 9ECB1081C6206E90D879659EF60350A8 /* HCRequireNonNilObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7C6B61AF43078E58D4C5F5084AD1FC9F /* MKTAtLeastTimes.h in Headers */ = {isa = PBXBuildFile; fileRef = D620C88FC6781BB9560C47740B880782 /* MKTAtLeastTimes.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 7D79809388BA9B0624A0457D2CF3CC78 /* HCXCTestFailureReporter.h in Headers */ = {isa = PBXBuildFile; fileRef = DB35A320FA5D77588D90D14C26FE5615 /* HCXCTestFailureReporter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 7E13506EA2F3466772368654AA8F6C38 /* MKTOngoingStubbing.h in Headers */ = {isa = PBXBuildFile; fileRef = E39410740663C2E0A14F4081687DC91A /* MKTOngoingStubbing.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 80176F6E2E24FBAF29A8C55242D3C709 /* OCMockito.m in Sources */ = {isa = PBXBuildFile; fileRef = C60E4F725E1CB2116B6E7C88D81FD288 /* OCMockito.m */; }; + 813CA344C9E0275DC02EB3B68F1BF40E /* HCConformsToProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A58798FFD63433A2DC5DB80FBA6459F /* HCConformsToProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 816E49A41D0CE04FA8AF8BE6942B34C7 /* MKTLongLongArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 73E8D848016C63C2F4E672F9F39BAE81 /* MKTLongLongArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 81C193765AE203E5EAC50147EB55449B /* MKTLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = D1D4CEC433F252BAA6E88C7F6452B73F /* MKTLocation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 82D29B93735FF655E7F8910952ACE5C5 /* HCReturnValueGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = A96E0E8F901A72ACD6F39C2FF1B6A573 /* HCReturnValueGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 83FE6F14704CA6C8B33AADE4F3D79994 /* MKTBoolArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6938763A1A07A12C15F7C1353D471391 /* MKTBoolArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 863772A6EE57049E2007FDCAD9C6A630 /* HCAllOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 40074D7AED992C4CA8F8E339AFF944A5 /* HCAllOf.m */; }; + 88E2CED4CEF76CEC623CFE3B1EF18268 /* MKTLongLongArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = F4046E1A0C30486F4E309D40944EAD25 /* MKTLongLongArgumentGetter.m */; }; + 898C5E260B70246E2446BF9369B722AC /* MKTShortArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = F437F8EA2F4F80AE8B362B1426F240CE /* MKTShortArgumentGetter.m */; }; + 89A09174DF778F0854FBD15614E16B38 /* HCArgumentCaptor.h in Headers */ = {isa = PBXBuildFile; fileRef = CBD86395BE4EB3CE9E5D99C2FE09F97F /* HCArgumentCaptor.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8B52B5CA95BCCEA39331CE433225F40D /* HCDoubleReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A2161245E185CCE243DA3D3DB4E8A90 /* HCDoubleReturnGetter.m */; }; + 8C3907C34232366E1C68AF158E38E6FA /* Pods-MonsterCards-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 529737285A943113A232DF663BDD975A /* Pods-MonsterCards-dummy.m */; }; + 8C6A9A1F74DFCF7A30DEBB9408E9D865 /* MKTStubbedInvocationMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C2AE5F1CBE44A8AC158F91E76A9561F /* MKTStubbedInvocationMatcher.m */; }; + 8DD9CEEA16A8CE23F451843D99177751 /* MKTMissingInvocationChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 086FED0F18625DB02BF14B8D07C03229 /* MKTMissingInvocationChecker.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8E3F963AC815855ECF84FFF841EF1289 /* MKTFloatArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 98C3C63CA0908F34C5A72F4443CD3C01 /* MKTFloatArgumentGetter.m */; }; + 8F06868F19F645BC52F1D4359254B722 /* MKTStructReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A12FDE019356375BBCFA6581B2170A8 /* MKTStructReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8F737156BC90197CA15B0B71844E00DB /* MKTSelectorArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = E3E01A9E71DAD44F66EB69713F8D39A9 /* MKTSelectorArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 8FE460FF81A85BADA777AE75F1DE8E05 /* HCIs.m in Sources */ = {isa = PBXBuildFile; fileRef = 466DCB25F4DFF1E46ECE1A8A1FACAFB8 /* HCIs.m */; }; + 903CB755900E592163BBC79C1EA1B8AE /* MKTUnsignedLongReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = CE50CC9964C2E5BCA40BE1C1246A0457 /* MKTUnsignedLongReturnSetter.m */; }; + 90D4C852C5C3D549F368BE9DA573D875 /* MKTBaseMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CA8D8BAF7CD4B2A7EA0EF327E80BEE2 /* MKTBaseMockObject.m */; }; + 9188773F107A021B33AE8805DE4F9858 /* HCArgumentCaptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 592DCA7BB3111ABF7B1298324C5DB56B /* HCArgumentCaptor.m */; }; + 92457CFF6B60046C3532729D9EB4E68F /* OCMockito.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DEE98911D994708B4D35823CAF2F216 /* OCMockito.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 93273382A3E4B53183466202E893BC13 /* MKTUnsignedShortArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = D0BC998DFA3AD3C7727902C32D7B023C /* MKTUnsignedShortArgumentGetter.m */; }; + 95573254BBB3F3D4E2E6FA9B15F4FE43 /* HCCharReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EBB82F8627ABF2AB502B110AC96100C /* HCCharReturnGetter.m */; }; + 960AE809B6F84A7E201E1D6E3EC21997 /* MKT_TPDWeakProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 07F817FA9995AED3684CC19DAFC23A85 /* MKT_TPDWeakProxy.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9668948A1474DFC7F80BBE356F473157 /* HCIsNil.h in Headers */ = {isa = PBXBuildFile; fileRef = A7042956F1D5F4F414BC76421A11432A /* HCIsNil.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 96779644B3350ED6B6655D962302C911 /* HCAnyOf.h in Headers */ = {isa = PBXBuildFile; fileRef = 92FCBC51BD8B1191F982CE56D55A9C4D /* HCAnyOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9678DC116C79B7A0D691C88ABCA83020 /* HCObjectReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = D81351931406A73263288B05C493A7C2 /* HCObjectReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 96C9B828935A43B3034F2CE38BF231CC /* MKTSingletonSwizzler.h in Headers */ = {isa = PBXBuildFile; fileRef = E1F4FA881C7079D43BB7A9C4B895782A /* MKTSingletonSwizzler.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 974B554A8734595074EE5428BEED34E3 /* HCCollect.h in Headers */ = {isa = PBXBuildFile; fileRef = B8367BBBF4D142CAFEFC1116C1D51EC2 /* HCCollect.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 976C5437030860272AC776041C613F2B /* MKTUnsignedLongArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 81AAB22CC8D8D414A37DF85D06679267 /* MKTUnsignedLongArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 996356727CBAE60DD0BEE56843FEEBF1 /* MKTDynamicProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = A7469F06D3828C18C31E6569A40D5DC6 /* MKTDynamicProperties.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9C020033F0CFD42D86068EF8898A08EA /* MKTUnsignedLongLongArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C5C0249C92D0C2E0BC1D31DDEDF393C /* MKTUnsignedLongLongArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9C6D8E7EB6A2C54B72EE2925EE804C79 /* HCBaseMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = D0BB07666E0A1CAF3F959BBF7A123081 /* HCBaseMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9CE301579C8EA60560F27F202B774A1B /* MKTReturnValueSetterChain.h in Headers */ = {isa = PBXBuildFile; fileRef = E624982025C01963D77155028B6479C6 /* MKTReturnValueSetterChain.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 9F7AC0D1A5615F7654766CAAA5A3F836 /* MKTLongReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = C7510606B6F0EB6A7B0E29667AE8A9D3 /* MKTLongReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A0514CA796CFF6E4DF28FBEC60453AB1 /* HCIsDictionaryContaining.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E60BB4D20F2A1A3EF0EA94DEDC37226 /* HCIsDictionaryContaining.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A12EAC86AD08061397D637888623A105 /* MKTLongArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = C08D49E1A88FFC4410273AB164781864 /* MKTLongArgumentGetter.m */; }; + A1AA7C5B623D7A3D14CA3585B5E6F74F /* HCGenericTestFailureReporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 29592D6C91F92EA62595F1214C7171A0 /* HCGenericTestFailureReporter.m */; }; + A28C660AF8E3132E19E1AF055F4BE6A4 /* MKTArgumentGetterChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 81C0DC5B18405FA9D8F1CCAD8F6AEAE8 /* MKTArgumentGetterChain.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A432FFAD80299B04C87DDFC2C2954D06 /* MKTLongArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 801866461A95BB6BB06D7ACA13B0F7BF /* MKTLongArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A5609BEC1DA5A7870598A8A41E9643CE /* MKTDynamicProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = C5F7F23E1BE2809EE4D749C34164EFF7 /* MKTDynamicProperties.m */; }; + A6039AB9A7C924B413541A9B6E530746 /* HCIsNot.h in Headers */ = {isa = PBXBuildFile; fileRef = 5AAC733885BA6A203647044C6526696E /* HCIsNot.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A62EDCD9C0C55A0C303C7F13F6DDA54C /* MKTObjectArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = F4485BD63D4146F51B7A990D580C0D36 /* MKTObjectArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A6582DF5666FAD2198F54F080F167568 /* MKTFloatReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = A202F7038DF89580D0FE6BD754238A40 /* MKTFloatReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A6CB0D9A3AD325451BDF7DA26ECF6668 /* MKTThrowsException.h in Headers */ = {isa = PBXBuildFile; fileRef = 9EA4549FC719D29A4F6D8D37BECD26BF /* MKTThrowsException.h */; settings = {ATTRIBUTES = (Project, ); }; }; + A86B8B77B1B26FF18F288A26BF1E6974 /* HCIsEqualCompressingWhiteSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = E9D9780CA9FCEC917E117D6777B35BB1 /* HCIsEqualCompressingWhiteSpace.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A95BEA138372346299459B9FC04B565A /* MKTClassArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = AB0E4FC39671942C571870649F0F9A21 /* MKTClassArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AA0C9F2458A7AD9F0F7B7EABA4BEEAD2 /* Pods-MonsterCards-MonsterCardsUITests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3548D27B147D9EB5EB8E27D698482369 /* Pods-MonsterCards-MonsterCardsUITests-dummy.m */; }; + AA0F8C396A110A865044DEBD99EE9FDF /* MKTAtMostNumberOfInvocationsChecker.m in Sources */ = {isa = PBXBuildFile; fileRef = 23348E5CB510721F100C5513A0C5956C /* MKTAtMostNumberOfInvocationsChecker.m */; }; + ABBFB28E8C4720DD34B22BF7634E76B2 /* HCReturnTypeHandlerChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 1497C224AE3BEC0772BAB3B839DCD4DC /* HCReturnTypeHandlerChain.h */; settings = {ATTRIBUTES = (Private, ); }; }; + ABF3C3C5DC65CB7D23707D489919F133 /* HCShortReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FC881BC5AF31E1ED2C1B5A0813A0C89 /* HCShortReturnGetter.m */; }; + ABF75AB1EC0FBCA7558EBA622DE136B0 /* HCSubstringMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 7585A0B00554D868DE31B537DF34D0CB /* HCSubstringMatcher.m */; }; + ACC6DDE28E4F5D57D2095B246E14DAAB /* MKTInvocationContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = FCF2DF282EEAB03CD61A2E43644D9290 /* MKTInvocationContainer.m */; }; + ACD0EBBBCB3430BDB1465F673496A390 /* HCStringEndsWith.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E8B6B3EC8CF9EF224F4012BA559561C /* HCStringEndsWith.m */; }; + AD870B82A46051F18895EE2AAE014889 /* HCIsIn.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E2AFBD6FCB8143FACC8192C423940AB /* HCIsIn.m */; }; + ADB6523821D96B7347F2D32FC5CA3DCD /* HCIsDictionaryContainingEntries.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E2BD740DE1B84AA06B0F6CDD9272C5D /* HCIsDictionaryContainingEntries.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AF6C73D28E6CE1A8F7B3BE6D96B55916 /* HCIsCollectionContaining.h in Headers */ = {isa = PBXBuildFile; fileRef = A89EBE400C96D83CAC3B8C73DF6DDDEC /* HCIsCollectionContaining.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B00063E2A13A7E3C1187B523EC9EC84A /* Pods-MonsterCards-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 704354BA923B2E7FD3159A24BF234D07 /* Pods-MonsterCards-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B0C3D04FC62EC72CD69DEEC9FD9F3DE9 /* MKTReturnValueSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = E013CFA79F6F0CE1C0B54BF3EC0E4E5E /* MKTReturnValueSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B0CFB88146703B3B2AD0D1FBC0377903 /* HCUnsignedLongLongReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 206375FFA964013385748454D28BB1B6 /* HCUnsignedLongLongReturnGetter.m */; }; + B15A588C8E8BD49A101AE2EFA345B7F1 /* MKTUnsignedShortReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 45272A504E2D28004C6939415A77D8FB /* MKTUnsignedShortReturnSetter.m */; }; + B1A6829C9948D691B59F995086B4797F /* MKTVerificationData.h in Headers */ = {isa = PBXBuildFile; fileRef = C58AE3E63FCE7B1758DBBE1D1C38BB39 /* MKTVerificationData.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B243AB06E1F2507AA0F484FC1DDAA194 /* HCUnsignedShortReturnGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A9ADE98BFB51C4BC678151474E3EBD9 /* HCUnsignedShortReturnGetter.m */; }; + B53A0BC7F7444A22094BDDDBCC5BD3F0 /* MKTVerificationData.m in Sources */ = {isa = PBXBuildFile; fileRef = D8091FD4252078664713E9429EA020CF /* MKTVerificationData.m */; }; + B6ACC315E3575101FC7A7A75DADD8665 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007D801A3A0A0E324725CD8431143BD8 /* Foundation.framework */; }; + B83D883402AEC18120033F3404E353C6 /* MKTOngoingStubbing.m in Sources */ = {isa = PBXBuildFile; fileRef = 32BF8BE9EF675470A729BA22C1361A6D /* MKTOngoingStubbing.m */; }; + B855505B4523137603A9394B0C49EC9F /* HCNumberAssert.h in Headers */ = {isa = PBXBuildFile; fileRef = CC30C1058FE9C50C848DA495FB7036E4 /* HCNumberAssert.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B8D6D7BE7FED5F6877845BD90C43076D /* HCIsDictionaryContaining.m in Sources */ = {isa = PBXBuildFile; fileRef = D090E88473BF7C14D6F652C53B6E62D4 /* HCIsDictionaryContaining.m */; }; + B9E9E4C4B2254C5D2BAE95A44BE6FFF5 /* MKTSingletonSwizzler.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A751D230AC2B78734B21993A927BCA /* MKTSingletonSwizzler.m */; }; + BA525D6B55D2D1A2C1E6B5EE5E121E4C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007D801A3A0A0E324725CD8431143BD8 /* Foundation.framework */; }; + BA54CDCB57402D73D5DA632D891BDAEC /* MKTParseCallStack.m in Sources */ = {isa = PBXBuildFile; fileRef = 52AFD506CCDC1DCB953C4F35DCA640A6 /* MKTParseCallStack.m */; }; + BB9AD17BAE3F763736794C00398B5D7D /* MKTAtMostTimes.h in Headers */ = {isa = PBXBuildFile; fileRef = 9E185F0EACC15858F21C65B72D636B78 /* MKTAtMostTimes.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BBB324A1EE3B5262044B8BF362371384 /* MKTUnsignedLongLongReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 62E47137A99BDF813A811FCE1DE3F9AF /* MKTUnsignedLongLongReturnSetter.m */; }; + BC80D34F8897CB758F1F0004467F090E /* MKTInvocationsChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B85AAD38A9E495F5D0C1167CA2D84F7 /* MKTInvocationsChecker.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BC8293E691AA7B46E489871661C81CD7 /* MKTFloatArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8640CD298B3FD74592C355F11CC4B877 /* MKTFloatArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BCACF1A26BCDC7D9FE727E515A207DE3 /* HCIsTrueFalse.m in Sources */ = {isa = PBXBuildFile; fileRef = B2AEC6447906AEFB1CF6F9B0ECA301E5 /* HCIsTrueFalse.m */; }; + BE26604F948BA38EA039F4539132CFCF /* MKTThrowsException.m in Sources */ = {isa = PBXBuildFile; fileRef = AD19E9982D5E734D1032EF05DC5B1F97 /* MKTThrowsException.m */; }; + BE7049CB0B4277F967CA5E52DE7FB0FA /* HCBoolReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 91F44675681B10CE64FCE17A5A44F634 /* HCBoolReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BF98850EEDD30F10D396408E3FF6DFBE /* HCIsAnything.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C437764409E8FE79D38459CB315D6E4 /* HCIsAnything.m */; }; + BFF10FAE3F49C56480BFA67CFC66EABF /* HCHasDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 12EAED0BC67FA189C27C8F4E6173CC1C /* HCHasDescription.m */; }; + C009C1BAB56D1BF620C12C656698C89D /* MKTStubbedInvocationMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = E2313D2E2EABA4F71EFD3341B7A6E81A /* MKTStubbedInvocationMatcher.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C0E76C47DE90EC3AA19737C61C272645 /* MKTNumberOfInvocationsChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = F2CC95774F6F1213CF68852FAB2A9250 /* MKTNumberOfInvocationsChecker.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C26339769DE6B70C8F36108FA9E82EC4 /* HCRunloopRunner.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DFA9CEB9434F5CEF259B8FBCED1B1F /* HCRunloopRunner.m */; }; + C34E5BF7667891DA239A70241BB8787F /* HCInvocationMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = E8306C8B11C03982ED702C3E91FD9FD0 /* HCInvocationMatcher.m */; }; + C3A69DB7FE8775426246AE1D970ADD9B /* NSInvocation+OCMockito.h in Headers */ = {isa = PBXBuildFile; fileRef = 6328E2DA677910CDDA3A692E28C41D00 /* NSInvocation+OCMockito.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C40A4848255A8F87D6B0AB9F7E57A4B0 /* MKTPointerArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = EEFC62B3798DBBA384D124E151D0F66C /* MKTPointerArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C4DF90EB88F5CAE14EFB4D4FC5EA0FCF /* MKTReturnsValue.m in Sources */ = {isa = PBXBuildFile; fileRef = E4B1685C03F14987E2EA51F32F0E9817 /* MKTReturnsValue.m */; }; + C5980869746578E3F9DE37BFC194CE7B /* Pods-MonsterCardsTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C719025AA0018BF030D009382FF9C96 /* Pods-MonsterCardsTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C5E72C93136F64225F955F745D356C4D /* HCDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F25CC20C533A6EB4F38A65315C3A93B /* HCDescription.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C6FE9416C547905C1D957D6515FE4DE2 /* MKTSelectorArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = ACFFFBAB2BA0B628DA5A84AC107AA50E /* MKTSelectorArgumentGetter.m */; }; + C717F917396C678FB8F99A95F27B2EF9 /* MKTFilterCallStack.h in Headers */ = {isa = PBXBuildFile; fileRef = CE7953303F73675BFA44165DC0E26B82 /* MKTFilterCallStack.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C77002A345A31289F097C151DA56C730 /* HCIsCloseTo.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BC1E67223D24F99FBEA4CEA7EEE41B1 /* HCIsCloseTo.m */; }; + C82C5863ECDBD0481F99169F0D026588 /* MKTUnsignedLongLongReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = F566BC2D6E2FB121D49B779418D68E6A /* MKTUnsignedLongLongReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C8E8235C2E5269E9E2B40282928CA816 /* HCIsEqual.h in Headers */ = {isa = PBXBuildFile; fileRef = D69DE9A7FDFBA904D451536B0B6F96C1 /* HCIsEqual.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C90B45C579A373B3DEAAF3744E21F1D0 /* HCHasDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = EA7EDDDA5BC1BC0E456B810249400191 /* HCHasDescription.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C95CB935F3653CE08A4DAE8C41A7B1DF /* HCReturnTypeHandlerChain.m in Sources */ = {isa = PBXBuildFile; fileRef = 421EBC4EA258BE435D5627187F9923FA /* HCReturnTypeHandlerChain.m */; }; + C97C1A415CC68AAD55C3D79D132AABDE /* HCUnsignedLongReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8FF49DD53ED624F5A0AA80BBBBDBC439 /* HCUnsignedLongReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C9A29CC7A252AE2CE96E8B06FDC0BA06 /* HCInvocationMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 21301EC3688A9A071D836F3D977B605E /* HCInvocationMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C9BB324F47B4C930BBF9CB0AE644FC48 /* HCClassMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = C016CCAC267DE1A28312C12DFF47F85D /* HCClassMatcher.m */; }; + CA1EE97E99C4BE490D78046EC3EBD0D4 /* HCBaseDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = F8D0B09986BD2A23932BF5F7FC81A045 /* HCBaseDescription.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CBC2E60933D74BBBBCB459A271C964DB /* MKTTestLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 84BA696AA619B6D0F7EA279404DB530E /* MKTTestLocation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CBE56E2B4C064CE2A85AF2A5F9520725 /* HCOrderingComparison.h in Headers */ = {isa = PBXBuildFile; fileRef = 32EC260CE31FA061B78C8F38AEA93B96 /* HCOrderingComparison.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CC98BA6A906C0ECCD1871C71FFD4C53E /* HCAssertThat.h in Headers */ = {isa = PBXBuildFile; fileRef = D7C554A7AC2D9FD9BE1ACC0A210D1D2A /* HCAssertThat.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CD3E10B421D7BE2C05F304D642DC4945 /* MKTObjectReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = C7A38AF4A4625748B79BF5AD096910BF /* MKTObjectReturnSetter.m */; }; + CD4338E07BB253356EE153E9EB4B11BC /* HCNumberAssert.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F5FECF01852FF018CD57C24B635EEF6 /* HCNumberAssert.m */; }; + CD7C20CC0D3BE89833E2B88723F817A2 /* MKTObjectReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8768CC38C15E8D2828A93EE7E9E490F0 /* MKTObjectReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D0277F3AA8E43D773899C715FA094826 /* HCAssertThat.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6E6DF5C04893FABD0EE412429CAC5D /* HCAssertThat.m */; }; + D027A03F5B2A88D4A7EAB5101F7C1AD0 /* MKTDoubleReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 50B487E0A20C9CE23E428337914EF740 /* MKTDoubleReturnSetter.m */; }; + D104E377326C69FDAAC03B0CDC14E87F /* HCStringStartsWith.h in Headers */ = {isa = PBXBuildFile; fileRef = 589782DCDE095D4F1130D0C3B8A7CF7F /* HCStringStartsWith.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D1E5BC3B65257257D5639E617556E98C /* HCAllOf.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C90246A0036AA0F2032626B50C44EA9 /* HCAllOf.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D1E90544DD7596099F934505B7CD971A /* HCRequireNonNilObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FB0581EEE8D21EB74D81C8FB623919 /* HCRequireNonNilObject.m */; }; + D1F28DE86CDC94309235FD1AA73C7026 /* HCIsNil.m in Sources */ = {isa = PBXBuildFile; fileRef = F3E7DA0EEB24C37343A7D75DF4A73514 /* HCIsNil.m */; }; + D2BEB8CAE604F2D924B98FFFE8952295 /* MKTInvocationMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A38F0CE31D536EC0E0A9B3345828412 /* MKTInvocationMatcher.m */; }; + D2FC4EA5EF068F3518AC9AD92D0F4B22 /* HCHasCount.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F94BD177A5DA2F0C3361AE06BE23C77 /* HCHasCount.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D3EABE1367054ABFB68243209F16E34B /* OCHamcrest.h in Headers */ = {isa = PBXBuildFile; fileRef = 9850D8A995F2F35F0C35E8CA6FEF840F /* OCHamcrest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D51C0CD5CDBFD8B3F0FE1427AFE9A8DF /* HCTestFailureReporter.m in Sources */ = {isa = PBXBuildFile; fileRef = B2E678C69FB2A45B80D3A8EDE85F1DDC /* HCTestFailureReporter.m */; }; + D627CE9B858E835CBA8A281CB78C9FBB /* HCIsAnything.h in Headers */ = {isa = PBXBuildFile; fileRef = 308638B5A178D2DB437DD4A77368E02B /* HCIsAnything.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D66668C8D4B46716C04A9FCAC4A1E86B /* HCXCTestFailureReporter.m in Sources */ = {isa = PBXBuildFile; fileRef = F4370BB69BE59DB9293665A09CB4376E /* HCXCTestFailureReporter.m */; }; + D79FD0F7E069BDCD3FEC2C7C294B1E15 /* MKTMatchingInvocationsFinder.h in Headers */ = {isa = PBXBuildFile; fileRef = DF10E12C4DE292F2E990E68340006DDF /* MKTMatchingInvocationsFinder.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D812A230EC69FD24E4F11BEEA4AFAD52 /* MKTLongLongReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = F287D8D338B96291DF6E8C0C83250F7F /* MKTLongLongReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D92726845686E07EC82EC2653ADD19B1 /* MKTIntReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2133CFE70D680BF4AA7794C3459171E5 /* MKTIntReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D9A38AA7DE6787C9A7EF4843AA4D6D45 /* HCIsCollectionOnlyContaining.h in Headers */ = {isa = PBXBuildFile; fileRef = 20B8DB81E4C91BF0810519B6BFCB3737 /* HCIsCollectionOnlyContaining.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA262210C2E1B969F63B5A0A5E508BA4 /* MKTUnsignedLongReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E8D99BCDD5034A685B1132ABEE31787 /* MKTUnsignedLongReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DB0968805C2587E40ACC80C743EECDC2 /* HCIsCollectionContainingInRelativeOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = 251E8C872D2825C28F49B1990137E016 /* HCIsCollectionContainingInRelativeOrder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DB0DB49EFEE90A19D040DBCC51309B3D /* HCIsEqualToNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8CE7DD1D30153B5AD5C1CAD58933BD /* HCIsEqualToNumber.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DBBA5986F0B2FFE061AE9C7B5A1CD627 /* MKTVerificationMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8398143F67390EAF146864CF91A8624C /* MKTVerificationMode.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DBF4C50D2B9794519E461D5511116F59 /* HCIsTypeOf.m in Sources */ = {isa = PBXBuildFile; fileRef = 3514676781216A31840D3367AE870722 /* HCIsTypeOf.m */; }; + DE278B7AC58162F003E444BB690988CB /* HCIsEqual.m in Sources */ = {isa = PBXBuildFile; fileRef = 572EAD83F471E7F9BB9A04741CD17CD7 /* HCIsEqual.m */; }; + DF4DA15A858088BFBF7523F33887F69E /* MKTIntReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 087B9B2390D1C55B1740AEDA9909ABFE /* MKTIntReturnSetter.m */; }; + E01A3873A41D95F05C0B31BF6D30A7AF /* MKTObjectArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = B8B8CBC4DDAFAE06C2D69D1D6048E517 /* MKTObjectArgumentGetter.m */; }; + E082BEFB05F79CAC0A4821950E73F67F /* MKTIntArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = E4F7E266FADE4B56CBD62161CEB074B1 /* MKTIntArgumentGetter.m */; }; + E089B9D3659EC84826CD3C10C3C27723 /* OCHamcrest-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C1835F2EAFA904DF40CCC8A23D8FF8B0 /* OCHamcrest-dummy.m */; }; + E11C50FF8F20203F3AAA17501ADB123E /* MKTShortReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = A6E6938F87F891A7772A7B4026ED59DF /* MKTShortReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E1F4E7F7F887CB99A05EDD12129D8D9B /* HCIsDictionaryContainingEntries.m in Sources */ = {isa = PBXBuildFile; fileRef = 90DA4C38B0C2E813AD63BF807583FB53 /* HCIsDictionaryContainingEntries.m */; }; + E27DCE811674839FE59B091B059C9A2B /* HCDiagnosingMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 6509B0466A9E8566693B27F3D720F896 /* HCDiagnosingMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E2B41F7E69EB1AFB51F2DB6647A72EA2 /* MKTObjectAndProtocolMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 460F39594C0CA1F9FED8D53D423CF004 /* MKTObjectAndProtocolMock.m */; }; + E304846EEA81098F20D04EC84AFA503E /* MKTFilterCallStack.m in Sources */ = {isa = PBXBuildFile; fileRef = 90CBD512C8E0889278945E954D072F41 /* MKTFilterCallStack.m */; }; + E346C33012EBC4D12329C42A4765A213 /* MKTStructReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 712AFDB5E8B9A9BE3B1E16DE01D0997E /* MKTStructReturnSetter.m */; }; + E52E8929EE9D34A76662F233E6ECFB0F /* MKTTestLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = EF5DC0800B9EDCD568E8A0080E437D81 /* MKTTestLocation.m */; }; + E6D25D0C767F65C2A690D163E3D41524 /* MKTPrinter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8F56AB787D63007F14B0C61E33BD06 /* MKTPrinter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E72FF673EE58D635D8E18BD7E4E543BB /* MKTLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0AEFC2DB6ED39C44287A03E5F33D43 /* MKTLocation.m */; }; + E8D2FFCA392095D8AD042000C27C2AFB /* HCUnsignedIntReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = C973C5166E14C2B7A847EB016CE1A5EA /* HCUnsignedIntReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + E8D442DB031FEEB62433BE96C8AB33DB /* MKTMockingProgress.h in Headers */ = {isa = PBXBuildFile; fileRef = 00B61151F229419C15B5032E410EA5E5 /* MKTMockingProgress.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EAFE52965E1EF4DAA297E1261C7B480D /* HCHasCount.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B41B07476993B622F2DA6EE6C12878A /* HCHasCount.m */; }; + EDE3BC63F127E764B0426AAAEFA3969B /* HCHasProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = A8D638C1E26020B2CFA81955277F22B3 /* HCHasProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EF9B7395CBEF1A9FAA764FFAD8E588FE /* MKTUnsignedShortReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F2D5CE5E0B330A27CD201D504E1D71E /* MKTUnsignedShortReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F0E70AC299F0831C0E875C0706B907AC /* MKTDoubleArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DBFE2CABA8B83DEE912638FE4A55D68 /* MKTDoubleArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F1352F92DEA590ADAE9BBF0F2A5CC7C8 /* HCDescribedAs.m in Sources */ = {isa = PBXBuildFile; fileRef = 6900393B465D6921C292E903EEC32C1F /* HCDescribedAs.m */; }; + F1920988BF4895F6458491D272425929 /* HCIsTrueFalse.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B7551364E734142910761112DD1EBEC /* HCIsTrueFalse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F22429D68DDEE2184B0AEB98F40C8F63 /* MKTLongReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = A1C3B43C8DDB4D8451D16D7F772BBCFC /* MKTLongReturnSetter.m */; }; + F27FE51C4752E24304E8F42FE4993D1E /* MKTMatchingInvocationsFinder.m in Sources */ = {isa = PBXBuildFile; fileRef = 262887178D59E3BE71DA8A4F77FA08E6 /* MKTMatchingInvocationsFinder.m */; }; + F40A8A074A38D117C9A4E83AAF000B40 /* HCIsEqualCompressingWhiteSpace.m in Sources */ = {isa = PBXBuildFile; fileRef = B0B794D497B95C93EA694FB5B3CAA16A /* HCIsEqualCompressingWhiteSpace.m */; }; + F51A47DD70A6514F14D9E9D02744DAAB /* HCClassMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = A9FD53B491EC559392EB12C1AF4D047F /* HCClassMatcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F5B6023D722D37FD50408EFF48911585 /* MKTParseCallStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 333F751C5679F8CB01A6390F104DA084 /* MKTParseCallStack.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F729E8DE2F5FD7F645CBD3A41DF1F5CC /* HCStringContains.h in Headers */ = {isa = PBXBuildFile; fileRef = 6765FE3E095A10CCA04B316EB3FD0E81 /* HCStringContains.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F9AF6E11CD2CAA25EC4FBDF94DD8F2A4 /* MKTProtocolMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D41EE12A4E3D17A653D8F3E5B90D07 /* MKTProtocolMock.m */; }; + F9E1A871D3A2C5F571FFAB6EB7C74B72 /* MKTUnsignedLongLongArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BA98008ECCAC2D5B872900C6F7EF9C4 /* MKTUnsignedLongLongArgumentGetter.m */; }; + FADF8C53DC1796185FEBA94E1413996C /* MKTUnsignedCharReturnSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 559F60D5CAAC878835B98F05A09A9220 /* MKTUnsignedCharReturnSetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FAEA2BCC1BDC2A2B0806F97A63909F33 /* HCIsCollectionContainingInRelativeOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = 061256FA10FF86124EC40F139DF44B72 /* HCIsCollectionContainingInRelativeOrder.m */; }; + FB7CA42C054C925F7F67D21CF2E417F6 /* MKTExactTimes.h in Headers */ = {isa = PBXBuildFile; fileRef = 85194C9F20D4DE8555D24BFBE51573E7 /* MKTExactTimes.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FBAB26DC8C07C206183DA14A036EB05A /* MKTUnsignedShortArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C75B924AE86293F7EDE8408E95E7B0B /* MKTUnsignedShortArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FBB9799170F0043D6AE4058CC58FA58D /* MKTUnsignedCharArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 691AF08E70240ABA9D35D3D1E4E8FA24 /* MKTUnsignedCharArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FBEA576ACAF9BA84660624EFB3F6FD22 /* MKTCharArgumentGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 84DB22F6F637646B96962798407CD285 /* MKTCharArgumentGetter.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FBEBFF5AF28CE83D7481D44FF7897F8D /* MKTMockitoCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EF334ED943AAE463B1976F1C4B5B116 /* MKTMockitoCore.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FC37BF3C0C2AA42F1938481BA6E1FD79 /* HCUnsignedCharReturnGetter.h in Headers */ = {isa = PBXBuildFile; fileRef = BD01ABDA4BE87D80D5A9B9C1E63425A1 /* HCUnsignedCharReturnGetter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FC596A849369029B0E4387C8411481C8 /* HCStringStartsWith.m in Sources */ = {isa = PBXBuildFile; fileRef = D947CE2C6E92F9E4D72941C01E2F1B9A /* HCStringStartsWith.m */; }; + FD0A25135204FAC9F5C5BCAF990E14CB /* MKTProtocolMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E3F1B7ACC2FC096F1720E65C897C5C2 /* MKTProtocolMock.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FD871B4FB63F541866CB0E383D51655F /* MKTExactTimes.m in Sources */ = {isa = PBXBuildFile; fileRef = A1BD8FBA81108EA83B8A982B9FB74824 /* MKTExactTimes.m */; }; + FD9BD470897D28963744F23F19EE31CF /* MKTShortReturnSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = E638A8B5FFF49E7FC2DA85139374A7CE /* MKTShortReturnSetter.m */; }; + FE82EE9AC3F568191FE2FB991F41331E /* MKTDoubleArgumentGetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F89042174A732A619EDE40650224717 /* MKTDoubleArgumentGetter.m */; }; + FF1EFF50BE78AE27565E47329FC84571 /* OCMockito-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BF590D47280FDF772591A9EA877F3D6 /* OCMockito-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 1CF1631232C3163EA0BB2AE43FAAE62E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = AACA30CC7F0FBF6ECAE6A3C4719640F1; + remoteInfo = OCMockito; + }; + 4717827AB2FABA6AE183A8230B5D0B23 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8094467761B2E923813531849AE7B97A; + remoteInfo = OCHamcrest; + }; + 4DF46247F137333B9EE7BC1A5218905D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8094467761B2E923813531849AE7B97A; + remoteInfo = OCHamcrest; + }; + 66AE573E1C9F9BA80D87DF6912970F33 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8094467761B2E923813531849AE7B97A; + remoteInfo = OCHamcrest; + }; + 9F285A817613B5A578845AE89FF89FC6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6A406131E2AA05E2651ADFAF69491389; + remoteInfo = "Pods-MonsterCards"; + }; + B5E11172E52A8768A65CC5BF84E18079 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = AACA30CC7F0FBF6ECAE6A3C4719640F1; + remoteInfo = OCMockito; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 007D801A3A0A0E324725CD8431143BD8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 00B61151F229419C15B5032E410EA5E5 /* MKTMockingProgress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTMockingProgress.h; path = Source/OCMockito/Core/MKTMockingProgress.h; sourceTree = ""; }; + 01B75014846B68D5E4FC1E4EC926EF6B /* MKTUnsignedIntReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTUnsignedIntReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedIntReturnSetter.m; sourceTree = ""; }; + 01DABDA5B4A117EB894E1A7651BBFB1C /* MKTUnsignedCharArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTUnsignedCharArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.m; sourceTree = ""; }; + 02EFC5FFFDE7AAEA0ADD71736996FFF4 /* HCBaseMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCBaseMatcher.m; path = Source/Core/HCBaseMatcher.m; sourceTree = ""; }; + 045DB28517C8EA58CCDC139E15A4CA6A /* OCMockito-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OCMockito-prefix.pch"; sourceTree = ""; }; + 056C81AEEE03ED285AA14C3491D257EE /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; sourceTree = ""; }; + 061256FA10FF86124EC40F139DF44B72 /* HCIsCollectionContainingInRelativeOrder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsCollectionContainingInRelativeOrder.m; path = Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.m; sourceTree = ""; }; + 07F4BB29822D8B212B182F4B4B03FCD0 /* HCIsEqualIgnoringCase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsEqualIgnoringCase.m; path = Source/Library/Text/HCIsEqualIgnoringCase.m; sourceTree = ""; }; + 07F817FA9995AED3684CC19DAFC23A85 /* MKT_TPDWeakProxy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKT_TPDWeakProxy.h; path = "Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.h"; sourceTree = ""; }; + 081615EDD706D6D9D71741A5D532762C /* HCLongReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCLongReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.m; sourceTree = ""; }; + 086FED0F18625DB02BF14B8D07C03229 /* MKTMissingInvocationChecker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTMissingInvocationChecker.h; path = Source/OCMockito/Verifying/MKTMissingInvocationChecker.h; sourceTree = ""; }; + 087B9B2390D1C55B1740AEDA9909ABFE /* MKTIntReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTIntReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTIntReturnSetter.m; sourceTree = ""; }; + 08E0DFD1C1DA3EF7E7A1159BE7112B7E /* HCRunloopRunner.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCRunloopRunner.h; path = Source/Core/Helpers/HCRunloopRunner.h; sourceTree = ""; }; + 0A1EBA997CF7C9388D26D1ACC66AE8B4 /* HCLongLongReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCLongLongReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.m; sourceTree = ""; }; + 0A4260D5C243F2A8B09A94F2508498E0 /* HCIsIn.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsIn.h; path = Source/Library/Collection/HCIsIn.h; sourceTree = ""; }; + 0AEE95FDC2144C3DDC84BFFF0AD3286D /* Pods_MonsterCards_MonsterCardsUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MonsterCards_MonsterCardsUITests.framework; path = "Pods-MonsterCards-MonsterCardsUITests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0B266C09019B3F63F1051024F37771FD /* MKTInvocationContainer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTInvocationContainer.h; path = Source/OCMockito/Stubbing/MKTInvocationContainer.h; sourceTree = ""; }; + 0B63E72018F8DCD27388CB9C1F84CDFE /* MKTCharReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTCharReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.h; sourceTree = ""; }; + 0BF590D47280FDF772591A9EA877F3D6 /* OCMockito-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OCMockito-umbrella.h"; sourceTree = ""; }; + 0C2AE5F1CBE44A8AC158F91E76A9561F /* MKTStubbedInvocationMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTStubbedInvocationMatcher.m; path = Source/OCMockito/Stubbing/MKTStubbedInvocationMatcher.m; sourceTree = ""; }; + 0C75B924AE86293F7EDE8408E95E7B0B /* MKTUnsignedShortArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedShortArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedShortArgumentGetter.h; sourceTree = ""; }; + 0DBC5E7D6E166C07300DC815A802EF4C /* MKTLongLongReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTLongLongReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTLongLongReturnSetter.m; sourceTree = ""; }; + 0E505D922B739313AC0C2215D7D81E4D /* MKTObjectMock.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTObjectMock.h; path = Source/OCMockito/Mocking/MKTObjectMock.h; sourceTree = ""; }; + 0E8D99BCDD5034A685B1132ABEE31787 /* MKTUnsignedLongReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedLongReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.h; sourceTree = ""; }; + 0FA62431AB0240FF502CA857D80416D6 /* MKTClassArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTClassArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.m; sourceTree = ""; }; + 1041B75357FE4417A40F02B99718EA2A /* MKTArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.h; sourceTree = ""; }; + 11089B3864BDF5DACB86EBD5EEAB27AE /* Pods_MonsterCards.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MonsterCards.framework; path = "Pods-MonsterCards.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 111C1B293FAE8443619252C488AFB789 /* HCIsEmptyCollection.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsEmptyCollection.m; path = Source/Library/Collection/HCIsEmptyCollection.m; sourceTree = ""; }; + 115F66A544E70A0704D1EFE773B6F6A4 /* HCCharReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCCharReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.h; sourceTree = ""; }; + 12EAED0BC67FA189C27C8F4E6173CC1C /* HCHasDescription.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCHasDescription.m; path = Source/Library/Object/HCHasDescription.m; sourceTree = ""; }; + 12ED103768B5C3E59B3D08ACBB1E0046 /* HCDescribedAs.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCDescribedAs.h; path = Source/Library/Decorator/HCDescribedAs.h; sourceTree = ""; }; + 13CC220F804D92068162216E154A2C1F /* Pods-MonsterCardsTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MonsterCardsTests.debug.xcconfig"; sourceTree = ""; }; + 13E4E182A4FAFEAAAEC6EFB0D9E44EB5 /* Pods-MonsterCardsTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MonsterCardsTests-frameworks.sh"; sourceTree = ""; }; + 14234E40E334C9012B4C42D5A2E47B20 /* MKTBoolReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTBoolReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTBoolReturnSetter.m; sourceTree = ""; }; + 1497C224AE3BEC0772BAB3B839DCD4DC /* HCReturnTypeHandlerChain.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCReturnTypeHandlerChain.h; path = Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.h; sourceTree = ""; }; + 17FB0581EEE8D21EB74D81C8FB623919 /* HCRequireNonNilObject.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCRequireNonNilObject.m; path = Source/Core/Helpers/HCRequireNonNilObject.m; sourceTree = ""; }; + 1A9E16709A0241EF15E3184FDAA283BD /* MKTReturnsValue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTReturnsValue.h; path = Source/OCMockito/Stubbing/MKTReturnsValue.h; sourceTree = ""; }; + 1AAE1A2BD70149D0C19447ACC7945148 /* Pods-MonsterCardsTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MonsterCardsTests.release.xcconfig"; sourceTree = ""; }; + 1C94B7AA30C516765BC3AFDDD944530F /* HCBaseDescription.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCBaseDescription.m; path = Source/Core/HCBaseDescription.m; sourceTree = ""; }; + 1CE8542716C33029CD29A4F008FC51A2 /* Pods-MonsterCards-MonsterCardsUITests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MonsterCards-MonsterCardsUITests-umbrella.h"; sourceTree = ""; }; + 1E2AFBD6FCB8143FACC8192C423940AB /* HCIsIn.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsIn.m; path = Source/Library/Collection/HCIsIn.m; sourceTree = ""; }; + 1EF334ED943AAE463B1976F1C4B5B116 /* MKTMockitoCore.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTMockitoCore.h; path = Source/OCMockito/Core/MKTMockitoCore.h; sourceTree = ""; }; + 1F3E25D867C0D0F5A09D3154F903EE09 /* MKTMissingInvocationChecker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTMissingInvocationChecker.m; path = Source/OCMockito/Verifying/MKTMissingInvocationChecker.m; sourceTree = ""; }; + 1FAACE62919A576A4BF47A82B23A1AA7 /* MKTCallStackElement.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTCallStackElement.h; path = Source/OCMockito/Invocation/MKTCallStackElement.h; sourceTree = ""; }; + 206375FFA964013385748454D28BB1B6 /* HCUnsignedLongLongReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCUnsignedLongLongReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.m; sourceTree = ""; }; + 207D144CA82E0A26F82DB0E9EC77D3E5 /* MKTPrinter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTPrinter.m; path = Source/OCMockito/Invocation/MKTPrinter.m; sourceTree = ""; }; + 20B8DB81E4C91BF0810519B6BFCB3737 /* HCIsCollectionOnlyContaining.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsCollectionOnlyContaining.h; path = Source/Library/Collection/HCIsCollectionOnlyContaining.h; sourceTree = ""; }; + 21301EC3688A9A071D836F3D977B605E /* HCInvocationMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCInvocationMatcher.h; path = Source/Core/Helpers/HCInvocationMatcher.h; sourceTree = ""; }; + 2133CFE70D680BF4AA7794C3459171E5 /* MKTIntReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTIntReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTIntReturnSetter.h; sourceTree = ""; }; + 22B91E67557209B13B3B9307449E9679 /* Pods-MonsterCardsTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MonsterCardsTests-acknowledgements.plist"; sourceTree = ""; }; + 22DA62B7B321F17AC6E36AF664082E51 /* HCIsCollectionContaining.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsCollectionContaining.m; path = Source/Library/Collection/HCIsCollectionContaining.m; sourceTree = ""; }; + 231441CCBAC14BE463F54A8F059ECBD6 /* HCThrowsException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCThrowsException.h; path = Source/Library/Object/HCThrowsException.h; sourceTree = ""; }; + 2331CBFB327757FBA88D0D7AF4B70673 /* MKTPointerArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTPointerArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTPointerArgumentGetter.m; sourceTree = ""; }; + 23348E5CB510721F100C5513A0C5956C /* MKTAtMostNumberOfInvocationsChecker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTAtMostNumberOfInvocationsChecker.m; path = Source/OCMockito/Verifying/MKTAtMostNumberOfInvocationsChecker.m; sourceTree = ""; }; + 251E8C872D2825C28F49B1990137E016 /* HCIsCollectionContainingInRelativeOrder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsCollectionContainingInRelativeOrder.h; path = Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.h; sourceTree = ""; }; + 25BC887A7D50946D54F0744DE276C1C6 /* MKTObjectAndProtocolMock.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTObjectAndProtocolMock.h; path = Source/OCMockito/Mocking/MKTObjectAndProtocolMock.h; sourceTree = ""; }; + 262887178D59E3BE71DA8A4F77FA08E6 /* MKTMatchingInvocationsFinder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTMatchingInvocationsFinder.m; path = Source/OCMockito/Invocation/MKTMatchingInvocationsFinder.m; sourceTree = ""; }; + 2752DF9F1761F64AB71B969B0517A87F /* HCIsInstanceOf.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsInstanceOf.m; path = Source/Library/Object/HCIsInstanceOf.m; sourceTree = ""; }; + 27F37A006BF149397DE1FDAF316B7803 /* NSInvocation+OCHamcrest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSInvocation+OCHamcrest.m"; path = "Source/Core/Helpers/NSInvocation+OCHamcrest.m"; sourceTree = ""; }; + 29592D6C91F92EA62595F1214C7171A0 /* HCGenericTestFailureReporter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCGenericTestFailureReporter.m; path = Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.m; sourceTree = ""; }; + 29E3E28E517D5E40573CDD1CF19D0E2D /* MKTUnsignedLongArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTUnsignedLongArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongArgumentGetter.m; sourceTree = ""; }; + 2A2161245E185CCE243DA3D3DB4E8A90 /* HCDoubleReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCDoubleReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.m; sourceTree = ""; }; + 2B85AAD38A9E495F5D0C1167CA2D84F7 /* MKTInvocationsChecker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTInvocationsChecker.h; path = Source/OCMockito/Verifying/MKTInvocationsChecker.h; sourceTree = ""; }; + 2BF2F90513A67534C2FE246C03A17258 /* MKTCharReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTCharReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.m; sourceTree = ""; }; + 2C90246A0036AA0F2032626B50C44EA9 /* HCAllOf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCAllOf.h; path = Source/Library/Logical/HCAllOf.h; sourceTree = ""; }; + 2E2A45A1C15CCE3AD2136871E73C9242 /* HCWrapInMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCWrapInMatcher.m; path = Source/Core/Helpers/HCWrapInMatcher.m; sourceTree = ""; }; + 2E361895501CA52BB097C79F0F4BE0CF /* HCUnsignedIntReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCUnsignedIntReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.m; sourceTree = ""; }; + 2E437669DB85BB018333237AC38D91FD /* Pods-MonsterCardsTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-MonsterCardsTests.modulemap"; sourceTree = ""; }; + 2E94D97424388D22FBF3742D69F039AC /* HCIsCollectionContainingInOrder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsCollectionContainingInOrder.h; path = Source/Library/Collection/HCIsCollectionContainingInOrder.h; sourceTree = ""; }; + 2F2F1271D254511FF8828377A5661BD2 /* HCWrapInMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCWrapInMatcher.h; path = Source/Core/Helpers/HCWrapInMatcher.h; sourceTree = ""; }; + 2F5FECF01852FF018CD57C24B635EEF6 /* HCNumberAssert.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCNumberAssert.m; path = Source/Library/Number/HCNumberAssert.m; sourceTree = ""; }; + 308638B5A178D2DB437DD4A77368E02B /* HCIsAnything.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsAnything.h; path = Source/Library/Logical/HCIsAnything.h; sourceTree = ""; }; + 31B0C6DA157D0EB229226DF7FF122028 /* Pods-MonsterCards-MonsterCardsUITests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MonsterCards-MonsterCardsUITests-frameworks.sh"; sourceTree = ""; }; + 32BF8BE9EF675470A729BA22C1361A6D /* MKTOngoingStubbing.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTOngoingStubbing.m; path = Source/OCMockito/Stubbing/MKTOngoingStubbing.m; sourceTree = ""; }; + 32EC260CE31FA061B78C8F38AEA93B96 /* HCOrderingComparison.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCOrderingComparison.h; path = Source/Library/Number/HCOrderingComparison.h; sourceTree = ""; }; + 333F751C5679F8CB01A6390F104DA084 /* MKTParseCallStack.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTParseCallStack.h; path = Source/OCMockito/Invocation/MKTParseCallStack.h; sourceTree = ""; }; + 3514676781216A31840D3367AE870722 /* HCIsTypeOf.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsTypeOf.m; path = Source/Library/Object/HCIsTypeOf.m; sourceTree = ""; }; + 3548D27B147D9EB5EB8E27D698482369 /* Pods-MonsterCards-MonsterCardsUITests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MonsterCards-MonsterCardsUITests-dummy.m"; sourceTree = ""; }; + 35AA24F7451D1D549C6D719969227E73 /* HCThrowsException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCThrowsException.m; path = Source/Library/Object/HCThrowsException.m; sourceTree = ""; }; + 37D46A9D7B5F034E52DBE429970C830C /* MKTAtMostNumberOfInvocationsChecker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTAtMostNumberOfInvocationsChecker.h; path = Source/OCMockito/Verifying/MKTAtMostNumberOfInvocationsChecker.h; sourceTree = ""; }; + 381B0683777C9C9E7E4338161EA448C4 /* HCStringEndsWith.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCStringEndsWith.h; path = Source/Library/Text/HCStringEndsWith.h; sourceTree = ""; }; + 39D41EE12A4E3D17A653D8F3E5B90D07 /* MKTProtocolMock.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTProtocolMock.m; path = Source/OCMockito/Mocking/MKTProtocolMock.m; sourceTree = ""; }; + 3A38F0CE31D536EC0E0A9B3345828412 /* MKTInvocationMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTInvocationMatcher.m; path = Source/OCMockito/Invocation/MKTInvocationMatcher.m; sourceTree = ""; }; + 3A58798FFD63433A2DC5DB80FBA6459F /* HCConformsToProtocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCConformsToProtocol.h; path = Source/Library/Object/HCConformsToProtocol.h; sourceTree = ""; }; + 3B41B07476993B622F2DA6EE6C12878A /* HCHasCount.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCHasCount.m; path = Source/Library/Collection/HCHasCount.m; sourceTree = ""; }; + 3B6E6DF5C04893FABD0EE412429CAC5D /* HCAssertThat.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCAssertThat.m; path = Source/Core/HCAssertThat.m; sourceTree = ""; }; + 3B7551364E734142910761112DD1EBEC /* HCIsTrueFalse.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsTrueFalse.h; path = Source/Library/Number/HCIsTrueFalse.h; sourceTree = ""; }; + 3CDAA4D816A7367C058B9D5DCE8F668F /* MKTBoolReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTBoolReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTBoolReturnSetter.h; sourceTree = ""; }; + 3D5CCBF28758495E16A6F54CD6B1709B /* HCIsSame.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsSame.h; path = Source/Library/Object/HCIsSame.h; sourceTree = ""; }; + 3E0DB57E72A0782B49D3F4814ABAED49 /* OCMockito-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OCMockito-dummy.m"; sourceTree = ""; }; + 3E60BB4D20F2A1A3EF0EA94DEDC37226 /* HCIsDictionaryContaining.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsDictionaryContaining.h; path = Source/Library/Collection/HCIsDictionaryContaining.h; sourceTree = ""; }; + 3F89042174A732A619EDE40650224717 /* MKTDoubleArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTDoubleArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTDoubleArgumentGetter.m; sourceTree = ""; }; + 40074D7AED992C4CA8F8E339AFF944A5 /* HCAllOf.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCAllOf.m; path = Source/Library/Logical/HCAllOf.m; sourceTree = ""; }; + 40DF8028297082B83984B1BBC81028F4 /* HCIsCollectionContainingInAnyOrder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsCollectionContainingInAnyOrder.m; path = Source/Library/Collection/HCIsCollectionContainingInAnyOrder.m; sourceTree = ""; }; + 421EBC4EA258BE435D5627187F9923FA /* HCReturnTypeHandlerChain.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCReturnTypeHandlerChain.m; path = Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.m; sourceTree = ""; }; + 42C2C9797F1DCE7ACA6935B537A36EAF /* HCSenTestFailureReporter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCSenTestFailureReporter.m; path = Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.m; sourceTree = ""; }; + 436E43E5E1772B0DFE8B0FC7D4999C78 /* HCIsCloseTo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsCloseTo.h; path = Source/Library/Number/HCIsCloseTo.h; sourceTree = ""; }; + 444C303DDC591C6E560D356151507DC8 /* MKTExecutesBlock.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTExecutesBlock.m; path = Source/OCMockito/Stubbing/MKTExecutesBlock.m; sourceTree = ""; }; + 44F69EEC25EFDAA9F7D5A5FB8AC73E58 /* MKTInvocation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTInvocation.m; path = Source/OCMockito/Invocation/MKTInvocation.m; sourceTree = ""; }; + 45272A504E2D28004C6939415A77D8FB /* MKTUnsignedShortReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTUnsignedShortReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedShortReturnSetter.m; sourceTree = ""; }; + 458BD2863290A21B82FD7CED07513B56 /* MKTDoubleReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTDoubleReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTDoubleReturnSetter.h; sourceTree = ""; }; + 460F39594C0CA1F9FED8D53D423CF004 /* MKTObjectAndProtocolMock.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTObjectAndProtocolMock.m; path = Source/OCMockito/Mocking/MKTObjectAndProtocolMock.m; sourceTree = ""; }; + 462CC631461FF0F792689156760B4CFA /* HCReturnValueGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCReturnValueGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.m; sourceTree = ""; }; + 466DCB25F4DFF1E46ECE1A8A1FACAFB8 /* HCIs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIs.m; path = Source/Library/Decorator/HCIs.m; sourceTree = ""; }; + 46E9DB656AB852B52134EA8B5DE55D5C /* OCHamcrest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OCHamcrest.framework; path = OCHamcrest.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 47B5C2A311F8CD3FF35437ECDAF2A96F /* OCHamcrest-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OCHamcrest-prefix.pch"; sourceTree = ""; }; + 484DD12B558ADD56C07E97EE1EF8F170 /* OCMockito.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OCMockito.release.xcconfig; sourceTree = ""; }; + 4920D12A419167DF2D8531ABD0408C61 /* MKTAtLeastNumberOfInvocationsChecker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTAtLeastNumberOfInvocationsChecker.m; path = Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.m; sourceTree = ""; }; + 4A90BB06D5CC2236A79A6C720310609A /* MKTUnsignedIntArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedIntArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedIntArgumentGetter.h; sourceTree = ""; }; + 4A93CD9BCB843D55CA727E8D320AF65D /* MKTUnsignedIntReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedIntReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedIntReturnSetter.h; sourceTree = ""; }; + 4B8F56AB787D63007F14B0C61E33BD06 /* MKTPrinter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTPrinter.h; path = Source/OCMockito/Invocation/MKTPrinter.h; sourceTree = ""; }; + 4E2BD740DE1B84AA06B0F6CDD9272C5D /* HCIsDictionaryContainingEntries.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsDictionaryContainingEntries.h; path = Source/Library/Collection/HCIsDictionaryContainingEntries.h; sourceTree = ""; }; + 4F4468038A53A4E62772D3CE30C169A0 /* HCLongReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCLongReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.h; sourceTree = ""; }; + 4F94BD177A5DA2F0C3361AE06BE23C77 /* HCHasCount.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCHasCount.h; path = Source/Library/Collection/HCHasCount.h; sourceTree = ""; }; + 50B487E0A20C9CE23E428337914EF740 /* MKTDoubleReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTDoubleReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTDoubleReturnSetter.m; sourceTree = ""; }; + 529737285A943113A232DF663BDD975A /* Pods-MonsterCards-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MonsterCards-dummy.m"; sourceTree = ""; }; + 52AFD506CCDC1DCB953C4F35DCA640A6 /* MKTParseCallStack.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTParseCallStack.m; path = Source/OCMockito/Invocation/MKTParseCallStack.m; sourceTree = ""; }; + 551352E39C1B8344F089D156430E9B13 /* Pods-MonsterCards.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MonsterCards.debug.xcconfig"; sourceTree = ""; }; + 558E1ABEFD37DE62DD0154E12F5F137D /* MKTExecutesBlock.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTExecutesBlock.h; path = Source/OCMockito/Stubbing/MKTExecutesBlock.h; sourceTree = ""; }; + 559F60D5CAAC878835B98F05A09A9220 /* MKTUnsignedCharReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedCharReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedCharReturnSetter.h; sourceTree = ""; }; + 55D3B5BA02D597325C1B47FC13E4DD62 /* MKTInvocationMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTInvocationMatcher.h; path = Source/OCMockito/Invocation/MKTInvocationMatcher.h; sourceTree = ""; }; + 572EAD83F471E7F9BB9A04741CD17CD7 /* HCIsEqual.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsEqual.m; path = Source/Library/Object/HCIsEqual.m; sourceTree = ""; }; + 589782DCDE095D4F1130D0C3B8A7CF7F /* HCStringStartsWith.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCStringStartsWith.h; path = Source/Library/Text/HCStringStartsWith.h; sourceTree = ""; }; + 592DCA7BB3111ABF7B1298324C5DB56B /* HCArgumentCaptor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCArgumentCaptor.m; path = Source/Library/Object/HCArgumentCaptor.m; sourceTree = ""; }; + 5A4143D42B3E84CC031BF0DCE10D9309 /* HCTestFailureReporterChain.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCTestFailureReporterChain.h; path = Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.h; sourceTree = ""; }; + 5AAC733885BA6A203647044C6526696E /* HCIsNot.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsNot.h; path = Source/Library/Logical/HCIsNot.h; sourceTree = ""; }; + 5BA98008ECCAC2D5B872900C6F7EF9C4 /* MKTUnsignedLongLongArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTUnsignedLongLongArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongLongArgumentGetter.m; sourceTree = ""; }; + 5BC22DEB3F87D03E9B03144C593ED633 /* MKTInvocationsChecker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTInvocationsChecker.m; path = Source/OCMockito/Verifying/MKTInvocationsChecker.m; sourceTree = ""; }; + 5BD4447D27068D9840D768D1650C8E62 /* HCStringContains.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCStringContains.m; path = Source/Library/Text/HCStringContains.m; sourceTree = ""; }; + 5D9C31FABA1E532E2DF36E696888E27A /* HCAnyOf.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCAnyOf.m; path = Source/Library/Logical/HCAnyOf.m; sourceTree = ""; }; + 5DB108F42179EFC48AE416AECA985501 /* HCHasProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCHasProperty.m; path = Source/Library/Object/HCHasProperty.m; sourceTree = ""; }; + 60917429A02D22A583C0B23DC95EA619 /* HCMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCMatcher.h; path = Source/Core/HCMatcher.h; sourceTree = ""; }; + 6285D2EAAA6C08360F10C86E04B765E3 /* HCIsSame.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsSame.m; path = Source/Library/Object/HCIsSame.m; sourceTree = ""; }; + 62A84E3A6452BF7BCDA4ACC79DF3C44D /* MKTCharArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTCharArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTCharArgumentGetter.m; sourceTree = ""; }; + 62E47137A99BDF813A811FCE1DE3F9AF /* MKTUnsignedLongLongReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTUnsignedLongLongReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongLongReturnSetter.m; sourceTree = ""; }; + 6328E2DA677910CDDA3A692E28C41D00 /* NSInvocation+OCMockito.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSInvocation+OCMockito.h"; path = "Source/OCMockito/Invocation/NSInvocation+OCMockito.h"; sourceTree = ""; }; + 6509B0466A9E8566693B27F3D720F896 /* HCDiagnosingMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCDiagnosingMatcher.h; path = Source/Core/HCDiagnosingMatcher.h; sourceTree = ""; }; + 6765FE3E095A10CCA04B316EB3FD0E81 /* HCStringContains.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCStringContains.h; path = Source/Library/Text/HCStringContains.h; sourceTree = ""; }; + 688A32E81F833186D271C1DDEDF196A2 /* Pods_MonsterCardsTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MonsterCardsTests.framework; path = "Pods-MonsterCardsTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6900393B465D6921C292E903EEC32C1F /* HCDescribedAs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCDescribedAs.m; path = Source/Library/Decorator/HCDescribedAs.m; sourceTree = ""; }; + 691AF08E70240ABA9D35D3D1E4E8FA24 /* MKTUnsignedCharArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedCharArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.h; sourceTree = ""; }; + 6938763A1A07A12C15F7C1353D471391 /* MKTBoolArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTBoolArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.h; sourceTree = ""; }; + 6B9EB0943A6508B78A258A4D1692D213 /* MKTStructArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTStructArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTStructArgumentGetter.m; sourceTree = ""; }; + 6BB92E0E60BFC98484622AADC36943C8 /* HCUnsignedShortReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCUnsignedShortReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.h; sourceTree = ""; }; + 6BBC8E0F13D9CA3CADBA9BCA0D35AC30 /* HCIsInstanceOf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsInstanceOf.h; path = Source/Library/Object/HCIsInstanceOf.h; sourceTree = ""; }; + 6C5C0249C92D0C2E0BC1D31DDEDF393C /* MKTUnsignedLongLongArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedLongLongArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongLongArgumentGetter.h; sourceTree = ""; }; + 6DBFE2CABA8B83DEE912638FE4A55D68 /* MKTDoubleArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTDoubleArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTDoubleArgumentGetter.h; sourceTree = ""; }; + 6E8B57E0E4D34A609056D4F2567E0463 /* HCGenericTestFailureReporter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCGenericTestFailureReporter.h; path = Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.h; sourceTree = ""; }; + 6E8CE7DD1D30153B5AD5C1CAD58933BD /* HCIsEqualToNumber.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsEqualToNumber.h; path = Source/Library/Number/HCIsEqualToNumber.h; sourceTree = ""; }; + 6EBB82F8627ABF2AB502B110AC96100C /* HCCharReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCCharReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.m; sourceTree = ""; }; + 6F25CC20C533A6EB4F38A65315C3A93B /* HCDescription.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCDescription.h; path = Source/Core/HCDescription.h; sourceTree = ""; }; + 6F2D5CE5E0B330A27CD201D504E1D71E /* MKTUnsignedShortReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedShortReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedShortReturnSetter.h; sourceTree = ""; }; + 6F872B73FCED382A0048C7E512E978FB /* HCStringDescription.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCStringDescription.m; path = Source/Core/HCStringDescription.m; sourceTree = ""; }; + 6FC881BC5AF31E1ED2C1B5A0813A0C89 /* HCShortReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCShortReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.m; sourceTree = ""; }; + 704354BA923B2E7FD3159A24BF234D07 /* Pods-MonsterCards-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MonsterCards-umbrella.h"; sourceTree = ""; }; + 712AFDB5E8B9A9BE3B1E16DE01D0997E /* MKTStructReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTStructReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTStructReturnSetter.m; sourceTree = ""; }; + 712F548A01DB50EB28795FE309B808B7 /* MKTMockitoCore.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTMockitoCore.m; path = Source/OCMockito/Core/MKTMockitoCore.m; sourceTree = ""; }; + 732C09647A1595A77A68B7E771EF2006 /* MKTClassReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTClassReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTClassReturnSetter.h; sourceTree = ""; }; + 73E8D848016C63C2F4E672F9F39BAE81 /* MKTLongLongArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTLongLongArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTLongLongArgumentGetter.h; sourceTree = ""; }; + 7585A0B00554D868DE31B537DF34D0CB /* HCSubstringMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCSubstringMatcher.m; path = Source/Library/Text/HCSubstringMatcher.m; sourceTree = ""; }; + 7612833D4D9B0694826B1C7DD7B00F67 /* HCIsNot.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsNot.m; path = Source/Library/Logical/HCIsNot.m; sourceTree = ""; }; + 765A1A6A77B82DF1348BC203DB8700E1 /* HCIsCollectionContainingInAnyOrder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsCollectionContainingInAnyOrder.h; path = Source/Library/Collection/HCIsCollectionContainingInAnyOrder.h; sourceTree = ""; }; + 7728EFFA552082A9DCB502FB2286C937 /* OCHamcrest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OCHamcrest.debug.xcconfig; sourceTree = ""; }; + 77D4F4AE23915C4B14B3B927567A3F8C /* MKTStructArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTStructArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTStructArgumentGetter.h; sourceTree = ""; }; + 7A9CE8C344883AB5517B9289D3CE62BC /* MKTReturnValueSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTReturnValueSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetter.m; sourceTree = ""; }; + 7BC1E67223D24F99FBEA4CEA7EEE41B1 /* HCIsCloseTo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsCloseTo.m; path = Source/Library/Number/HCIsCloseTo.m; sourceTree = ""; }; + 7C360162E92AD2029386138F2644805C /* MKT_TPDWeakProxy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKT_TPDWeakProxy.m; path = "Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.m"; sourceTree = ""; }; + 7C437764409E8FE79D38459CB315D6E4 /* HCIsAnything.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsAnything.m; path = Source/Library/Logical/HCIsAnything.m; sourceTree = ""; }; + 7DDE13FAD087C4C94416C87926291DA9 /* OCMockito.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OCMockito.framework; path = OCMockito.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E8B6B3EC8CF9EF224F4012BA559561C /* HCStringEndsWith.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCStringEndsWith.m; path = Source/Library/Text/HCStringEndsWith.m; sourceTree = ""; }; + 7FF893E6E27D0CBC633522E472808186 /* HCTestFailureReporterChain.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCTestFailureReporterChain.m; path = Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.m; sourceTree = ""; }; + 801866461A95BB6BB06D7ACA13B0F7BF /* MKTLongArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTLongArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.h; sourceTree = ""; }; + 80D698976F97CA2D552BCDCA05FCCD60 /* MKTAtMostTimes.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTAtMostTimes.m; path = Source/OCMockito/Verifying/MKTAtMostTimes.m; sourceTree = ""; }; + 810F2E6B79A2F247C23FC14EE71FE26D /* Pods-MonsterCards-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MonsterCards-acknowledgements.plist"; sourceTree = ""; }; + 81AAB22CC8D8D414A37DF85D06679267 /* MKTUnsignedLongArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedLongArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedLongArgumentGetter.h; sourceTree = ""; }; + 81C0DC5B18405FA9D8F1CCAD8F6AEAE8 /* MKTArgumentGetterChain.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTArgumentGetterChain.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetterChain.h; sourceTree = ""; }; + 8398143F67390EAF146864CF91A8624C /* MKTVerificationMode.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTVerificationMode.h; path = Source/OCMockito/Verifying/MKTVerificationMode.h; sourceTree = ""; }; + 84154B65BFEB374DB9854DC227635944 /* Pods-MonsterCardsTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MonsterCardsTests-dummy.m"; sourceTree = ""; }; + 84BA696AA619B6D0F7EA279404DB530E /* MKTTestLocation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTTestLocation.h; path = Source/OCMockito/Core/MKTTestLocation.h; sourceTree = ""; }; + 84DB22F6F637646B96962798407CD285 /* MKTCharArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTCharArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTCharArgumentGetter.h; sourceTree = ""; }; + 85194C9F20D4DE8555D24BFBE51573E7 /* MKTExactTimes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTExactTimes.h; path = Source/OCMockito/Verifying/MKTExactTimes.h; sourceTree = ""; }; + 8536450243E3C741A2199972639521B7 /* HCIsCollectionContainingInOrder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsCollectionContainingInOrder.m; path = Source/Library/Collection/HCIsCollectionContainingInOrder.m; sourceTree = ""; }; + 85459195E748A490BCD08A471BDD5481 /* OCMockito.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = OCMockito.modulemap; sourceTree = ""; }; + 85CFD448D9D20C68710FAD8CCA67A71A /* HCStringContainsInOrder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCStringContainsInOrder.m; path = Source/Library/Text/HCStringContainsInOrder.m; sourceTree = ""; }; + 8640CD298B3FD74592C355F11CC4B877 /* MKTFloatArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTFloatArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTFloatArgumentGetter.h; sourceTree = ""; }; + 8696FF9B0821118217B616791FD05FCE /* Pods-MonsterCardsTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MonsterCardsTests-acknowledgements.markdown"; sourceTree = ""; }; + 86ECF9340D3AAB01F0B3067438D46B19 /* MKTArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.m; sourceTree = ""; }; + 873ABF4AB8A7991B752747062FCB51AC /* MKTNumberOfInvocationsChecker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTNumberOfInvocationsChecker.m; path = Source/OCMockito/Verifying/MKTNumberOfInvocationsChecker.m; sourceTree = ""; }; + 8768CC38C15E8D2828A93EE7E9E490F0 /* MKTObjectReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTObjectReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTObjectReturnSetter.h; sourceTree = ""; }; + 88EBDA32FA00ED85D46F2295D74014DA /* NSInvocation+OCMockito.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSInvocation+OCMockito.m"; path = "Source/OCMockito/Invocation/NSInvocation+OCMockito.m"; sourceTree = ""; }; + 8A9ADE98BFB51C4BC678151474E3EBD9 /* HCUnsignedShortReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCUnsignedShortReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.m; sourceTree = ""; }; + 8C8C81419E6D62EF0816BC942BB02CD8 /* MKTReturnValueSetterChain.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTReturnValueSetterChain.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetterChain.m; sourceTree = ""; }; + 8CA8D8BAF7CD4B2A7EA0EF327E80BEE2 /* MKTBaseMockObject.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTBaseMockObject.m; path = Source/OCMockito/Mocking/MKTBaseMockObject.m; sourceTree = ""; }; + 8CD7E1137210E2720DBC38CAC205A782 /* MKTCallStackElement.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTCallStackElement.m; path = Source/OCMockito/Invocation/MKTCallStackElement.m; sourceTree = ""; }; + 8D4B8DC415B66B703626B9AC6C7B8369 /* HCIsTypeOf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsTypeOf.h; path = Source/Library/Object/HCIsTypeOf.h; sourceTree = ""; }; + 8E065739ADEF8013C3C2148C748DDB7D /* HCObjectReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCObjectReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.m; sourceTree = ""; }; + 8E3F1B7ACC2FC096F1720E65C897C5C2 /* MKTProtocolMock.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTProtocolMock.h; path = Source/OCMockito/Mocking/MKTProtocolMock.h; sourceTree = ""; }; + 8E693B636DFDFDFAF93F34658B76D57F /* MKTAnswer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTAnswer.h; path = Source/OCMockito/Stubbing/MKTAnswer.h; sourceTree = ""; }; + 8F7EDB84755BA039B7EB74DB2B177280 /* HCSelfDescribing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCSelfDescribing.h; path = Source/Core/HCSelfDescribing.h; sourceTree = ""; }; + 8FF49DD53ED624F5A0AA80BBBBDBC439 /* HCUnsignedLongReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCUnsignedLongReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.h; sourceTree = ""; }; + 9019F0652E4A94C9696DABA14F41A520 /* HCDoubleReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCDoubleReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.h; sourceTree = ""; }; + 907F58A470288CFDAC15F6D91459EB9C /* MKTBoolArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTBoolArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.m; sourceTree = ""; }; + 90B9385E2A53C20DA4295573EFE1EEEF /* Pods-MonsterCards-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MonsterCards-Info.plist"; sourceTree = ""; }; + 90CBD512C8E0889278945E954D072F41 /* MKTFilterCallStack.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTFilterCallStack.m; path = Source/OCMockito/Invocation/MKTFilterCallStack.m; sourceTree = ""; }; + 90DA4C38B0C2E813AD63BF807583FB53 /* HCIsDictionaryContainingEntries.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsDictionaryContainingEntries.m; path = Source/Library/Collection/HCIsDictionaryContainingEntries.m; sourceTree = ""; }; + 91F44675681B10CE64FCE17A5A44F634 /* HCBoolReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCBoolReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.h; sourceTree = ""; }; + 92F55CA5F8286B06B44D09C3FB03A233 /* MKTUnsignedIntArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTUnsignedIntArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedIntArgumentGetter.m; sourceTree = ""; }; + 92FCBC51BD8B1191F982CE56D55A9C4D /* HCAnyOf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCAnyOf.h; path = Source/Library/Logical/HCAnyOf.h; sourceTree = ""; }; + 932AF46CFC7A3A6B937D8C0C19C499D3 /* Pods-MonsterCards.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MonsterCards.release.xcconfig"; sourceTree = ""; }; + 9394581F1369B80095EBE1419E6069F4 /* MKTClassObjectMock.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTClassObjectMock.m; path = Source/OCMockito/Mocking/MKTClassObjectMock.m; sourceTree = ""; }; + 93DFA9CEB9434F5CEF259B8FBCED1B1F /* HCRunloopRunner.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCRunloopRunner.m; path = Source/Core/Helpers/HCRunloopRunner.m; sourceTree = ""; }; + 94D94CC498AC8824BC63C2B6F21BC578 /* OCMockito-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "OCMockito-Info.plist"; sourceTree = ""; }; + 957CA7FD5A86036E96B76D8935F0DC5B /* HCIntReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIntReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.m; sourceTree = ""; }; + 9850D8A995F2F35F0C35E8CA6FEF840F /* OCHamcrest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OCHamcrest.h; path = Source/OCHamcrest.h; sourceTree = ""; }; + 98522699DD82870C311B72E916EBF2BE /* OCHamcrest.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = OCHamcrest.modulemap; sourceTree = ""; }; + 98C3C63CA0908F34C5A72F4443CD3C01 /* MKTFloatArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTFloatArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTFloatArgumentGetter.m; sourceTree = ""; }; + 99A28D2A94C88375EAD626ED771CDC26 /* HCLongLongReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCLongLongReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.h; sourceTree = ""; }; + 9A12FDE019356375BBCFA6581B2170A8 /* MKTStructReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTStructReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTStructReturnSetter.h; sourceTree = ""; }; + 9B0AEFC2DB6ED39C44287A03E5F33D43 /* MKTLocation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTLocation.m; path = Source/OCMockito/Invocation/MKTLocation.m; sourceTree = ""; }; + 9C5515B3CB3B2F502D3328E746F1B06A /* MKTObjectMock.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTObjectMock.m; path = Source/OCMockito/Mocking/MKTObjectMock.m; sourceTree = ""; }; + 9C65C64152C04FD20CEF60176C490BB4 /* HCTestFailure.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCTestFailure.m; path = Source/Core/Helpers/TestFailureReporters/HCTestFailure.m; sourceTree = ""; }; + 9C719025AA0018BF030D009382FF9C96 /* Pods-MonsterCardsTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MonsterCardsTests-umbrella.h"; sourceTree = ""; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9DEE98911D994708B4D35823CAF2F216 /* OCMockito.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OCMockito.h; path = Source/OCMockito/Core/OCMockito.h; sourceTree = ""; }; + 9E185F0EACC15858F21C65B72D636B78 /* MKTAtMostTimes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTAtMostTimes.h; path = Source/OCMockito/Verifying/MKTAtMostTimes.h; sourceTree = ""; }; + 9EA4549FC719D29A4F6D8D37BECD26BF /* MKTThrowsException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTThrowsException.h; path = Source/OCMockito/Stubbing/MKTThrowsException.h; sourceTree = ""; }; + 9ECB1081C6206E90D879659EF60350A8 /* HCRequireNonNilObject.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCRequireNonNilObject.h; path = Source/Core/Helpers/HCRequireNonNilObject.h; sourceTree = ""; }; + 9F59F3F0434FEFBB4FDB037D8532C3BC /* OCHamcrest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OCHamcrest.release.xcconfig; sourceTree = ""; }; + A0B26C3786C41EA86867FAF702128578 /* HCIsDictionaryContainingValue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsDictionaryContainingValue.h; path = Source/Library/Collection/HCIsDictionaryContainingValue.h; sourceTree = ""; }; + A1239CBBA69233BDD6AD85A47B384CDE /* HCShortReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCShortReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.h; sourceTree = ""; }; + A13C27BA36912BCE0EF3BA1A66A150AE /* HCDiagnosingMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCDiagnosingMatcher.m; path = Source/Core/HCDiagnosingMatcher.m; sourceTree = ""; }; + A1BD8FBA81108EA83B8A982B9FB74824 /* MKTExactTimes.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTExactTimes.m; path = Source/OCMockito/Verifying/MKTExactTimes.m; sourceTree = ""; }; + A1C3B43C8DDB4D8451D16D7F772BBCFC /* MKTLongReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTLongReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTLongReturnSetter.m; sourceTree = ""; }; + A202F7038DF89580D0FE6BD754238A40 /* MKTFloatReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTFloatReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTFloatReturnSetter.h; sourceTree = ""; }; + A22E6B20A8830376B58016019EA26EDA /* HCIsCollectionOnlyContaining.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsCollectionOnlyContaining.m; path = Source/Library/Collection/HCIsCollectionOnlyContaining.m; sourceTree = ""; }; + A2F9D51794366A72B340EE6DFA57799B /* HCUnsignedLongReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCUnsignedLongReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.m; sourceTree = ""; }; + A38F1F105CC9E903B09A16428560AC8D /* MKTNonObjectArgumentMatching.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTNonObjectArgumentMatching.h; path = Source/OCMockito/Core/MKTNonObjectArgumentMatching.h; sourceTree = ""; }; + A6E6938F87F891A7772A7B4026ED59DF /* MKTShortReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTShortReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTShortReturnSetter.h; sourceTree = ""; }; + A7042956F1D5F4F414BC76421A11432A /* HCIsNil.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsNil.h; path = Source/Library/Object/HCIsNil.h; sourceTree = ""; }; + A7469F06D3828C18C31E6569A40D5DC6 /* MKTDynamicProperties.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTDynamicProperties.h; path = Source/OCMockito/Mocking/MKTDynamicProperties.h; sourceTree = ""; }; + A89EBE400C96D83CAC3B8C73DF6DDDEC /* HCIsCollectionContaining.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsCollectionContaining.h; path = Source/Library/Collection/HCIsCollectionContaining.h; sourceTree = ""; }; + A8D514ACCE5F36DD82C7C62549DEC79F /* HCIsEqualToNumber.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsEqualToNumber.m; path = Source/Library/Number/HCIsEqualToNumber.m; sourceTree = ""; }; + A8D638C1E26020B2CFA81955277F22B3 /* HCHasProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCHasProperty.h; path = Source/Library/Object/HCHasProperty.h; sourceTree = ""; }; + A96E0E8F901A72ACD6F39C2FF1B6A573 /* HCReturnValueGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCReturnValueGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.h; sourceTree = ""; }; + A9A255A81CA4550C0F3EEC667B070699 /* MKTMockingProgress.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTMockingProgress.m; path = Source/OCMockito/Core/MKTMockingProgress.m; sourceTree = ""; }; + A9FD53B491EC559392EB12C1AF4D047F /* HCClassMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCClassMatcher.h; path = Source/Library/Object/HCClassMatcher.h; sourceTree = ""; }; + AAB9DF0E28478192160AB8EC6811D9D2 /* HCTestFailureReporter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCTestFailureReporter.h; path = Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.h; sourceTree = ""; }; + AB0E4FC39671942C571870649F0F9A21 /* MKTClassArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTClassArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.h; sourceTree = ""; }; + ACFFFBAB2BA0B628DA5A84AC107AA50E /* MKTSelectorArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTSelectorArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTSelectorArgumentGetter.m; sourceTree = ""; }; + AD19E9982D5E734D1032EF05DC5B1F97 /* MKTThrowsException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTThrowsException.m; path = Source/OCMockito/Stubbing/MKTThrowsException.m; sourceTree = ""; }; + AD727EBE516A6C61AD5BEF3204E7C3BD /* OCHamcrest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OCHamcrest.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B0B794D497B95C93EA694FB5B3CAA16A /* HCIsEqualCompressingWhiteSpace.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsEqualCompressingWhiteSpace.m; path = Source/Library/Text/HCIsEqualCompressingWhiteSpace.m; sourceTree = ""; }; + B0D745B85DCC5C30B2E1C136361909D3 /* HCIsDictionaryContainingValue.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsDictionaryContainingValue.m; path = Source/Library/Collection/HCIsDictionaryContainingValue.m; sourceTree = ""; }; + B10CEBA7BD70FD21F55C7B62EE88E3EF /* Pods-MonsterCards-MonsterCardsUITests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-MonsterCards-MonsterCardsUITests.modulemap"; sourceTree = ""; }; + B2AEC6447906AEFB1CF6F9B0ECA301E5 /* HCIsTrueFalse.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsTrueFalse.m; path = Source/Library/Number/HCIsTrueFalse.m; sourceTree = ""; }; + B2E678C69FB2A45B80D3A8EDE85F1DDC /* HCTestFailureReporter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCTestFailureReporter.m; path = Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.m; sourceTree = ""; }; + B3D921AE4B051F447D0B6B48CDD60D27 /* MKTUnsignedCharReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTUnsignedCharReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedCharReturnSetter.m; sourceTree = ""; }; + B5E5FB9ACABA8BD4BAAFF1D3FE0906C1 /* Pods-MonsterCardsTests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MonsterCardsTests-Info.plist"; sourceTree = ""; }; + B6A751D230AC2B78734B21993A927BCA /* MKTSingletonSwizzler.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTSingletonSwizzler.m; path = Source/OCMockito/Mocking/MKTSingletonSwizzler.m; sourceTree = ""; }; + B8367BBBF4D142CAFEFC1116C1D51EC2 /* HCCollect.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCCollect.h; path = Source/Core/Helpers/HCCollect.h; sourceTree = ""; }; + B8B8CBC4DDAFAE06C2D69D1D6048E517 /* MKTObjectArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTObjectArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTObjectArgumentGetter.m; sourceTree = ""; }; + BA81D249DE2DCF35FE132923832B63F6 /* OCHamcrest-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "OCHamcrest-Info.plist"; sourceTree = ""; }; + BC5EEA20F92E7BA00140098761E804CA /* HCEvery.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCEvery.m; path = Source/Library/Collection/HCEvery.m; sourceTree = ""; }; + BD01ABDA4BE87D80D5A9B9C1E63425A1 /* HCUnsignedCharReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCUnsignedCharReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.h; sourceTree = ""; }; + C016CCAC267DE1A28312C12DFF47F85D /* HCClassMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCClassMatcher.m; path = Source/Library/Object/HCClassMatcher.m; sourceTree = ""; }; + C0340AF877EFAB221B6F5D3E94A26873 /* Pods-MonsterCards-MonsterCardsUITests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MonsterCards-MonsterCardsUITests-acknowledgements.plist"; sourceTree = ""; }; + C08D49E1A88FFC4410273AB164781864 /* MKTLongArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTLongArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.m; sourceTree = ""; }; + C1835F2EAFA904DF40CCC8A23D8FF8B0 /* OCHamcrest-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "OCHamcrest-dummy.m"; sourceTree = ""; }; + C2B34606F998B7575B73A3D15954018F /* HCStringDescription.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCStringDescription.h; path = Source/Core/HCStringDescription.h; sourceTree = ""; }; + C3C4494B4939FF3D1820CF17437E8EB7 /* Pods-MonsterCards-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MonsterCards-acknowledgements.markdown"; sourceTree = ""; }; + C454F8C00EF5E9FFC391FA282445CC60 /* Pods-MonsterCards-MonsterCardsUITests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MonsterCards-MonsterCardsUITests-acknowledgements.markdown"; sourceTree = ""; }; + C58AE3E63FCE7B1758DBBE1D1C38BB39 /* MKTVerificationData.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTVerificationData.h; path = Source/OCMockito/Verifying/MKTVerificationData.h; sourceTree = ""; }; + C5F7F23E1BE2809EE4D749C34164EFF7 /* MKTDynamicProperties.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTDynamicProperties.m; path = Source/OCMockito/Mocking/MKTDynamicProperties.m; sourceTree = ""; }; + C60E4F725E1CB2116B6E7C88D81FD288 /* OCMockito.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = OCMockito.m; path = Source/OCMockito/Core/OCMockito.m; sourceTree = ""; }; + C7510606B6F0EB6A7B0E29667AE8A9D3 /* MKTLongReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTLongReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTLongReturnSetter.h; sourceTree = ""; }; + C7A38AF4A4625748B79BF5AD096910BF /* MKTObjectReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTObjectReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTObjectReturnSetter.m; sourceTree = ""; }; + C973C5166E14C2B7A847EB016CE1A5EA /* HCUnsignedIntReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCUnsignedIntReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.h; sourceTree = ""; }; + C9C01738313ACD89E9768B737A71D896 /* MKTArgumentGetterChain.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTArgumentGetterChain.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetterChain.m; sourceTree = ""; }; + CA6C0B1B678EBAEB826C065F5923DCD0 /* MKTShortArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTShortArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTShortArgumentGetter.h; sourceTree = ""; }; + CB1A5CE204B393A0CA27985021AF714E /* Pods-MonsterCards-MonsterCardsUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MonsterCards-MonsterCardsUITests.release.xcconfig"; sourceTree = ""; }; + CBD86395BE4EB3CE9E5D99C2FE09F97F /* HCArgumentCaptor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCArgumentCaptor.h; path = Source/Library/Object/HCArgumentCaptor.h; sourceTree = ""; }; + CC30C1058FE9C50C848DA495FB7036E4 /* HCNumberAssert.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCNumberAssert.h; path = Source/Library/Number/HCNumberAssert.h; sourceTree = ""; }; + CD143063B07B1E23CF91C80AB43DFE1E /* HCBoolReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCBoolReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.m; sourceTree = ""; }; + CE50CC9964C2E5BCA40BE1C1246A0457 /* MKTUnsignedLongReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTUnsignedLongReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.m; sourceTree = ""; }; + CE7953303F73675BFA44165DC0E26B82 /* MKTFilterCallStack.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTFilterCallStack.h; path = Source/OCMockito/Invocation/MKTFilterCallStack.h; sourceTree = ""; }; + D051BD45BE36582FA4E2D7129242385D /* MKTIntArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTIntArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTIntArgumentGetter.h; sourceTree = ""; }; + D090E88473BF7C14D6F652C53B6E62D4 /* HCIsDictionaryContaining.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsDictionaryContaining.m; path = Source/Library/Collection/HCIsDictionaryContaining.m; sourceTree = ""; }; + D0BB07666E0A1CAF3F959BBF7A123081 /* HCBaseMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCBaseMatcher.h; path = Source/Core/HCBaseMatcher.h; sourceTree = ""; }; + D0BC998DFA3AD3C7727902C32D7B023C /* MKTUnsignedShortArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTUnsignedShortArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedShortArgumentGetter.m; sourceTree = ""; }; + D183B16503E7E68A9E9B8BE77AB07DFF /* HCIsEmptyCollection.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsEmptyCollection.h; path = Source/Library/Collection/HCIsEmptyCollection.h; sourceTree = ""; }; + D1D4CEC433F252BAA6E88C7F6452B73F /* MKTLocation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTLocation.h; path = Source/OCMockito/Invocation/MKTLocation.h; sourceTree = ""; }; + D460A5436A5E4153406D082733140750 /* MKTClassReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTClassReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTClassReturnSetter.m; sourceTree = ""; }; + D54441B89453B0E34C285B8D687059F9 /* HCIs.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIs.h; path = Source/Library/Decorator/HCIs.h; sourceTree = ""; }; + D620C88FC6781BB9560C47740B880782 /* MKTAtLeastTimes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTAtLeastTimes.h; path = Source/OCMockito/Verifying/MKTAtLeastTimes.h; sourceTree = ""; }; + D628B61620DB6EB0ED2B3759A1D601E8 /* HCFloatReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCFloatReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.h; sourceTree = ""; }; + D637DB99FCC2A1CBD1DAFECF6D8211E7 /* Pods-MonsterCards.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-MonsterCards.modulemap"; sourceTree = ""; }; + D69DE9A7FDFBA904D451536B0B6F96C1 /* HCIsEqual.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsEqual.h; path = Source/Library/Object/HCIsEqual.h; sourceTree = ""; }; + D7C554A7AC2D9FD9BE1ACC0A210D1D2A /* HCAssertThat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCAssertThat.h; path = Source/Core/HCAssertThat.h; sourceTree = ""; }; + D8091FD4252078664713E9429EA020CF /* MKTVerificationData.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTVerificationData.m; path = Source/OCMockito/Verifying/MKTVerificationData.m; sourceTree = ""; }; + D81351931406A73263288B05C493A7C2 /* HCObjectReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCObjectReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.h; sourceTree = ""; }; + D896C9EEE2A6626F4E6E2A4B1E60C28F /* HCOrderingComparison.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCOrderingComparison.m; path = Source/Library/Number/HCOrderingComparison.m; sourceTree = ""; }; + D947CE2C6E92F9E4D72941C01E2F1B9A /* HCStringStartsWith.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCStringStartsWith.m; path = Source/Library/Text/HCStringStartsWith.m; sourceTree = ""; }; + DB35A320FA5D77588D90D14C26FE5615 /* HCXCTestFailureReporter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCXCTestFailureReporter.h; path = Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.h; sourceTree = ""; }; + DDDFECD0040D1732869BECAF0E382319 /* HCIsDictionaryContainingKey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsDictionaryContainingKey.h; path = Source/Library/Collection/HCIsDictionaryContainingKey.h; sourceTree = ""; }; + DEF12651806E15F983894A3855670CBD /* HCUnsignedLongLongReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCUnsignedLongLongReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.h; sourceTree = ""; }; + DF10E12C4DE292F2E990E68340006DDF /* MKTMatchingInvocationsFinder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTMatchingInvocationsFinder.h; path = Source/OCMockito/Invocation/MKTMatchingInvocationsFinder.h; sourceTree = ""; }; + E013CFA79F6F0CE1C0B54BF3EC0E4E5E /* MKTReturnValueSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTReturnValueSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetter.h; sourceTree = ""; }; + E0DE1344B442C69D0420A46FC37E5ADC /* HCIsDictionaryContainingKey.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsDictionaryContainingKey.m; path = Source/Library/Collection/HCIsDictionaryContainingKey.m; sourceTree = ""; }; + E175F49EE37A7857D4EF8B1EBBCBA704 /* HCFloatReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCFloatReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.m; sourceTree = ""; }; + E1F4FA881C7079D43BB7A9C4B895782A /* MKTSingletonSwizzler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTSingletonSwizzler.h; path = Source/OCMockito/Mocking/MKTSingletonSwizzler.h; sourceTree = ""; }; + E2313D2E2EABA4F71EFD3341B7A6E81A /* MKTStubbedInvocationMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTStubbedInvocationMatcher.h; path = Source/OCMockito/Stubbing/MKTStubbedInvocationMatcher.h; sourceTree = ""; }; + E281B9CD86CE2C3467AE9FB5A3DD9EC3 /* HCUnsignedCharReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCUnsignedCharReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.m; sourceTree = ""; }; + E39410740663C2E0A14F4081687DC91A /* MKTOngoingStubbing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTOngoingStubbing.h; path = Source/OCMockito/Stubbing/MKTOngoingStubbing.h; sourceTree = ""; }; + E3E01A9E71DAD44F66EB69713F8D39A9 /* MKTSelectorArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTSelectorArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTSelectorArgumentGetter.h; sourceTree = ""; }; + E3FEB3E11884160D8606669A40E1D0B5 /* MKTAtLeastTimes.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTAtLeastTimes.m; path = Source/OCMockito/Verifying/MKTAtLeastTimes.m; sourceTree = ""; }; + E4B1685C03F14987E2EA51F32F0E9817 /* MKTReturnsValue.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTReturnsValue.m; path = Source/OCMockito/Stubbing/MKTReturnsValue.m; sourceTree = ""; }; + E4F7E266FADE4B56CBD62161CEB074B1 /* MKTIntArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTIntArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTIntArgumentGetter.m; sourceTree = ""; }; + E55C8F60934B9E3486B5400144D51B87 /* MKTBaseMockObject.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTBaseMockObject.h; path = Source/OCMockito/Mocking/MKTBaseMockObject.h; sourceTree = ""; }; + E624982025C01963D77155028B6479C6 /* MKTReturnValueSetterChain.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTReturnValueSetterChain.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTReturnValueSetterChain.h; sourceTree = ""; }; + E638A8B5FFF49E7FC2DA85139374A7CE /* MKTShortReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTShortReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTShortReturnSetter.m; sourceTree = ""; }; + E7A67A1A44F2960A12360B506A358C52 /* MKTInvocation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTInvocation.h; path = Source/OCMockito/Invocation/MKTInvocation.h; sourceTree = ""; }; + E8294C7DDB7FB24726F50BBB9D28E5A1 /* OCHamcrest-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OCHamcrest-umbrella.h"; sourceTree = ""; }; + E8306C8B11C03982ED702C3E91FD9FD0 /* HCInvocationMatcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCInvocationMatcher.m; path = Source/Core/Helpers/HCInvocationMatcher.m; sourceTree = ""; }; + E9D9780CA9FCEC917E117D6777B35BB1 /* HCIsEqualCompressingWhiteSpace.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsEqualCompressingWhiteSpace.h; path = Source/Library/Text/HCIsEqualCompressingWhiteSpace.h; sourceTree = ""; }; + EA12E949C744BD577BDBF65DDF8CC435 /* MKTFloatReturnSetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTFloatReturnSetter.m; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTFloatReturnSetter.m; sourceTree = ""; }; + EA7EDDDA5BC1BC0E456B810249400191 /* HCHasDescription.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCHasDescription.h; path = Source/Library/Object/HCHasDescription.h; sourceTree = ""; }; + EBC11A631E69A7151B32E94EDA69A134 /* MKTClassObjectMock.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTClassObjectMock.h; path = Source/OCMockito/Mocking/MKTClassObjectMock.h; sourceTree = ""; }; + EEFC62B3798DBBA384D124E151D0F66C /* MKTPointerArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTPointerArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTPointerArgumentGetter.h; sourceTree = ""; }; + EF258D86B6D6346812957BCD93695AE3 /* HCCollect.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCCollect.m; path = Source/Core/Helpers/HCCollect.m; sourceTree = ""; }; + EF5DC0800B9EDCD568E8A0080E437D81 /* MKTTestLocation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTTestLocation.m; path = Source/OCMockito/Core/MKTTestLocation.m; sourceTree = ""; }; + F287D8D338B96291DF6E8C0C83250F7F /* MKTLongLongReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTLongLongReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTLongLongReturnSetter.h; sourceTree = ""; }; + F2CC95774F6F1213CF68852FAB2A9250 /* MKTNumberOfInvocationsChecker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTNumberOfInvocationsChecker.h; path = Source/OCMockito/Verifying/MKTNumberOfInvocationsChecker.h; sourceTree = ""; }; + F2F77FAFE27EF46F643D67889728A577 /* NSInvocation+OCHamcrest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSInvocation+OCHamcrest.h"; path = "Source/Core/Helpers/NSInvocation+OCHamcrest.h"; sourceTree = ""; }; + F3E7DA0EEB24C37343A7D75DF4A73514 /* HCIsNil.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsNil.m; path = Source/Library/Object/HCIsNil.m; sourceTree = ""; }; + F3EB3A072B8C98D740AB96A2E8E84D5A /* Pods-MonsterCards-MonsterCardsUITests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MonsterCards-MonsterCardsUITests-Info.plist"; sourceTree = ""; }; + F4046E1A0C30486F4E309D40944EAD25 /* MKTLongLongArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTLongLongArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTLongLongArgumentGetter.m; sourceTree = ""; }; + F406AE154752E4C1115CE738E4FD81EF /* HCTestFailure.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCTestFailure.h; path = Source/Core/Helpers/TestFailureReporters/HCTestFailure.h; sourceTree = ""; }; + F4370BB69BE59DB9293665A09CB4376E /* HCXCTestFailureReporter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCXCTestFailureReporter.m; path = Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.m; sourceTree = ""; }; + F437F8EA2F4F80AE8B362B1426F240CE /* MKTShortArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTShortArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTShortArgumentGetter.m; sourceTree = ""; }; + F4485BD63D4146F51B7A990D580C0D36 /* MKTObjectArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTObjectArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTObjectArgumentGetter.h; sourceTree = ""; }; + F49226BB7D1E996426B97D5CD3BEA20A /* MKTAtLeastNumberOfInvocationsChecker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTAtLeastNumberOfInvocationsChecker.h; path = Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.h; sourceTree = ""; }; + F566BC2D6E2FB121D49B779418D68E6A /* MKTUnsignedLongLongReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedLongLongReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongLongReturnSetter.h; sourceTree = ""; }; + F6BAE999C32491BA132692CE0D32AD26 /* HCConformsToProtocol.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCConformsToProtocol.m; path = Source/Library/Object/HCConformsToProtocol.m; sourceTree = ""; }; + F7E2A688E8857F1B64A972EE63951BF8 /* HCSenTestFailureReporter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCSenTestFailureReporter.h; path = Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.h; sourceTree = ""; }; + F89117F44AD93D49B4A1F16A1BBDE2E8 /* HCSubstringMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCSubstringMatcher.h; path = Source/Library/Text/HCSubstringMatcher.h; sourceTree = ""; }; + F8B4307580176F1666012922CD068E35 /* HCIntReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIntReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.h; sourceTree = ""; }; + F8D0B09986BD2A23932BF5F7FC81A045 /* HCBaseDescription.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCBaseDescription.h; path = Source/Core/HCBaseDescription.h; sourceTree = ""; }; + F8F4AC31B4F530372255E84F8C2BF20A /* OCMockito.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OCMockito.debug.xcconfig; sourceTree = ""; }; + F924445CF95A74938C7388E9F4370AE9 /* HCStringContainsInOrder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCStringContainsInOrder.h; path = Source/Library/Text/HCStringContainsInOrder.h; sourceTree = ""; }; + FA04F455620B0CE7ACFA33960D1467D0 /* HCIsEqualIgnoringCase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsEqualIgnoringCase.h; path = Source/Library/Text/HCIsEqualIgnoringCase.h; sourceTree = ""; }; + FCF2DF282EEAB03CD61A2E43644D9290 /* MKTInvocationContainer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTInvocationContainer.m; path = Source/OCMockito/Stubbing/MKTInvocationContainer.m; sourceTree = ""; }; + FD0D54259FF67E141B1901E1F97E4B4D /* HCEvery.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCEvery.h; path = Source/Library/Collection/HCEvery.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2FC51FF4674922ECD994EEF685AF5D9C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 26C7860E85997D7D1197607E2277D7D1 /* Foundation.framework in Frameworks */, + 6279C99C1D064A82A041398EE966BA86 /* OCHamcrest.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9116E775AD924975711919BBB67E31B8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B6ACC315E3575101FC7A7A75DADD8665 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A09E36DBE13690DA55DADE1D2606EEE2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6AB0AB9F781FA05AC37A7A3C0CE66A3D /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BD7DA0835355BD835D3EEE4EEBA11F9C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6C9EAA0FE1130D13921A7DBC94CBF553 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DB3B67822A49A40509BD61FA848FD5B6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BA525D6B55D2D1A2C1E6B5EE5E121E4C /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0C84EBF413C89006C4701B1CB5ABA424 /* Pods-MonsterCards */ = { + isa = PBXGroup; + children = ( + D637DB99FCC2A1CBD1DAFECF6D8211E7 /* Pods-MonsterCards.modulemap */, + C3C4494B4939FF3D1820CF17437E8EB7 /* Pods-MonsterCards-acknowledgements.markdown */, + 810F2E6B79A2F247C23FC14EE71FE26D /* Pods-MonsterCards-acknowledgements.plist */, + 529737285A943113A232DF663BDD975A /* Pods-MonsterCards-dummy.m */, + 90B9385E2A53C20DA4295573EFE1EEEF /* Pods-MonsterCards-Info.plist */, + 704354BA923B2E7FD3159A24BF234D07 /* Pods-MonsterCards-umbrella.h */, + 551352E39C1B8344F089D156430E9B13 /* Pods-MonsterCards.debug.xcconfig */, + 932AF46CFC7A3A6B937D8C0C19C499D3 /* Pods-MonsterCards.release.xcconfig */, + ); + name = "Pods-MonsterCards"; + path = "Target Support Files/Pods-MonsterCards"; + sourceTree = ""; + }; + 25F7154ABB8E0F71B16D76813AE28F84 /* iOS */ = { + isa = PBXGroup; + children = ( + 007D801A3A0A0E324725CD8431143BD8 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 4EEADDD04C7BD4B91787C198CC19D22C /* Support Files */ = { + isa = PBXGroup; + children = ( + 85459195E748A490BCD08A471BDD5481 /* OCMockito.modulemap */, + 3E0DB57E72A0782B49D3F4814ABAED49 /* OCMockito-dummy.m */, + 94D94CC498AC8824BC63C2B6F21BC578 /* OCMockito-Info.plist */, + 045DB28517C8EA58CCDC139E15A4CA6A /* OCMockito-prefix.pch */, + 0BF590D47280FDF772591A9EA877F3D6 /* OCMockito-umbrella.h */, + F8F4AC31B4F530372255E84F8C2BF20A /* OCMockito.debug.xcconfig */, + 484DD12B558ADD56C07E97EE1EF8F170 /* OCMockito.release.xcconfig */, + ); + name = "Support Files"; + path = "../Target Support Files/OCMockito"; + sourceTree = ""; + }; + 4FB9017EFFADCBE275DDDB74E6DDA887 /* Pods-MonsterCards-MonsterCardsUITests */ = { + isa = PBXGroup; + children = ( + B10CEBA7BD70FD21F55C7B62EE88E3EF /* Pods-MonsterCards-MonsterCardsUITests.modulemap */, + C454F8C00EF5E9FFC391FA282445CC60 /* Pods-MonsterCards-MonsterCardsUITests-acknowledgements.markdown */, + C0340AF877EFAB221B6F5D3E94A26873 /* Pods-MonsterCards-MonsterCardsUITests-acknowledgements.plist */, + 3548D27B147D9EB5EB8E27D698482369 /* Pods-MonsterCards-MonsterCardsUITests-dummy.m */, + 31B0C6DA157D0EB229226DF7FF122028 /* Pods-MonsterCards-MonsterCardsUITests-frameworks.sh */, + F3EB3A072B8C98D740AB96A2E8E84D5A /* Pods-MonsterCards-MonsterCardsUITests-Info.plist */, + 1CE8542716C33029CD29A4F008FC51A2 /* Pods-MonsterCards-MonsterCardsUITests-umbrella.h */, + 056C81AEEE03ED285AA14C3491D257EE /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */, + CB1A5CE204B393A0CA27985021AF714E /* Pods-MonsterCards-MonsterCardsUITests.release.xcconfig */, + ); + name = "Pods-MonsterCards-MonsterCardsUITests"; + path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests"; + sourceTree = ""; + }; + 5416400A529F5358B7EA5C00D3CECE75 /* OCHamcrest */ = { + isa = PBXGroup; + children = ( + 2C90246A0036AA0F2032626B50C44EA9 /* HCAllOf.h */, + 40074D7AED992C4CA8F8E339AFF944A5 /* HCAllOf.m */, + 92FCBC51BD8B1191F982CE56D55A9C4D /* HCAnyOf.h */, + 5D9C31FABA1E532E2DF36E696888E27A /* HCAnyOf.m */, + CBD86395BE4EB3CE9E5D99C2FE09F97F /* HCArgumentCaptor.h */, + 592DCA7BB3111ABF7B1298324C5DB56B /* HCArgumentCaptor.m */, + D7C554A7AC2D9FD9BE1ACC0A210D1D2A /* HCAssertThat.h */, + 3B6E6DF5C04893FABD0EE412429CAC5D /* HCAssertThat.m */, + F8D0B09986BD2A23932BF5F7FC81A045 /* HCBaseDescription.h */, + 1C94B7AA30C516765BC3AFDDD944530F /* HCBaseDescription.m */, + D0BB07666E0A1CAF3F959BBF7A123081 /* HCBaseMatcher.h */, + 02EFC5FFFDE7AAEA0ADD71736996FFF4 /* HCBaseMatcher.m */, + 91F44675681B10CE64FCE17A5A44F634 /* HCBoolReturnGetter.h */, + CD143063B07B1E23CF91C80AB43DFE1E /* HCBoolReturnGetter.m */, + 115F66A544E70A0704D1EFE773B6F6A4 /* HCCharReturnGetter.h */, + 6EBB82F8627ABF2AB502B110AC96100C /* HCCharReturnGetter.m */, + A9FD53B491EC559392EB12C1AF4D047F /* HCClassMatcher.h */, + C016CCAC267DE1A28312C12DFF47F85D /* HCClassMatcher.m */, + B8367BBBF4D142CAFEFC1116C1D51EC2 /* HCCollect.h */, + EF258D86B6D6346812957BCD93695AE3 /* HCCollect.m */, + 3A58798FFD63433A2DC5DB80FBA6459F /* HCConformsToProtocol.h */, + F6BAE999C32491BA132692CE0D32AD26 /* HCConformsToProtocol.m */, + 12ED103768B5C3E59B3D08ACBB1E0046 /* HCDescribedAs.h */, + 6900393B465D6921C292E903EEC32C1F /* HCDescribedAs.m */, + 6F25CC20C533A6EB4F38A65315C3A93B /* HCDescription.h */, + 6509B0466A9E8566693B27F3D720F896 /* HCDiagnosingMatcher.h */, + A13C27BA36912BCE0EF3BA1A66A150AE /* HCDiagnosingMatcher.m */, + 9019F0652E4A94C9696DABA14F41A520 /* HCDoubleReturnGetter.h */, + 2A2161245E185CCE243DA3D3DB4E8A90 /* HCDoubleReturnGetter.m */, + FD0D54259FF67E141B1901E1F97E4B4D /* HCEvery.h */, + BC5EEA20F92E7BA00140098761E804CA /* HCEvery.m */, + D628B61620DB6EB0ED2B3759A1D601E8 /* HCFloatReturnGetter.h */, + E175F49EE37A7857D4EF8B1EBBCBA704 /* HCFloatReturnGetter.m */, + 6E8B57E0E4D34A609056D4F2567E0463 /* HCGenericTestFailureReporter.h */, + 29592D6C91F92EA62595F1214C7171A0 /* HCGenericTestFailureReporter.m */, + 4F94BD177A5DA2F0C3361AE06BE23C77 /* HCHasCount.h */, + 3B41B07476993B622F2DA6EE6C12878A /* HCHasCount.m */, + EA7EDDDA5BC1BC0E456B810249400191 /* HCHasDescription.h */, + 12EAED0BC67FA189C27C8F4E6173CC1C /* HCHasDescription.m */, + A8D638C1E26020B2CFA81955277F22B3 /* HCHasProperty.h */, + 5DB108F42179EFC48AE416AECA985501 /* HCHasProperty.m */, + F8B4307580176F1666012922CD068E35 /* HCIntReturnGetter.h */, + 957CA7FD5A86036E96B76D8935F0DC5B /* HCIntReturnGetter.m */, + 21301EC3688A9A071D836F3D977B605E /* HCInvocationMatcher.h */, + E8306C8B11C03982ED702C3E91FD9FD0 /* HCInvocationMatcher.m */, + D54441B89453B0E34C285B8D687059F9 /* HCIs.h */, + 466DCB25F4DFF1E46ECE1A8A1FACAFB8 /* HCIs.m */, + 308638B5A178D2DB437DD4A77368E02B /* HCIsAnything.h */, + 7C437764409E8FE79D38459CB315D6E4 /* HCIsAnything.m */, + 436E43E5E1772B0DFE8B0FC7D4999C78 /* HCIsCloseTo.h */, + 7BC1E67223D24F99FBEA4CEA7EEE41B1 /* HCIsCloseTo.m */, + A89EBE400C96D83CAC3B8C73DF6DDDEC /* HCIsCollectionContaining.h */, + 22DA62B7B321F17AC6E36AF664082E51 /* HCIsCollectionContaining.m */, + 765A1A6A77B82DF1348BC203DB8700E1 /* HCIsCollectionContainingInAnyOrder.h */, + 40DF8028297082B83984B1BBC81028F4 /* HCIsCollectionContainingInAnyOrder.m */, + 2E94D97424388D22FBF3742D69F039AC /* HCIsCollectionContainingInOrder.h */, + 8536450243E3C741A2199972639521B7 /* HCIsCollectionContainingInOrder.m */, + 251E8C872D2825C28F49B1990137E016 /* HCIsCollectionContainingInRelativeOrder.h */, + 061256FA10FF86124EC40F139DF44B72 /* HCIsCollectionContainingInRelativeOrder.m */, + 20B8DB81E4C91BF0810519B6BFCB3737 /* HCIsCollectionOnlyContaining.h */, + A22E6B20A8830376B58016019EA26EDA /* HCIsCollectionOnlyContaining.m */, + 3E60BB4D20F2A1A3EF0EA94DEDC37226 /* HCIsDictionaryContaining.h */, + D090E88473BF7C14D6F652C53B6E62D4 /* HCIsDictionaryContaining.m */, + 4E2BD740DE1B84AA06B0F6CDD9272C5D /* HCIsDictionaryContainingEntries.h */, + 90DA4C38B0C2E813AD63BF807583FB53 /* HCIsDictionaryContainingEntries.m */, + DDDFECD0040D1732869BECAF0E382319 /* HCIsDictionaryContainingKey.h */, + E0DE1344B442C69D0420A46FC37E5ADC /* HCIsDictionaryContainingKey.m */, + A0B26C3786C41EA86867FAF702128578 /* HCIsDictionaryContainingValue.h */, + B0D745B85DCC5C30B2E1C136361909D3 /* HCIsDictionaryContainingValue.m */, + D183B16503E7E68A9E9B8BE77AB07DFF /* HCIsEmptyCollection.h */, + 111C1B293FAE8443619252C488AFB789 /* HCIsEmptyCollection.m */, + D69DE9A7FDFBA904D451536B0B6F96C1 /* HCIsEqual.h */, + 572EAD83F471E7F9BB9A04741CD17CD7 /* HCIsEqual.m */, + E9D9780CA9FCEC917E117D6777B35BB1 /* HCIsEqualCompressingWhiteSpace.h */, + B0B794D497B95C93EA694FB5B3CAA16A /* HCIsEqualCompressingWhiteSpace.m */, + FA04F455620B0CE7ACFA33960D1467D0 /* HCIsEqualIgnoringCase.h */, + 07F4BB29822D8B212B182F4B4B03FCD0 /* HCIsEqualIgnoringCase.m */, + 6E8CE7DD1D30153B5AD5C1CAD58933BD /* HCIsEqualToNumber.h */, + A8D514ACCE5F36DD82C7C62549DEC79F /* HCIsEqualToNumber.m */, + 0A4260D5C243F2A8B09A94F2508498E0 /* HCIsIn.h */, + 1E2AFBD6FCB8143FACC8192C423940AB /* HCIsIn.m */, + 6BBC8E0F13D9CA3CADBA9BCA0D35AC30 /* HCIsInstanceOf.h */, + 2752DF9F1761F64AB71B969B0517A87F /* HCIsInstanceOf.m */, + A7042956F1D5F4F414BC76421A11432A /* HCIsNil.h */, + F3E7DA0EEB24C37343A7D75DF4A73514 /* HCIsNil.m */, + 5AAC733885BA6A203647044C6526696E /* HCIsNot.h */, + 7612833D4D9B0694826B1C7DD7B00F67 /* HCIsNot.m */, + 3D5CCBF28758495E16A6F54CD6B1709B /* HCIsSame.h */, + 6285D2EAAA6C08360F10C86E04B765E3 /* HCIsSame.m */, + 3B7551364E734142910761112DD1EBEC /* HCIsTrueFalse.h */, + B2AEC6447906AEFB1CF6F9B0ECA301E5 /* HCIsTrueFalse.m */, + 8D4B8DC415B66B703626B9AC6C7B8369 /* HCIsTypeOf.h */, + 3514676781216A31840D3367AE870722 /* HCIsTypeOf.m */, + 99A28D2A94C88375EAD626ED771CDC26 /* HCLongLongReturnGetter.h */, + 0A1EBA997CF7C9388D26D1ACC66AE8B4 /* HCLongLongReturnGetter.m */, + 4F4468038A53A4E62772D3CE30C169A0 /* HCLongReturnGetter.h */, + 081615EDD706D6D9D71741A5D532762C /* HCLongReturnGetter.m */, + 60917429A02D22A583C0B23DC95EA619 /* HCMatcher.h */, + CC30C1058FE9C50C848DA495FB7036E4 /* HCNumberAssert.h */, + 2F5FECF01852FF018CD57C24B635EEF6 /* HCNumberAssert.m */, + D81351931406A73263288B05C493A7C2 /* HCObjectReturnGetter.h */, + 8E065739ADEF8013C3C2148C748DDB7D /* HCObjectReturnGetter.m */, + 32EC260CE31FA061B78C8F38AEA93B96 /* HCOrderingComparison.h */, + D896C9EEE2A6626F4E6E2A4B1E60C28F /* HCOrderingComparison.m */, + 9ECB1081C6206E90D879659EF60350A8 /* HCRequireNonNilObject.h */, + 17FB0581EEE8D21EB74D81C8FB623919 /* HCRequireNonNilObject.m */, + 1497C224AE3BEC0772BAB3B839DCD4DC /* HCReturnTypeHandlerChain.h */, + 421EBC4EA258BE435D5627187F9923FA /* HCReturnTypeHandlerChain.m */, + A96E0E8F901A72ACD6F39C2FF1B6A573 /* HCReturnValueGetter.h */, + 462CC631461FF0F792689156760B4CFA /* HCReturnValueGetter.m */, + 08E0DFD1C1DA3EF7E7A1159BE7112B7E /* HCRunloopRunner.h */, + 93DFA9CEB9434F5CEF259B8FBCED1B1F /* HCRunloopRunner.m */, + 8F7EDB84755BA039B7EB74DB2B177280 /* HCSelfDescribing.h */, + F7E2A688E8857F1B64A972EE63951BF8 /* HCSenTestFailureReporter.h */, + 42C2C9797F1DCE7ACA6935B537A36EAF /* HCSenTestFailureReporter.m */, + A1239CBBA69233BDD6AD85A47B384CDE /* HCShortReturnGetter.h */, + 6FC881BC5AF31E1ED2C1B5A0813A0C89 /* HCShortReturnGetter.m */, + 6765FE3E095A10CCA04B316EB3FD0E81 /* HCStringContains.h */, + 5BD4447D27068D9840D768D1650C8E62 /* HCStringContains.m */, + F924445CF95A74938C7388E9F4370AE9 /* HCStringContainsInOrder.h */, + 85CFD448D9D20C68710FAD8CCA67A71A /* HCStringContainsInOrder.m */, + C2B34606F998B7575B73A3D15954018F /* HCStringDescription.h */, + 6F872B73FCED382A0048C7E512E978FB /* HCStringDescription.m */, + 381B0683777C9C9E7E4338161EA448C4 /* HCStringEndsWith.h */, + 7E8B6B3EC8CF9EF224F4012BA559561C /* HCStringEndsWith.m */, + 589782DCDE095D4F1130D0C3B8A7CF7F /* HCStringStartsWith.h */, + D947CE2C6E92F9E4D72941C01E2F1B9A /* HCStringStartsWith.m */, + F89117F44AD93D49B4A1F16A1BBDE2E8 /* HCSubstringMatcher.h */, + 7585A0B00554D868DE31B537DF34D0CB /* HCSubstringMatcher.m */, + F406AE154752E4C1115CE738E4FD81EF /* HCTestFailure.h */, + 9C65C64152C04FD20CEF60176C490BB4 /* HCTestFailure.m */, + AAB9DF0E28478192160AB8EC6811D9D2 /* HCTestFailureReporter.h */, + B2E678C69FB2A45B80D3A8EDE85F1DDC /* HCTestFailureReporter.m */, + 5A4143D42B3E84CC031BF0DCE10D9309 /* HCTestFailureReporterChain.h */, + 7FF893E6E27D0CBC633522E472808186 /* HCTestFailureReporterChain.m */, + 231441CCBAC14BE463F54A8F059ECBD6 /* HCThrowsException.h */, + 35AA24F7451D1D549C6D719969227E73 /* HCThrowsException.m */, + BD01ABDA4BE87D80D5A9B9C1E63425A1 /* HCUnsignedCharReturnGetter.h */, + E281B9CD86CE2C3467AE9FB5A3DD9EC3 /* HCUnsignedCharReturnGetter.m */, + C973C5166E14C2B7A847EB016CE1A5EA /* HCUnsignedIntReturnGetter.h */, + 2E361895501CA52BB097C79F0F4BE0CF /* HCUnsignedIntReturnGetter.m */, + DEF12651806E15F983894A3855670CBD /* HCUnsignedLongLongReturnGetter.h */, + 206375FFA964013385748454D28BB1B6 /* HCUnsignedLongLongReturnGetter.m */, + 8FF49DD53ED624F5A0AA80BBBBDBC439 /* HCUnsignedLongReturnGetter.h */, + A2F9D51794366A72B340EE6DFA57799B /* HCUnsignedLongReturnGetter.m */, + 6BB92E0E60BFC98484622AADC36943C8 /* HCUnsignedShortReturnGetter.h */, + 8A9ADE98BFB51C4BC678151474E3EBD9 /* HCUnsignedShortReturnGetter.m */, + 2F2F1271D254511FF8828377A5661BD2 /* HCWrapInMatcher.h */, + 2E2A45A1C15CCE3AD2136871E73C9242 /* HCWrapInMatcher.m */, + DB35A320FA5D77588D90D14C26FE5615 /* HCXCTestFailureReporter.h */, + F4370BB69BE59DB9293665A09CB4376E /* HCXCTestFailureReporter.m */, + F2F77FAFE27EF46F643D67889728A577 /* NSInvocation+OCHamcrest.h */, + 27F37A006BF149397DE1FDAF316B7803 /* NSInvocation+OCHamcrest.m */, + 9850D8A995F2F35F0C35E8CA6FEF840F /* OCHamcrest.h */, + E084CB31F4A8BF24F3AD78410A64310F /* Support Files */, + ); + name = OCHamcrest; + path = OCHamcrest; + sourceTree = ""; + }; + 5A778027D8AA5EB7A0528682CE692D7F /* Frameworks */ = { + isa = PBXGroup; + children = ( + AD727EBE516A6C61AD5BEF3204E7C3BD /* OCHamcrest.framework */, + 25F7154ABB8E0F71B16D76813AE28F84 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 65FDF2405C9C3421A245FF1BAA90D523 /* Pods */ = { + isa = PBXGroup; + children = ( + 5416400A529F5358B7EA5C00D3CECE75 /* OCHamcrest */, + 82C95E61CC051A38E1B1760DE50B0BA0 /* OCMockito */, + ); + name = Pods; + sourceTree = ""; + }; + 82C95E61CC051A38E1B1760DE50B0BA0 /* OCMockito */ = { + isa = PBXGroup; + children = ( + 07F817FA9995AED3684CC19DAFC23A85 /* MKT_TPDWeakProxy.h */, + 7C360162E92AD2029386138F2644805C /* MKT_TPDWeakProxy.m */, + 8E693B636DFDFDFAF93F34658B76D57F /* MKTAnswer.h */, + 1041B75357FE4417A40F02B99718EA2A /* MKTArgumentGetter.h */, + 86ECF9340D3AAB01F0B3067438D46B19 /* MKTArgumentGetter.m */, + 81C0DC5B18405FA9D8F1CCAD8F6AEAE8 /* MKTArgumentGetterChain.h */, + C9C01738313ACD89E9768B737A71D896 /* MKTArgumentGetterChain.m */, + F49226BB7D1E996426B97D5CD3BEA20A /* MKTAtLeastNumberOfInvocationsChecker.h */, + 4920D12A419167DF2D8531ABD0408C61 /* MKTAtLeastNumberOfInvocationsChecker.m */, + D620C88FC6781BB9560C47740B880782 /* MKTAtLeastTimes.h */, + E3FEB3E11884160D8606669A40E1D0B5 /* MKTAtLeastTimes.m */, + 37D46A9D7B5F034E52DBE429970C830C /* MKTAtMostNumberOfInvocationsChecker.h */, + 23348E5CB510721F100C5513A0C5956C /* MKTAtMostNumberOfInvocationsChecker.m */, + 9E185F0EACC15858F21C65B72D636B78 /* MKTAtMostTimes.h */, + 80D698976F97CA2D552BCDCA05FCCD60 /* MKTAtMostTimes.m */, + E55C8F60934B9E3486B5400144D51B87 /* MKTBaseMockObject.h */, + 8CA8D8BAF7CD4B2A7EA0EF327E80BEE2 /* MKTBaseMockObject.m */, + 6938763A1A07A12C15F7C1353D471391 /* MKTBoolArgumentGetter.h */, + 907F58A470288CFDAC15F6D91459EB9C /* MKTBoolArgumentGetter.m */, + 3CDAA4D816A7367C058B9D5DCE8F668F /* MKTBoolReturnSetter.h */, + 14234E40E334C9012B4C42D5A2E47B20 /* MKTBoolReturnSetter.m */, + 1FAACE62919A576A4BF47A82B23A1AA7 /* MKTCallStackElement.h */, + 8CD7E1137210E2720DBC38CAC205A782 /* MKTCallStackElement.m */, + 84DB22F6F637646B96962798407CD285 /* MKTCharArgumentGetter.h */, + 62A84E3A6452BF7BCDA4ACC79DF3C44D /* MKTCharArgumentGetter.m */, + 0B63E72018F8DCD27388CB9C1F84CDFE /* MKTCharReturnSetter.h */, + 2BF2F90513A67534C2FE246C03A17258 /* MKTCharReturnSetter.m */, + AB0E4FC39671942C571870649F0F9A21 /* MKTClassArgumentGetter.h */, + 0FA62431AB0240FF502CA857D80416D6 /* MKTClassArgumentGetter.m */, + EBC11A631E69A7151B32E94EDA69A134 /* MKTClassObjectMock.h */, + 9394581F1369B80095EBE1419E6069F4 /* MKTClassObjectMock.m */, + 732C09647A1595A77A68B7E771EF2006 /* MKTClassReturnSetter.h */, + D460A5436A5E4153406D082733140750 /* MKTClassReturnSetter.m */, + 6DBFE2CABA8B83DEE912638FE4A55D68 /* MKTDoubleArgumentGetter.h */, + 3F89042174A732A619EDE40650224717 /* MKTDoubleArgumentGetter.m */, + 458BD2863290A21B82FD7CED07513B56 /* MKTDoubleReturnSetter.h */, + 50B487E0A20C9CE23E428337914EF740 /* MKTDoubleReturnSetter.m */, + A7469F06D3828C18C31E6569A40D5DC6 /* MKTDynamicProperties.h */, + C5F7F23E1BE2809EE4D749C34164EFF7 /* MKTDynamicProperties.m */, + 85194C9F20D4DE8555D24BFBE51573E7 /* MKTExactTimes.h */, + A1BD8FBA81108EA83B8A982B9FB74824 /* MKTExactTimes.m */, + 558E1ABEFD37DE62DD0154E12F5F137D /* MKTExecutesBlock.h */, + 444C303DDC591C6E560D356151507DC8 /* MKTExecutesBlock.m */, + CE7953303F73675BFA44165DC0E26B82 /* MKTFilterCallStack.h */, + 90CBD512C8E0889278945E954D072F41 /* MKTFilterCallStack.m */, + 8640CD298B3FD74592C355F11CC4B877 /* MKTFloatArgumentGetter.h */, + 98C3C63CA0908F34C5A72F4443CD3C01 /* MKTFloatArgumentGetter.m */, + A202F7038DF89580D0FE6BD754238A40 /* MKTFloatReturnSetter.h */, + EA12E949C744BD577BDBF65DDF8CC435 /* MKTFloatReturnSetter.m */, + D051BD45BE36582FA4E2D7129242385D /* MKTIntArgumentGetter.h */, + E4F7E266FADE4B56CBD62161CEB074B1 /* MKTIntArgumentGetter.m */, + 2133CFE70D680BF4AA7794C3459171E5 /* MKTIntReturnSetter.h */, + 087B9B2390D1C55B1740AEDA9909ABFE /* MKTIntReturnSetter.m */, + E7A67A1A44F2960A12360B506A358C52 /* MKTInvocation.h */, + 44F69EEC25EFDAA9F7D5A5FB8AC73E58 /* MKTInvocation.m */, + 0B266C09019B3F63F1051024F37771FD /* MKTInvocationContainer.h */, + FCF2DF282EEAB03CD61A2E43644D9290 /* MKTInvocationContainer.m */, + 55D3B5BA02D597325C1B47FC13E4DD62 /* MKTInvocationMatcher.h */, + 3A38F0CE31D536EC0E0A9B3345828412 /* MKTInvocationMatcher.m */, + 2B85AAD38A9E495F5D0C1167CA2D84F7 /* MKTInvocationsChecker.h */, + 5BC22DEB3F87D03E9B03144C593ED633 /* MKTInvocationsChecker.m */, + D1D4CEC433F252BAA6E88C7F6452B73F /* MKTLocation.h */, + 9B0AEFC2DB6ED39C44287A03E5F33D43 /* MKTLocation.m */, + 801866461A95BB6BB06D7ACA13B0F7BF /* MKTLongArgumentGetter.h */, + C08D49E1A88FFC4410273AB164781864 /* MKTLongArgumentGetter.m */, + 73E8D848016C63C2F4E672F9F39BAE81 /* MKTLongLongArgumentGetter.h */, + F4046E1A0C30486F4E309D40944EAD25 /* MKTLongLongArgumentGetter.m */, + F287D8D338B96291DF6E8C0C83250F7F /* MKTLongLongReturnSetter.h */, + 0DBC5E7D6E166C07300DC815A802EF4C /* MKTLongLongReturnSetter.m */, + C7510606B6F0EB6A7B0E29667AE8A9D3 /* MKTLongReturnSetter.h */, + A1C3B43C8DDB4D8451D16D7F772BBCFC /* MKTLongReturnSetter.m */, + DF10E12C4DE292F2E990E68340006DDF /* MKTMatchingInvocationsFinder.h */, + 262887178D59E3BE71DA8A4F77FA08E6 /* MKTMatchingInvocationsFinder.m */, + 086FED0F18625DB02BF14B8D07C03229 /* MKTMissingInvocationChecker.h */, + 1F3E25D867C0D0F5A09D3154F903EE09 /* MKTMissingInvocationChecker.m */, + 00B61151F229419C15B5032E410EA5E5 /* MKTMockingProgress.h */, + A9A255A81CA4550C0F3EEC667B070699 /* MKTMockingProgress.m */, + 1EF334ED943AAE463B1976F1C4B5B116 /* MKTMockitoCore.h */, + 712F548A01DB50EB28795FE309B808B7 /* MKTMockitoCore.m */, + A38F1F105CC9E903B09A16428560AC8D /* MKTNonObjectArgumentMatching.h */, + F2CC95774F6F1213CF68852FAB2A9250 /* MKTNumberOfInvocationsChecker.h */, + 873ABF4AB8A7991B752747062FCB51AC /* MKTNumberOfInvocationsChecker.m */, + 25BC887A7D50946D54F0744DE276C1C6 /* MKTObjectAndProtocolMock.h */, + 460F39594C0CA1F9FED8D53D423CF004 /* MKTObjectAndProtocolMock.m */, + F4485BD63D4146F51B7A990D580C0D36 /* MKTObjectArgumentGetter.h */, + B8B8CBC4DDAFAE06C2D69D1D6048E517 /* MKTObjectArgumentGetter.m */, + 0E505D922B739313AC0C2215D7D81E4D /* MKTObjectMock.h */, + 9C5515B3CB3B2F502D3328E746F1B06A /* MKTObjectMock.m */, + 8768CC38C15E8D2828A93EE7E9E490F0 /* MKTObjectReturnSetter.h */, + C7A38AF4A4625748B79BF5AD096910BF /* MKTObjectReturnSetter.m */, + E39410740663C2E0A14F4081687DC91A /* MKTOngoingStubbing.h */, + 32BF8BE9EF675470A729BA22C1361A6D /* MKTOngoingStubbing.m */, + 333F751C5679F8CB01A6390F104DA084 /* MKTParseCallStack.h */, + 52AFD506CCDC1DCB953C4F35DCA640A6 /* MKTParseCallStack.m */, + EEFC62B3798DBBA384D124E151D0F66C /* MKTPointerArgumentGetter.h */, + 2331CBFB327757FBA88D0D7AF4B70673 /* MKTPointerArgumentGetter.m */, + 4B8F56AB787D63007F14B0C61E33BD06 /* MKTPrinter.h */, + 207D144CA82E0A26F82DB0E9EC77D3E5 /* MKTPrinter.m */, + 8E3F1B7ACC2FC096F1720E65C897C5C2 /* MKTProtocolMock.h */, + 39D41EE12A4E3D17A653D8F3E5B90D07 /* MKTProtocolMock.m */, + 1A9E16709A0241EF15E3184FDAA283BD /* MKTReturnsValue.h */, + E4B1685C03F14987E2EA51F32F0E9817 /* MKTReturnsValue.m */, + E013CFA79F6F0CE1C0B54BF3EC0E4E5E /* MKTReturnValueSetter.h */, + 7A9CE8C344883AB5517B9289D3CE62BC /* MKTReturnValueSetter.m */, + E624982025C01963D77155028B6479C6 /* MKTReturnValueSetterChain.h */, + 8C8C81419E6D62EF0816BC942BB02CD8 /* MKTReturnValueSetterChain.m */, + E3E01A9E71DAD44F66EB69713F8D39A9 /* MKTSelectorArgumentGetter.h */, + ACFFFBAB2BA0B628DA5A84AC107AA50E /* MKTSelectorArgumentGetter.m */, + CA6C0B1B678EBAEB826C065F5923DCD0 /* MKTShortArgumentGetter.h */, + F437F8EA2F4F80AE8B362B1426F240CE /* MKTShortArgumentGetter.m */, + A6E6938F87F891A7772A7B4026ED59DF /* MKTShortReturnSetter.h */, + E638A8B5FFF49E7FC2DA85139374A7CE /* MKTShortReturnSetter.m */, + E1F4FA881C7079D43BB7A9C4B895782A /* MKTSingletonSwizzler.h */, + B6A751D230AC2B78734B21993A927BCA /* MKTSingletonSwizzler.m */, + 77D4F4AE23915C4B14B3B927567A3F8C /* MKTStructArgumentGetter.h */, + 6B9EB0943A6508B78A258A4D1692D213 /* MKTStructArgumentGetter.m */, + 9A12FDE019356375BBCFA6581B2170A8 /* MKTStructReturnSetter.h */, + 712AFDB5E8B9A9BE3B1E16DE01D0997E /* MKTStructReturnSetter.m */, + E2313D2E2EABA4F71EFD3341B7A6E81A /* MKTStubbedInvocationMatcher.h */, + 0C2AE5F1CBE44A8AC158F91E76A9561F /* MKTStubbedInvocationMatcher.m */, + 84BA696AA619B6D0F7EA279404DB530E /* MKTTestLocation.h */, + EF5DC0800B9EDCD568E8A0080E437D81 /* MKTTestLocation.m */, + 9EA4549FC719D29A4F6D8D37BECD26BF /* MKTThrowsException.h */, + AD19E9982D5E734D1032EF05DC5B1F97 /* MKTThrowsException.m */, + 691AF08E70240ABA9D35D3D1E4E8FA24 /* MKTUnsignedCharArgumentGetter.h */, + 01DABDA5B4A117EB894E1A7651BBFB1C /* MKTUnsignedCharArgumentGetter.m */, + 559F60D5CAAC878835B98F05A09A9220 /* MKTUnsignedCharReturnSetter.h */, + B3D921AE4B051F447D0B6B48CDD60D27 /* MKTUnsignedCharReturnSetter.m */, + 4A90BB06D5CC2236A79A6C720310609A /* MKTUnsignedIntArgumentGetter.h */, + 92F55CA5F8286B06B44D09C3FB03A233 /* MKTUnsignedIntArgumentGetter.m */, + 4A93CD9BCB843D55CA727E8D320AF65D /* MKTUnsignedIntReturnSetter.h */, + 01B75014846B68D5E4FC1E4EC926EF6B /* MKTUnsignedIntReturnSetter.m */, + 81AAB22CC8D8D414A37DF85D06679267 /* MKTUnsignedLongArgumentGetter.h */, + 29E3E28E517D5E40573CDD1CF19D0E2D /* MKTUnsignedLongArgumentGetter.m */, + 6C5C0249C92D0C2E0BC1D31DDEDF393C /* MKTUnsignedLongLongArgumentGetter.h */, + 5BA98008ECCAC2D5B872900C6F7EF9C4 /* MKTUnsignedLongLongArgumentGetter.m */, + F566BC2D6E2FB121D49B779418D68E6A /* MKTUnsignedLongLongReturnSetter.h */, + 62E47137A99BDF813A811FCE1DE3F9AF /* MKTUnsignedLongLongReturnSetter.m */, + 0E8D99BCDD5034A685B1132ABEE31787 /* MKTUnsignedLongReturnSetter.h */, + CE50CC9964C2E5BCA40BE1C1246A0457 /* MKTUnsignedLongReturnSetter.m */, + 0C75B924AE86293F7EDE8408E95E7B0B /* MKTUnsignedShortArgumentGetter.h */, + D0BC998DFA3AD3C7727902C32D7B023C /* MKTUnsignedShortArgumentGetter.m */, + 6F2D5CE5E0B330A27CD201D504E1D71E /* MKTUnsignedShortReturnSetter.h */, + 45272A504E2D28004C6939415A77D8FB /* MKTUnsignedShortReturnSetter.m */, + C58AE3E63FCE7B1758DBBE1D1C38BB39 /* MKTVerificationData.h */, + D8091FD4252078664713E9429EA020CF /* MKTVerificationData.m */, + 8398143F67390EAF146864CF91A8624C /* MKTVerificationMode.h */, + 6328E2DA677910CDDA3A692E28C41D00 /* NSInvocation+OCMockito.h */, + 88EBDA32FA00ED85D46F2295D74014DA /* NSInvocation+OCMockito.m */, + 9DEE98911D994708B4D35823CAF2F216 /* OCMockito.h */, + C60E4F725E1CB2116B6E7C88D81FD288 /* OCMockito.m */, + 4EEADDD04C7BD4B91787C198CC19D22C /* Support Files */, + ); + name = OCMockito; + path = OCMockito; + sourceTree = ""; + }; + CF1408CF629C7361332E53B88F7BD30C = { + isa = PBXGroup; + children = ( + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + 5A778027D8AA5EB7A0528682CE692D7F /* Frameworks */, + 65FDF2405C9C3421A245FF1BAA90D523 /* Pods */, + D38B0D79F91A53608486086AF5B4AD1C /* Products */, + F65337BFF35068CF5D802CEE699CBD2D /* Targets Support Files */, + ); + sourceTree = ""; + }; + D38B0D79F91A53608486086AF5B4AD1C /* Products */ = { + isa = PBXGroup; + children = ( + 46E9DB656AB852B52134EA8B5DE55D5C /* OCHamcrest.framework */, + 7DDE13FAD087C4C94416C87926291DA9 /* OCMockito.framework */, + 11089B3864BDF5DACB86EBD5EEAB27AE /* Pods_MonsterCards.framework */, + 0AEE95FDC2144C3DDC84BFFF0AD3286D /* Pods_MonsterCards_MonsterCardsUITests.framework */, + 688A32E81F833186D271C1DDEDF196A2 /* Pods_MonsterCardsTests.framework */, + ); + name = Products; + sourceTree = ""; + }; + E084CB31F4A8BF24F3AD78410A64310F /* Support Files */ = { + isa = PBXGroup; + children = ( + 98522699DD82870C311B72E916EBF2BE /* OCHamcrest.modulemap */, + C1835F2EAFA904DF40CCC8A23D8FF8B0 /* OCHamcrest-dummy.m */, + BA81D249DE2DCF35FE132923832B63F6 /* OCHamcrest-Info.plist */, + 47B5C2A311F8CD3FF35437ECDAF2A96F /* OCHamcrest-prefix.pch */, + E8294C7DDB7FB24726F50BBB9D28E5A1 /* OCHamcrest-umbrella.h */, + 7728EFFA552082A9DCB502FB2286C937 /* OCHamcrest.debug.xcconfig */, + 9F59F3F0434FEFBB4FDB037D8532C3BC /* OCHamcrest.release.xcconfig */, + ); + name = "Support Files"; + path = "../Target Support Files/OCHamcrest"; + sourceTree = ""; + }; + EDE426ED6F0E1FB72A77775608808FD0 /* Pods-MonsterCardsTests */ = { + isa = PBXGroup; + children = ( + 2E437669DB85BB018333237AC38D91FD /* Pods-MonsterCardsTests.modulemap */, + 8696FF9B0821118217B616791FD05FCE /* Pods-MonsterCardsTests-acknowledgements.markdown */, + 22B91E67557209B13B3B9307449E9679 /* Pods-MonsterCardsTests-acknowledgements.plist */, + 84154B65BFEB374DB9854DC227635944 /* Pods-MonsterCardsTests-dummy.m */, + 13E4E182A4FAFEAAAEC6EFB0D9E44EB5 /* Pods-MonsterCardsTests-frameworks.sh */, + B5E5FB9ACABA8BD4BAAFF1D3FE0906C1 /* Pods-MonsterCardsTests-Info.plist */, + 9C719025AA0018BF030D009382FF9C96 /* Pods-MonsterCardsTests-umbrella.h */, + 13CC220F804D92068162216E154A2C1F /* Pods-MonsterCardsTests.debug.xcconfig */, + 1AAE1A2BD70149D0C19447ACC7945148 /* Pods-MonsterCardsTests.release.xcconfig */, + ); + name = "Pods-MonsterCardsTests"; + path = "Target Support Files/Pods-MonsterCardsTests"; + sourceTree = ""; + }; + F65337BFF35068CF5D802CEE699CBD2D /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 0C84EBF413C89006C4701B1CB5ABA424 /* Pods-MonsterCards */, + 4FB9017EFFADCBE275DDDB74E6DDA887 /* Pods-MonsterCards-MonsterCardsUITests */, + EDE426ED6F0E1FB72A77775608808FD0 /* Pods-MonsterCardsTests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 0055F3DBCD0A787F92064F2676DDB06C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + C5980869746578E3F9DE37BFC194CE7B /* Pods-MonsterCardsTests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7255155263B3E14BB016A7A5E868BEC9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 785C5C4B0462F94602021DC62269E1B5 /* Pods-MonsterCards-MonsterCardsUITests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 73925740DAA55402BE476791055BDACD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 960AE809B6F84A7E201E1D6E3EC21997 /* MKT_TPDWeakProxy.h in Headers */, + 48CCE0FE8DEE43F765585D27EF18478B /* MKTAnswer.h in Headers */, + 3FFCBE09C913D2717E80B00EBA43537C /* MKTArgumentGetter.h in Headers */, + A28C660AF8E3132E19E1AF055F4BE6A4 /* MKTArgumentGetterChain.h in Headers */, + 48A7EBE2B8C7BE624B0C41E3B25A96C5 /* MKTAtLeastNumberOfInvocationsChecker.h in Headers */, + 7C6B61AF43078E58D4C5F5084AD1FC9F /* MKTAtLeastTimes.h in Headers */, + 63EE4C5601F67C91A37ADDA21E4648F2 /* MKTAtMostNumberOfInvocationsChecker.h in Headers */, + BB9AD17BAE3F763736794C00398B5D7D /* MKTAtMostTimes.h in Headers */, + 28EEE26BBFCFF822B8A26F1233BE87B1 /* MKTBaseMockObject.h in Headers */, + 83FE6F14704CA6C8B33AADE4F3D79994 /* MKTBoolArgumentGetter.h in Headers */, + 292F0919E2C83D6BC2867842545C257B /* MKTBoolReturnSetter.h in Headers */, + 795DF7E92814FC4C1C1288898672850F /* MKTCallStackElement.h in Headers */, + FBEA576ACAF9BA84660624EFB3F6FD22 /* MKTCharArgumentGetter.h in Headers */, + 42B1E0631CA3B7885477A35F35CC7096 /* MKTCharReturnSetter.h in Headers */, + A95BEA138372346299459B9FC04B565A /* MKTClassArgumentGetter.h in Headers */, + 7B7CE7C02FE3F0525BCFB074CB6FBA57 /* MKTClassObjectMock.h in Headers */, + 23454080FBB7928B3547BCD0C561F088 /* MKTClassReturnSetter.h in Headers */, + F0E70AC299F0831C0E875C0706B907AC /* MKTDoubleArgumentGetter.h in Headers */, + 007CFCACD1DE9E498C1861D1B0C0BD3E /* MKTDoubleReturnSetter.h in Headers */, + 996356727CBAE60DD0BEE56843FEEBF1 /* MKTDynamicProperties.h in Headers */, + FB7CA42C054C925F7F67D21CF2E417F6 /* MKTExactTimes.h in Headers */, + 1B61706E9591558F16B03527C02BFF91 /* MKTExecutesBlock.h in Headers */, + C717F917396C678FB8F99A95F27B2EF9 /* MKTFilterCallStack.h in Headers */, + BC8293E691AA7B46E489871661C81CD7 /* MKTFloatArgumentGetter.h in Headers */, + A6582DF5666FAD2198F54F080F167568 /* MKTFloatReturnSetter.h in Headers */, + 173CE0C56F8C1DDFD1FA6E906B311B10 /* MKTIntArgumentGetter.h in Headers */, + D92726845686E07EC82EC2653ADD19B1 /* MKTIntReturnSetter.h in Headers */, + 1F56A53B585C6B67BC069E72589C45BF /* MKTInvocation.h in Headers */, + 690E3691D8F8E2FC259909C6E0A64F33 /* MKTInvocationContainer.h in Headers */, + 050D6F8B082950B8B7D6F47F329E27E5 /* MKTInvocationMatcher.h in Headers */, + BC80D34F8897CB758F1F0004467F090E /* MKTInvocationsChecker.h in Headers */, + 81C193765AE203E5EAC50147EB55449B /* MKTLocation.h in Headers */, + A432FFAD80299B04C87DDFC2C2954D06 /* MKTLongArgumentGetter.h in Headers */, + 816E49A41D0CE04FA8AF8BE6942B34C7 /* MKTLongLongArgumentGetter.h in Headers */, + D812A230EC69FD24E4F11BEEA4AFAD52 /* MKTLongLongReturnSetter.h in Headers */, + 9F7AC0D1A5615F7654766CAAA5A3F836 /* MKTLongReturnSetter.h in Headers */, + D79FD0F7E069BDCD3FEC2C7C294B1E15 /* MKTMatchingInvocationsFinder.h in Headers */, + 8DD9CEEA16A8CE23F451843D99177751 /* MKTMissingInvocationChecker.h in Headers */, + E8D442DB031FEEB62433BE96C8AB33DB /* MKTMockingProgress.h in Headers */, + FBEBFF5AF28CE83D7481D44FF7897F8D /* MKTMockitoCore.h in Headers */, + 475A2C2CA379FF544DC96B8DB0311529 /* MKTNonObjectArgumentMatching.h in Headers */, + C0E76C47DE90EC3AA19737C61C272645 /* MKTNumberOfInvocationsChecker.h in Headers */, + 438442E1A3A9E149D456BA8B04FCA5EF /* MKTObjectAndProtocolMock.h in Headers */, + A62EDCD9C0C55A0C303C7F13F6DDA54C /* MKTObjectArgumentGetter.h in Headers */, + 1C91BC105424317143C13B148565BB9D /* MKTObjectMock.h in Headers */, + CD7C20CC0D3BE89833E2B88723F817A2 /* MKTObjectReturnSetter.h in Headers */, + 7E13506EA2F3466772368654AA8F6C38 /* MKTOngoingStubbing.h in Headers */, + F5B6023D722D37FD50408EFF48911585 /* MKTParseCallStack.h in Headers */, + C40A4848255A8F87D6B0AB9F7E57A4B0 /* MKTPointerArgumentGetter.h in Headers */, + E6D25D0C767F65C2A690D163E3D41524 /* MKTPrinter.h in Headers */, + FD0A25135204FAC9F5C5BCAF990E14CB /* MKTProtocolMock.h in Headers */, + 1B1E6CCD7088156EE6D2920649A6E34C /* MKTReturnsValue.h in Headers */, + B0C3D04FC62EC72CD69DEEC9FD9F3DE9 /* MKTReturnValueSetter.h in Headers */, + 9CE301579C8EA60560F27F202B774A1B /* MKTReturnValueSetterChain.h in Headers */, + 8F737156BC90197CA15B0B71844E00DB /* MKTSelectorArgumentGetter.h in Headers */, + 33D152396681BE5A669712E405638A79 /* MKTShortArgumentGetter.h in Headers */, + E11C50FF8F20203F3AAA17501ADB123E /* MKTShortReturnSetter.h in Headers */, + 96C9B828935A43B3034F2CE38BF231CC /* MKTSingletonSwizzler.h in Headers */, + 5073D56FACA487D1D0323D7377851C19 /* MKTStructArgumentGetter.h in Headers */, + 8F06868F19F645BC52F1D4359254B722 /* MKTStructReturnSetter.h in Headers */, + C009C1BAB56D1BF620C12C656698C89D /* MKTStubbedInvocationMatcher.h in Headers */, + CBC2E60933D74BBBBCB459A271C964DB /* MKTTestLocation.h in Headers */, + A6CB0D9A3AD325451BDF7DA26ECF6668 /* MKTThrowsException.h in Headers */, + FBB9799170F0043D6AE4058CC58FA58D /* MKTUnsignedCharArgumentGetter.h in Headers */, + FADF8C53DC1796185FEBA94E1413996C /* MKTUnsignedCharReturnSetter.h in Headers */, + 73D1058E8EF9CDAA4CB06A9B51ABB972 /* MKTUnsignedIntArgumentGetter.h in Headers */, + 0A8BD5E29B81EF33969F0415DA7ACB7F /* MKTUnsignedIntReturnSetter.h in Headers */, + 976C5437030860272AC776041C613F2B /* MKTUnsignedLongArgumentGetter.h in Headers */, + 9C020033F0CFD42D86068EF8898A08EA /* MKTUnsignedLongLongArgumentGetter.h in Headers */, + C82C5863ECDBD0481F99169F0D026588 /* MKTUnsignedLongLongReturnSetter.h in Headers */, + DA262210C2E1B969F63B5A0A5E508BA4 /* MKTUnsignedLongReturnSetter.h in Headers */, + FBAB26DC8C07C206183DA14A036EB05A /* MKTUnsignedShortArgumentGetter.h in Headers */, + EF9B7395CBEF1A9FAA764FFAD8E588FE /* MKTUnsignedShortReturnSetter.h in Headers */, + B1A6829C9948D691B59F995086B4797F /* MKTVerificationData.h in Headers */, + DBBA5986F0B2FFE061AE9C7B5A1CD627 /* MKTVerificationMode.h in Headers */, + C3A69DB7FE8775426246AE1D970ADD9B /* NSInvocation+OCMockito.h in Headers */, + FF1EFF50BE78AE27565E47329FC84571 /* OCMockito-umbrella.h in Headers */, + 92457CFF6B60046C3532729D9EB4E68F /* OCMockito.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84E99EDCABD26825027421333CC60318 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + B00063E2A13A7E3C1187B523EC9EC84A /* Pods-MonsterCards-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FBD607D3374FF4B08C948880431343B1 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D1E5BC3B65257257D5639E617556E98C /* HCAllOf.h in Headers */, + 96779644B3350ED6B6655D962302C911 /* HCAnyOf.h in Headers */, + 89A09174DF778F0854FBD15614E16B38 /* HCArgumentCaptor.h in Headers */, + CC98BA6A906C0ECCD1871C71FFD4C53E /* HCAssertThat.h in Headers */, + CA1EE97E99C4BE490D78046EC3EBD0D4 /* HCBaseDescription.h in Headers */, + 9C6D8E7EB6A2C54B72EE2925EE804C79 /* HCBaseMatcher.h in Headers */, + BE7049CB0B4277F967CA5E52DE7FB0FA /* HCBoolReturnGetter.h in Headers */, + 3F4F5E740D197C366BDE4D467CBF96C1 /* HCCharReturnGetter.h in Headers */, + F51A47DD70A6514F14D9E9D02744DAAB /* HCClassMatcher.h in Headers */, + 974B554A8734595074EE5428BEED34E3 /* HCCollect.h in Headers */, + 813CA344C9E0275DC02EB3B68F1BF40E /* HCConformsToProtocol.h in Headers */, + 40A926206018ABF3AFF0ADDF94324643 /* HCDescribedAs.h in Headers */, + C5E72C93136F64225F955F745D356C4D /* HCDescription.h in Headers */, + E27DCE811674839FE59B091B059C9A2B /* HCDiagnosingMatcher.h in Headers */, + 2521C50830E7E62A6EB309870963D3BF /* HCDoubleReturnGetter.h in Headers */, + 4B152F3CFE798136C7C1C77C58166079 /* HCEvery.h in Headers */, + 6A98090947417A9148F40868D41101C5 /* HCFloatReturnGetter.h in Headers */, + 6C204CD45445332B0FD1DD70811EE3A5 /* HCGenericTestFailureReporter.h in Headers */, + D2FC4EA5EF068F3518AC9AD92D0F4B22 /* HCHasCount.h in Headers */, + C90B45C579A373B3DEAAF3744E21F1D0 /* HCHasDescription.h in Headers */, + EDE3BC63F127E764B0426AAAEFA3969B /* HCHasProperty.h in Headers */, + 384A035CC298DD97E0401484C91EE4A0 /* HCIntReturnGetter.h in Headers */, + C9A29CC7A252AE2CE96E8B06FDC0BA06 /* HCInvocationMatcher.h in Headers */, + 024B76E463B79D2B3FA07A14997E768D /* HCIs.h in Headers */, + D627CE9B858E835CBA8A281CB78C9FBB /* HCIsAnything.h in Headers */, + 3C421D44F6E0B3B1644D7F7296E0610D /* HCIsCloseTo.h in Headers */, + AF6C73D28E6CE1A8F7B3BE6D96B55916 /* HCIsCollectionContaining.h in Headers */, + 6216AC5E8DB91BF6C47A7636D731B3B6 /* HCIsCollectionContainingInAnyOrder.h in Headers */, + 476A5EF81FD8094181502B5A55651C10 /* HCIsCollectionContainingInOrder.h in Headers */, + DB0968805C2587E40ACC80C743EECDC2 /* HCIsCollectionContainingInRelativeOrder.h in Headers */, + D9A38AA7DE6787C9A7EF4843AA4D6D45 /* HCIsCollectionOnlyContaining.h in Headers */, + A0514CA796CFF6E4DF28FBEC60453AB1 /* HCIsDictionaryContaining.h in Headers */, + ADB6523821D96B7347F2D32FC5CA3DCD /* HCIsDictionaryContainingEntries.h in Headers */, + 6E2DBB311FFA07EB22FB8449639E175E /* HCIsDictionaryContainingKey.h in Headers */, + 68399EA1BD0515475AF2761BAEC3A610 /* HCIsDictionaryContainingValue.h in Headers */, + 66468CFD75F747A2E88DB2BFC4603565 /* HCIsEmptyCollection.h in Headers */, + C8E8235C2E5269E9E2B40282928CA816 /* HCIsEqual.h in Headers */, + A86B8B77B1B26FF18F288A26BF1E6974 /* HCIsEqualCompressingWhiteSpace.h in Headers */, + 03FB2E02AE2B5D6A43C81A5679248527 /* HCIsEqualIgnoringCase.h in Headers */, + DB0DB49EFEE90A19D040DBCC51309B3D /* HCIsEqualToNumber.h in Headers */, + 26606F306B1109CCB5F87433DB7FA0CF /* HCIsIn.h in Headers */, + 4B356B8F499039E373153A378240E04A /* HCIsInstanceOf.h in Headers */, + 9668948A1474DFC7F80BBE356F473157 /* HCIsNil.h in Headers */, + A6039AB9A7C924B413541A9B6E530746 /* HCIsNot.h in Headers */, + 4BAAB9A0B7757952CB9985525FDBDFCA /* HCIsSame.h in Headers */, + F1920988BF4895F6458491D272425929 /* HCIsTrueFalse.h in Headers */, + 6EC2B53CD5D26ED9FD24C14ED7BB4919 /* HCIsTypeOf.h in Headers */, + 6D8C6D536B0FA535D03DFA503F3D014A /* HCLongLongReturnGetter.h in Headers */, + 0B6362177CE78E5EC130E18139E24B8B /* HCLongReturnGetter.h in Headers */, + 2DA738D870214032687E2FDB34A6D880 /* HCMatcher.h in Headers */, + B855505B4523137603A9394B0C49EC9F /* HCNumberAssert.h in Headers */, + 9678DC116C79B7A0D691C88ABCA83020 /* HCObjectReturnGetter.h in Headers */, + CBE56E2B4C064CE2A85AF2A5F9520725 /* HCOrderingComparison.h in Headers */, + 7C20FD5B9ECC4C2314EDBCDD6661B5A1 /* HCRequireNonNilObject.h in Headers */, + ABBFB28E8C4720DD34B22BF7634E76B2 /* HCReturnTypeHandlerChain.h in Headers */, + 82D29B93735FF655E7F8910952ACE5C5 /* HCReturnValueGetter.h in Headers */, + 08FB169085AC496C67A2824F01448F5C /* HCRunloopRunner.h in Headers */, + 1F2B66E4B7808A57C91637523D43452C /* HCSelfDescribing.h in Headers */, + 0D6C006E9856FDFA561540FADEF6FBCA /* HCSenTestFailureReporter.h in Headers */, + 47CABB81555E8F3EB29931B9ED6FFBF8 /* HCShortReturnGetter.h in Headers */, + F729E8DE2F5FD7F645CBD3A41DF1F5CC /* HCStringContains.h in Headers */, + 61A99009293679EA4237AA9B56F60D6B /* HCStringContainsInOrder.h in Headers */, + 1BDBD560BE2664102CC6F31F4CD4082C /* HCStringDescription.h in Headers */, + 68260450D822AD3B2DE3029349E81C98 /* HCStringEndsWith.h in Headers */, + D104E377326C69FDAAC03B0CDC14E87F /* HCStringStartsWith.h in Headers */, + 31A50B6F4CA3361B5C2E881244383689 /* HCSubstringMatcher.h in Headers */, + 7B0F98BDE64CB1B1F21D9D4EAFC5DDD8 /* HCTestFailure.h in Headers */, + 642F6CD92A1AA04369480C340F60D555 /* HCTestFailureReporter.h in Headers */, + 6F103825E351527ECF806631AEA2017E /* HCTestFailureReporterChain.h in Headers */, + 053C477676E052053EC59D397E651967 /* HCThrowsException.h in Headers */, + FC37BF3C0C2AA42F1938481BA6E1FD79 /* HCUnsignedCharReturnGetter.h in Headers */, + E8D2FFCA392095D8AD042000C27C2AFB /* HCUnsignedIntReturnGetter.h in Headers */, + 5D301890CAA04EB8F7DEBD915EEAEE24 /* HCUnsignedLongLongReturnGetter.h in Headers */, + C97C1A415CC68AAD55C3D79D132AABDE /* HCUnsignedLongReturnGetter.h in Headers */, + 66AA3F4543A7956E7F6F16F3E6B775C5 /* HCUnsignedShortReturnGetter.h in Headers */, + 0B4324A994045E035E758562466C1CF5 /* HCWrapInMatcher.h in Headers */, + 7D79809388BA9B0624A0457D2CF3CC78 /* HCXCTestFailureReporter.h in Headers */, + 5C4A9A26CF5B4A2B7F04412FFF10396C /* NSInvocation+OCHamcrest.h in Headers */, + 2E33E9C8A54CB5FBA05D5B9C2104211A /* OCHamcrest-umbrella.h in Headers */, + D3EABE1367054ABFB68243209F16E34B /* OCHamcrest.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 613D56AD79E41D1B648BF5F3C022630B /* Pods-MonsterCardsTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4CB375B6EBD2757FAB902EF80F432D2C /* Build configuration list for PBXNativeTarget "Pods-MonsterCardsTests" */; + buildPhases = ( + 0055F3DBCD0A787F92064F2676DDB06C /* Headers */, + 53DA6537AF623A0925E48412407A738F /* Sources */, + BD7DA0835355BD835D3EEE4EEBA11F9C /* Frameworks */, + 19060E0BD878D0C6686AE34FA2827A9E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 44C9612A96190417F63F8C2157FB517F /* PBXTargetDependency */, + 71B9A2D742EA674DB8CFAB8FD0BB6E33 /* PBXTargetDependency */, + 0272773450678B680EA52EA3FBA32150 /* PBXTargetDependency */, + ); + name = "Pods-MonsterCardsTests"; + productName = "Pods-MonsterCardsTests"; + productReference = 688A32E81F833186D271C1DDEDF196A2 /* Pods_MonsterCardsTests.framework */; + productType = "com.apple.product-type.framework"; + }; + 6A406131E2AA05E2651ADFAF69491389 /* Pods-MonsterCards */ = { + isa = PBXNativeTarget; + buildConfigurationList = 283B32CD6358D4F0AD65BD3EDA581DBD /* Build configuration list for PBXNativeTarget "Pods-MonsterCards" */; + buildPhases = ( + 84E99EDCABD26825027421333CC60318 /* Headers */, + E909C1C03D6980B700FEC1D2466D10AB /* Sources */, + DB3B67822A49A40509BD61FA848FD5B6 /* Frameworks */, + 7BE9B9E9F8E0C842C283323BA5529B52 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Pods-MonsterCards"; + productName = "Pods-MonsterCards"; + productReference = 11089B3864BDF5DACB86EBD5EEAB27AE /* Pods_MonsterCards.framework */; + productType = "com.apple.product-type.framework"; + }; + 8094467761B2E923813531849AE7B97A /* OCHamcrest */ = { + isa = PBXNativeTarget; + buildConfigurationList = C7C24E615FD1232819E0BDE08F7A9854 /* Build configuration list for PBXNativeTarget "OCHamcrest" */; + buildPhases = ( + FBD607D3374FF4B08C948880431343B1 /* Headers */, + 5BB4C09680F755B8F9CE22D0FAD67AE6 /* Sources */, + 9116E775AD924975711919BBB67E31B8 /* Frameworks */, + C24582BDC512733BD8A0AF332E8E92D5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OCHamcrest; + productName = OCHamcrest; + productReference = 46E9DB656AB852B52134EA8B5DE55D5C /* OCHamcrest.framework */; + productType = "com.apple.product-type.framework"; + }; + AACA30CC7F0FBF6ECAE6A3C4719640F1 /* OCMockito */ = { + isa = PBXNativeTarget; + buildConfigurationList = A2932B2C2D8516A2CD3F99539435AD23 /* Build configuration list for PBXNativeTarget "OCMockito" */; + buildPhases = ( + 73925740DAA55402BE476791055BDACD /* Headers */, + A8049938B768EAD29F8D2CF76D805212 /* Sources */, + 2FC51FF4674922ECD994EEF685AF5D9C /* Frameworks */, + F476C85560460A81355364D39B780A85 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 4F2975C8A0D3CFFB95FB27C3DC4AF6CB /* PBXTargetDependency */, + ); + name = OCMockito; + productName = OCMockito; + productReference = 7DDE13FAD087C4C94416C87926291DA9 /* OCMockito.framework */; + productType = "com.apple.product-type.framework"; + }; + DB08E2A07830229B54562C73451C370C /* Pods-MonsterCards-MonsterCardsUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4435C1C1CE7F3DF37C4BB39C320929A8 /* Build configuration list for PBXNativeTarget "Pods-MonsterCards-MonsterCardsUITests" */; + buildPhases = ( + 7255155263B3E14BB016A7A5E868BEC9 /* Headers */, + 9FB2D7E6778BC86B3685E0A6F4E19AAD /* Sources */, + A09E36DBE13690DA55DADE1D2606EEE2 /* Frameworks */, + 3F84F8E2BCCA5DD709DA937D62702357 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 9C267F9403445A3EED5BF258E07EA6B0 /* PBXTargetDependency */, + 19A8E5AD7B59BA7929A415B334F46BA2 /* PBXTargetDependency */, + ); + name = "Pods-MonsterCards-MonsterCardsUITests"; + productName = "Pods-MonsterCards-MonsterCardsUITests"; + productReference = 0AEE95FDC2144C3DDC84BFFF0AD3286D /* Pods_MonsterCards_MonsterCardsUITests.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BFDFE7DC352907FC980B868725387E98 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1100; + LastUpgradeCheck = 1100; + }; + buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = CF1408CF629C7361332E53B88F7BD30C; + productRefGroup = D38B0D79F91A53608486086AF5B4AD1C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8094467761B2E923813531849AE7B97A /* OCHamcrest */, + AACA30CC7F0FBF6ECAE6A3C4719640F1 /* OCMockito */, + 6A406131E2AA05E2651ADFAF69491389 /* Pods-MonsterCards */, + DB08E2A07830229B54562C73451C370C /* Pods-MonsterCards-MonsterCardsUITests */, + 613D56AD79E41D1B648BF5F3C022630B /* Pods-MonsterCardsTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 19060E0BD878D0C6686AE34FA2827A9E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3F84F8E2BCCA5DD709DA937D62702357 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7BE9B9E9F8E0C842C283323BA5529B52 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C24582BDC512733BD8A0AF332E8E92D5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F476C85560460A81355364D39B780A85 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 53DA6537AF623A0925E48412407A738F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 06FFF54B9956171BD9472D9291423144 /* Pods-MonsterCardsTests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5BB4C09680F755B8F9CE22D0FAD67AE6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 863772A6EE57049E2007FDCAD9C6A630 /* HCAllOf.m in Sources */, + 5BF9B7A15063FCA7D36CBFAAD810CADF /* HCAnyOf.m in Sources */, + 9188773F107A021B33AE8805DE4F9858 /* HCArgumentCaptor.m in Sources */, + D0277F3AA8E43D773899C715FA094826 /* HCAssertThat.m in Sources */, + 34E805EFA72682AB7C5B05EA9D0D307E /* HCBaseDescription.m in Sources */, + 346BBA5395BA3D644DEF2E11681BD1BC /* HCBaseMatcher.m in Sources */, + 78AB4554BB596F2459D8B27D5918F5AA /* HCBoolReturnGetter.m in Sources */, + 95573254BBB3F3D4E2E6FA9B15F4FE43 /* HCCharReturnGetter.m in Sources */, + C9BB324F47B4C930BBF9CB0AE644FC48 /* HCClassMatcher.m in Sources */, + 71B0FC0118CC4421904123A85E3E3D84 /* HCCollect.m in Sources */, + 19250D4658FAAE01098BF0F9D024408C /* HCConformsToProtocol.m in Sources */, + F1352F92DEA590ADAE9BBF0F2A5CC7C8 /* HCDescribedAs.m in Sources */, + 4F266690C5B9672CEEC4F08CE23DC76B /* HCDiagnosingMatcher.m in Sources */, + 8B52B5CA95BCCEA39331CE433225F40D /* HCDoubleReturnGetter.m in Sources */, + 79C7106C5B303A3FE86911820C4B7A17 /* HCEvery.m in Sources */, + 4FD71B974D5DB38E841A9B2130BD2031 /* HCFloatReturnGetter.m in Sources */, + A1AA7C5B623D7A3D14CA3585B5E6F74F /* HCGenericTestFailureReporter.m in Sources */, + EAFE52965E1EF4DAA297E1261C7B480D /* HCHasCount.m in Sources */, + BFF10FAE3F49C56480BFA67CFC66EABF /* HCHasDescription.m in Sources */, + 6A394ACDD5098D71EB2E739A19144609 /* HCHasProperty.m in Sources */, + 1E72B91030D22AAC3BD87BB102494033 /* HCIntReturnGetter.m in Sources */, + C34E5BF7667891DA239A70241BB8787F /* HCInvocationMatcher.m in Sources */, + 8FE460FF81A85BADA777AE75F1DE8E05 /* HCIs.m in Sources */, + BF98850EEDD30F10D396408E3FF6DFBE /* HCIsAnything.m in Sources */, + C77002A345A31289F097C151DA56C730 /* HCIsCloseTo.m in Sources */, + 2C852CEA74C9330186E553DEBC7250E2 /* HCIsCollectionContaining.m in Sources */, + 0EF4B577B19F7EF7A4DAD254CB364CC5 /* HCIsCollectionContainingInAnyOrder.m in Sources */, + 26975DACB89D02E43C89CDFDE2538A19 /* HCIsCollectionContainingInOrder.m in Sources */, + FAEA2BCC1BDC2A2B0806F97A63909F33 /* HCIsCollectionContainingInRelativeOrder.m in Sources */, + 67C16B2404EE5CA49EEB4E4C65A48E9D /* HCIsCollectionOnlyContaining.m in Sources */, + B8D6D7BE7FED5F6877845BD90C43076D /* HCIsDictionaryContaining.m in Sources */, + E1F4E7F7F887CB99A05EDD12129D8D9B /* HCIsDictionaryContainingEntries.m in Sources */, + 75CA58A6B185B7BD441882BB94F156E4 /* HCIsDictionaryContainingKey.m in Sources */, + 740AE91269EDAC807DDA6CF8A75B6E34 /* HCIsDictionaryContainingValue.m in Sources */, + 3D73D3DBF73BE2556CE0505E138D52E8 /* HCIsEmptyCollection.m in Sources */, + DE278B7AC58162F003E444BB690988CB /* HCIsEqual.m in Sources */, + F40A8A074A38D117C9A4E83AAF000B40 /* HCIsEqualCompressingWhiteSpace.m in Sources */, + 24ED8A49EE0A0C6D20DD073E0834D9E3 /* HCIsEqualIgnoringCase.m in Sources */, + 322F2973A1EDE086B9DA59EF7446BF11 /* HCIsEqualToNumber.m in Sources */, + AD870B82A46051F18895EE2AAE014889 /* HCIsIn.m in Sources */, + 0B5B334011EF1B488EA03CC79A618C17 /* HCIsInstanceOf.m in Sources */, + D1F28DE86CDC94309235FD1AA73C7026 /* HCIsNil.m in Sources */, + 16036080395AA27596094E1032E833C0 /* HCIsNot.m in Sources */, + 33152241D7378A62B68AEC4CF718B46B /* HCIsSame.m in Sources */, + BCACF1A26BCDC7D9FE727E515A207DE3 /* HCIsTrueFalse.m in Sources */, + DBF4C50D2B9794519E461D5511116F59 /* HCIsTypeOf.m in Sources */, + 598FBA999C9B6D901424C568FEA6DE23 /* HCLongLongReturnGetter.m in Sources */, + 3DADAAD7FB2C71B7DD6ED54A274EA581 /* HCLongReturnGetter.m in Sources */, + CD4338E07BB253356EE153E9EB4B11BC /* HCNumberAssert.m in Sources */, + 78E82F408FF82023E7F8B190D7E01B38 /* HCObjectReturnGetter.m in Sources */, + 1ADE23BEA27AA947A3B33FD6BDE3799A /* HCOrderingComparison.m in Sources */, + D1E90544DD7596099F934505B7CD971A /* HCRequireNonNilObject.m in Sources */, + C95CB935F3653CE08A4DAE8C41A7B1DF /* HCReturnTypeHandlerChain.m in Sources */, + 041B3B24700B7D7C26DB68E5DE980BA6 /* HCReturnValueGetter.m in Sources */, + C26339769DE6B70C8F36108FA9E82EC4 /* HCRunloopRunner.m in Sources */, + 5FD39A4832484B83B5CD465CA311F8F9 /* HCSenTestFailureReporter.m in Sources */, + ABF3C3C5DC65CB7D23707D489919F133 /* HCShortReturnGetter.m in Sources */, + 391ECA650097E58277098CDA7BC10BC2 /* HCStringContains.m in Sources */, + 1419344017A2CF917B2C4CB1AF57468C /* HCStringContainsInOrder.m in Sources */, + 1C1CA4744E2842E1EDEAA3C5C9BCAAF3 /* HCStringDescription.m in Sources */, + ACD0EBBBCB3430BDB1465F673496A390 /* HCStringEndsWith.m in Sources */, + FC596A849369029B0E4387C8411481C8 /* HCStringStartsWith.m in Sources */, + ABF75AB1EC0FBCA7558EBA622DE136B0 /* HCSubstringMatcher.m in Sources */, + 000D6AE9D229BC3F590DD0ADB1980D7A /* HCTestFailure.m in Sources */, + D51C0CD5CDBFD8B3F0FE1427AFE9A8DF /* HCTestFailureReporter.m in Sources */, + 10184F01D9DC99F32C4385D01B3D3A15 /* HCTestFailureReporterChain.m in Sources */, + 43167D2EC4F181461BD3AF7EA6E131D7 /* HCThrowsException.m in Sources */, + 26381969909F3D73632939D66F249DA2 /* HCUnsignedCharReturnGetter.m in Sources */, + 16E12F7DED167D441BFFFC1B002F15C4 /* HCUnsignedIntReturnGetter.m in Sources */, + B0CFB88146703B3B2AD0D1FBC0377903 /* HCUnsignedLongLongReturnGetter.m in Sources */, + 274B39E65659441AE99814A8405EABDE /* HCUnsignedLongReturnGetter.m in Sources */, + B243AB06E1F2507AA0F484FC1DDAA194 /* HCUnsignedShortReturnGetter.m in Sources */, + 16574C1CE1FF653DFC10700594AFF3AD /* HCWrapInMatcher.m in Sources */, + D66668C8D4B46716C04A9FCAC4A1E86B /* HCXCTestFailureReporter.m in Sources */, + 2A35381F01D76BF3AF0DC617B447E90E /* NSInvocation+OCHamcrest.m in Sources */, + E089B9D3659EC84826CD3C10C3C27723 /* OCHamcrest-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9FB2D7E6778BC86B3685E0A6F4E19AAD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AA0C9F2458A7AD9F0F7B7EABA4BEEAD2 /* Pods-MonsterCards-MonsterCardsUITests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A8049938B768EAD29F8D2CF76D805212 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5AF7CA09EB576EA2A19C9E31D9381828 /* MKT_TPDWeakProxy.m in Sources */, + 5AA2FA9999F045EDFDADD750A6DB65B0 /* MKTArgumentGetter.m in Sources */, + 2911C262344AD0563321F5AC71474213 /* MKTArgumentGetterChain.m in Sources */, + 11149CCB2A9A50704E02070CF5756C04 /* MKTAtLeastNumberOfInvocationsChecker.m in Sources */, + 796CFF523641A040AFD811530127E85F /* MKTAtLeastTimes.m in Sources */, + AA0F8C396A110A865044DEBD99EE9FDF /* MKTAtMostNumberOfInvocationsChecker.m in Sources */, + 1E3F280A971FBD6A9CAF3A15143EE6E7 /* MKTAtMostTimes.m in Sources */, + 90D4C852C5C3D549F368BE9DA573D875 /* MKTBaseMockObject.m in Sources */, + 5C77C6E837AAF1167CE4356F5471BAF5 /* MKTBoolArgumentGetter.m in Sources */, + 4DDDD7D819B2FD6A26E6347987792F13 /* MKTBoolReturnSetter.m in Sources */, + 4634AC3EE7CAC64A0EE9997413A63DDC /* MKTCallStackElement.m in Sources */, + 2B91F5CC95A53EA986042D1BD3D53185 /* MKTCharArgumentGetter.m in Sources */, + 1D1548B8F214EA762EB426CB349AEEFC /* MKTCharReturnSetter.m in Sources */, + 1E546795686D6FA2194E6DC1FD6C15E4 /* MKTClassArgumentGetter.m in Sources */, + 1C09FD0BF350C2FD844880797FF6CE6C /* MKTClassObjectMock.m in Sources */, + 67347AAF7D2BCE70198A1D8540790A21 /* MKTClassReturnSetter.m in Sources */, + FE82EE9AC3F568191FE2FB991F41331E /* MKTDoubleArgumentGetter.m in Sources */, + D027A03F5B2A88D4A7EAB5101F7C1AD0 /* MKTDoubleReturnSetter.m in Sources */, + A5609BEC1DA5A7870598A8A41E9643CE /* MKTDynamicProperties.m in Sources */, + FD871B4FB63F541866CB0E383D51655F /* MKTExactTimes.m in Sources */, + 3E28F25F2E2DBCDF542F5FBA2EBD17A0 /* MKTExecutesBlock.m in Sources */, + E304846EEA81098F20D04EC84AFA503E /* MKTFilterCallStack.m in Sources */, + 8E3F963AC815855ECF84FFF841EF1289 /* MKTFloatArgumentGetter.m in Sources */, + 65396A0F5D3EF41C80038E877E53E767 /* MKTFloatReturnSetter.m in Sources */, + E082BEFB05F79CAC0A4821950E73F67F /* MKTIntArgumentGetter.m in Sources */, + DF4DA15A858088BFBF7523F33887F69E /* MKTIntReturnSetter.m in Sources */, + 392DAC72FAEDB310E13E68AC6AB36C90 /* MKTInvocation.m in Sources */, + ACC6DDE28E4F5D57D2095B246E14DAAB /* MKTInvocationContainer.m in Sources */, + D2BEB8CAE604F2D924B98FFFE8952295 /* MKTInvocationMatcher.m in Sources */, + 1D05F6683DED2C604FF00FAB992E111B /* MKTInvocationsChecker.m in Sources */, + E72FF673EE58D635D8E18BD7E4E543BB /* MKTLocation.m in Sources */, + A12EAC86AD08061397D637888623A105 /* MKTLongArgumentGetter.m in Sources */, + 88E2CED4CEF76CEC623CFE3B1EF18268 /* MKTLongLongArgumentGetter.m in Sources */, + 09DC129AD1DC0D71C6CB9AFCB0C9F41E /* MKTLongLongReturnSetter.m in Sources */, + F22429D68DDEE2184B0AEB98F40C8F63 /* MKTLongReturnSetter.m in Sources */, + F27FE51C4752E24304E8F42FE4993D1E /* MKTMatchingInvocationsFinder.m in Sources */, + 0890F81E354DFE1754875ED86A440E39 /* MKTMissingInvocationChecker.m in Sources */, + 6C116019E55219DE5A5E06B780D72787 /* MKTMockingProgress.m in Sources */, + 14DAC98DD61451E4A4A396D16DA8AACE /* MKTMockitoCore.m in Sources */, + 63F7E8A5FE8BF4EBE9B6DAD3E5FF3B13 /* MKTNumberOfInvocationsChecker.m in Sources */, + E2B41F7E69EB1AFB51F2DB6647A72EA2 /* MKTObjectAndProtocolMock.m in Sources */, + E01A3873A41D95F05C0B31BF6D30A7AF /* MKTObjectArgumentGetter.m in Sources */, + 53CAB1BD2AF24E54EB9BB7FEB0DE74EC /* MKTObjectMock.m in Sources */, + CD3E10B421D7BE2C05F304D642DC4945 /* MKTObjectReturnSetter.m in Sources */, + B83D883402AEC18120033F3404E353C6 /* MKTOngoingStubbing.m in Sources */, + BA54CDCB57402D73D5DA632D891BDAEC /* MKTParseCallStack.m in Sources */, + 72C2BE1059638420BA271DCEF5F530EC /* MKTPointerArgumentGetter.m in Sources */, + 07ECDC2719E67DD355FB0325627FA7DC /* MKTPrinter.m in Sources */, + F9AF6E11CD2CAA25EC4FBDF94DD8F2A4 /* MKTProtocolMock.m in Sources */, + C4DF90EB88F5CAE14EFB4D4FC5EA0FCF /* MKTReturnsValue.m in Sources */, + 5B61EF6263EF1665ACD489F89A32BA46 /* MKTReturnValueSetter.m in Sources */, + 3430EB598C0B5589772BE5A5E7C63910 /* MKTReturnValueSetterChain.m in Sources */, + C6FE9416C547905C1D957D6515FE4DE2 /* MKTSelectorArgumentGetter.m in Sources */, + 898C5E260B70246E2446BF9369B722AC /* MKTShortArgumentGetter.m in Sources */, + FD9BD470897D28963744F23F19EE31CF /* MKTShortReturnSetter.m in Sources */, + B9E9E4C4B2254C5D2BAE95A44BE6FFF5 /* MKTSingletonSwizzler.m in Sources */, + 68E1041F416D4DE86787EA149F83C307 /* MKTStructArgumentGetter.m in Sources */, + E346C33012EBC4D12329C42A4765A213 /* MKTStructReturnSetter.m in Sources */, + 8C6A9A1F74DFCF7A30DEBB9408E9D865 /* MKTStubbedInvocationMatcher.m in Sources */, + E52E8929EE9D34A76662F233E6ECFB0F /* MKTTestLocation.m in Sources */, + BE26604F948BA38EA039F4539132CFCF /* MKTThrowsException.m in Sources */, + 1ED6BADF11E390B9AC5D8D73DD887D60 /* MKTUnsignedCharArgumentGetter.m in Sources */, + 75ADB2384221380DD610C47F388A9DC0 /* MKTUnsignedCharReturnSetter.m in Sources */, + 2B28295A93B8A50D8D4388B396B3A90F /* MKTUnsignedIntArgumentGetter.m in Sources */, + 0C0B7EC23570E84975084D3CFA1B3BAD /* MKTUnsignedIntReturnSetter.m in Sources */, + 326797EE2A2C6B1F2E9A2653A634DC9F /* MKTUnsignedLongArgumentGetter.m in Sources */, + F9E1A871D3A2C5F571FFAB6EB7C74B72 /* MKTUnsignedLongLongArgumentGetter.m in Sources */, + BBB324A1EE3B5262044B8BF362371384 /* MKTUnsignedLongLongReturnSetter.m in Sources */, + 903CB755900E592163BBC79C1EA1B8AE /* MKTUnsignedLongReturnSetter.m in Sources */, + 93273382A3E4B53183466202E893BC13 /* MKTUnsignedShortArgumentGetter.m in Sources */, + B15A588C8E8BD49A101AE2EFA345B7F1 /* MKTUnsignedShortReturnSetter.m in Sources */, + B53A0BC7F7444A22094BDDDBCC5BD3F0 /* MKTVerificationData.m in Sources */, + 23B08FED481426587D18EAEB44B92E1A /* NSInvocation+OCMockito.m in Sources */, + 2E505965867024705AA426A062D7FF0A /* OCMockito-dummy.m in Sources */, + 80176F6E2E24FBAF29A8C55242D3C709 /* OCMockito.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E909C1C03D6980B700FEC1D2466D10AB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8C3907C34232366E1C68AF158E38E6FA /* Pods-MonsterCards-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0272773450678B680EA52EA3FBA32150 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Pods-MonsterCards"; + target = 6A406131E2AA05E2651ADFAF69491389 /* Pods-MonsterCards */; + targetProxy = 9F285A817613B5A578845AE89FF89FC6 /* PBXContainerItemProxy */; + }; + 19A8E5AD7B59BA7929A415B334F46BA2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = OCMockito; + target = AACA30CC7F0FBF6ECAE6A3C4719640F1 /* OCMockito */; + targetProxy = B5E11172E52A8768A65CC5BF84E18079 /* PBXContainerItemProxy */; + }; + 44C9612A96190417F63F8C2157FB517F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = OCHamcrest; + target = 8094467761B2E923813531849AE7B97A /* OCHamcrest */; + targetProxy = 66AE573E1C9F9BA80D87DF6912970F33 /* PBXContainerItemProxy */; + }; + 4F2975C8A0D3CFFB95FB27C3DC4AF6CB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = OCHamcrest; + target = 8094467761B2E923813531849AE7B97A /* OCHamcrest */; + targetProxy = 4DF46247F137333B9EE7BC1A5218905D /* PBXContainerItemProxy */; + }; + 71B9A2D742EA674DB8CFAB8FD0BB6E33 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = OCMockito; + target = AACA30CC7F0FBF6ECAE6A3C4719640F1 /* OCMockito */; + targetProxy = 1CF1631232C3163EA0BB2AE43FAAE62E /* PBXContainerItemProxy */; + }; + 9C267F9403445A3EED5BF258E07EA6B0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = OCHamcrest; + target = 8094467761B2E923813531849AE7B97A /* OCHamcrest */; + targetProxy = 4717827AB2FABA6AE183A8230B5D0B23 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 01A370C01345E07EC89979282AC5B29A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9F59F3F0434FEFBB4FDB037D8532C3BC /* OCHamcrest.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/OCHamcrest/OCHamcrest-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OCHamcrest/OCHamcrest-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/OCHamcrest/OCHamcrest.modulemap"; + PRODUCT_MODULE_NAME = OCHamcrest; + PRODUCT_NAME = OCHamcrest; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 099F164AF49EA9C7B6178529FB4C2EB4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 932AF46CFC7A3A6B937D8C0C19C499D3 /* Pods-MonsterCards.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-MonsterCards/Pods-MonsterCards-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MonsterCards/Pods-MonsterCards.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 1422B121EAEAEA11307496903FA623C6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + 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; + 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + 1A6826FC00BEC091A88C1C07DE5EBDC7 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F8F4AC31B4F530372255E84F8C2BF20A /* OCMockito.debug.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/OCMockito/OCMockito-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OCMockito/OCMockito-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/OCMockito/OCMockito.modulemap"; + PRODUCT_MODULE_NAME = OCMockito; + PRODUCT_NAME = OCMockito; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 1BB7D51183D845C04B1C0E2B48E21CB5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 056C81AEEE03ED285AA14C3491D257EE /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 2C132306BC1BEA59BCBF7B3FFBE4D2F7 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1AAE1A2BD70149D0C19447ACC7945148 /* Pods-MonsterCardsTests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 3A1C92C5ADE1046E3639BC72DCF5D899 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7728EFFA552082A9DCB502FB2286C937 /* OCHamcrest.debug.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/OCHamcrest/OCHamcrest-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OCHamcrest/OCHamcrest-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/OCHamcrest/OCHamcrest.modulemap"; + PRODUCT_MODULE_NAME = OCHamcrest; + PRODUCT_NAME = OCHamcrest; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 6516700D290F68903F79EE9F5D4389BE /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 13CC220F804D92068162216E154A2C1F /* Pods-MonsterCardsTests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 6D840D34BDFA0B03FF8787F46BA34319 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 551352E39C1B8344F089D156430E9B13 /* Pods-MonsterCards.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-MonsterCards/Pods-MonsterCards-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MonsterCards/Pods-MonsterCards.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 7AAC7247414E7E13362E4FFD4B129160 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 484DD12B558ADD56C07E97EE1EF8F170 /* OCMockito.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/OCMockito/OCMockito-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OCMockito/OCMockito-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/OCMockito/OCMockito.modulemap"; + PRODUCT_MODULE_NAME = OCMockito; + PRODUCT_NAME = OCMockito; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + A37B0927906C7B59B68172AA4B999B58 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CB1A5CE204B393A0CA27985021AF714E /* Pods-MonsterCards-MonsterCardsUITests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + ED7888FA6713EABBF66D26A8003AD1CA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + 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; + 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 283B32CD6358D4F0AD65BD3EDA581DBD /* Build configuration list for PBXNativeTarget "Pods-MonsterCards" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D840D34BDFA0B03FF8787F46BA34319 /* Debug */, + 099F164AF49EA9C7B6178529FB4C2EB4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4435C1C1CE7F3DF37C4BB39C320929A8 /* Build configuration list for PBXNativeTarget "Pods-MonsterCards-MonsterCardsUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1BB7D51183D845C04B1C0E2B48E21CB5 /* Debug */, + A37B0927906C7B59B68172AA4B999B58 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + ED7888FA6713EABBF66D26A8003AD1CA /* Debug */, + 1422B121EAEAEA11307496903FA623C6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4CB375B6EBD2757FAB902EF80F432D2C /* Build configuration list for PBXNativeTarget "Pods-MonsterCardsTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6516700D290F68903F79EE9F5D4389BE /* Debug */, + 2C132306BC1BEA59BCBF7B3FFBE4D2F7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A2932B2C2D8516A2CD3F99539435AD23 /* Build configuration list for PBXNativeTarget "OCMockito" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1A6826FC00BEC091A88C1C07DE5EBDC7 /* Debug */, + 7AAC7247414E7E13362E4FFD4B129160 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C7C24E615FD1232819E0BDE08F7A9854 /* Build configuration list for PBXNativeTarget "OCHamcrest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3A1C92C5ADE1046E3639BC72DCF5D899 /* Debug */, + 01A370C01345E07EC89979282AC5B29A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; +} diff --git a/Pods/Target Support Files/OCHamcrest/OCHamcrest-Info.plist b/Pods/Target Support Files/OCHamcrest/OCHamcrest-Info.plist new file mode 100644 index 0000000..6c07493 --- /dev/null +++ b/Pods/Target Support Files/OCHamcrest/OCHamcrest-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 7.1.2 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/OCHamcrest/OCHamcrest-dummy.m b/Pods/Target Support Files/OCHamcrest/OCHamcrest-dummy.m new file mode 100644 index 0000000..a0a4cff --- /dev/null +++ b/Pods/Target Support Files/OCHamcrest/OCHamcrest-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_OCHamcrest : NSObject +@end +@implementation PodsDummy_OCHamcrest +@end diff --git a/Pods/Target Support Files/OCHamcrest/OCHamcrest-prefix.pch b/Pods/Target Support Files/OCHamcrest/OCHamcrest-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/OCHamcrest/OCHamcrest-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Pods/Target Support Files/OCHamcrest/OCHamcrest-umbrella.h b/Pods/Target Support Files/OCHamcrest/OCHamcrest-umbrella.h new file mode 100644 index 0000000..fb8b88d --- /dev/null +++ b/Pods/Target Support Files/OCHamcrest/OCHamcrest-umbrella.h @@ -0,0 +1,74 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "OCHamcrest.h" +#import "HCAssertThat.h" +#import "HCBaseDescription.h" +#import "HCBaseMatcher.h" +#import "HCDescription.h" +#import "HCDiagnosingMatcher.h" +#import "HCMatcher.h" +#import "HCSelfDescribing.h" +#import "HCStringDescription.h" +#import "HCCollect.h" +#import "HCInvocationMatcher.h" +#import "HCRequireNonNilObject.h" +#import "HCWrapInMatcher.h" +#import "HCTestFailure.h" +#import "HCTestFailureReporter.h" +#import "HCTestFailureReporterChain.h" +#import "HCEvery.h" +#import "HCHasCount.h" +#import "HCIsCollectionContaining.h" +#import "HCIsCollectionContainingInAnyOrder.h" +#import "HCIsCollectionContainingInOrder.h" +#import "HCIsCollectionContainingInRelativeOrder.h" +#import "HCIsCollectionOnlyContaining.h" +#import "HCIsDictionaryContaining.h" +#import "HCIsDictionaryContainingEntries.h" +#import "HCIsDictionaryContainingKey.h" +#import "HCIsDictionaryContainingValue.h" +#import "HCIsEmptyCollection.h" +#import "HCIsIn.h" +#import "HCDescribedAs.h" +#import "HCIs.h" +#import "HCAllOf.h" +#import "HCAnyOf.h" +#import "HCIsAnything.h" +#import "HCIsNot.h" +#import "HCIsCloseTo.h" +#import "HCIsEqualToNumber.h" +#import "HCIsTrueFalse.h" +#import "HCNumberAssert.h" +#import "HCOrderingComparison.h" +#import "HCArgumentCaptor.h" +#import "HCClassMatcher.h" +#import "HCConformsToProtocol.h" +#import "HCHasDescription.h" +#import "HCHasProperty.h" +#import "HCIsEqual.h" +#import "HCIsInstanceOf.h" +#import "HCIsNil.h" +#import "HCIsSame.h" +#import "HCIsTypeOf.h" +#import "HCThrowsException.h" +#import "HCIsEqualCompressingWhiteSpace.h" +#import "HCIsEqualIgnoringCase.h" +#import "HCStringContains.h" +#import "HCStringContainsInOrder.h" +#import "HCStringEndsWith.h" +#import "HCStringStartsWith.h" +#import "HCSubstringMatcher.h" + +FOUNDATION_EXPORT double OCHamcrestVersionNumber; +FOUNDATION_EXPORT const unsigned char OCHamcrestVersionString[]; + diff --git a/Pods/Target Support Files/OCHamcrest/OCHamcrest.debug.xcconfig b/Pods/Target Support Files/OCHamcrest/OCHamcrest.debug.xcconfig new file mode 100644 index 0000000..bc496b6 --- /dev/null +++ b/Pods/Target Support Files/OCHamcrest/OCHamcrest.debug.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/OCHamcrest +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/OCHamcrest/OCHamcrest.modulemap b/Pods/Target Support Files/OCHamcrest/OCHamcrest.modulemap new file mode 100644 index 0000000..eabbec2 --- /dev/null +++ b/Pods/Target Support Files/OCHamcrest/OCHamcrest.modulemap @@ -0,0 +1,6 @@ +framework module OCHamcrest { + umbrella header "OCHamcrest-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/OCHamcrest/OCHamcrest.release.xcconfig b/Pods/Target Support Files/OCHamcrest/OCHamcrest.release.xcconfig new file mode 100644 index 0000000..bc496b6 --- /dev/null +++ b/Pods/Target Support Files/OCHamcrest/OCHamcrest.release.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/OCHamcrest +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/OCMockito/OCMockito-Info.plist b/Pods/Target Support Files/OCMockito/OCMockito-Info.plist new file mode 100644 index 0000000..2373fda --- /dev/null +++ b/Pods/Target Support Files/OCMockito/OCMockito-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 5.1.3 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/OCMockito/OCMockito-dummy.m b/Pods/Target Support Files/OCMockito/OCMockito-dummy.m new file mode 100644 index 0000000..4b81a4b --- /dev/null +++ b/Pods/Target Support Files/OCMockito/OCMockito-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_OCMockito : NSObject +@end +@implementation PodsDummy_OCMockito +@end diff --git a/Pods/Target Support Files/OCMockito/OCMockito-prefix.pch b/Pods/Target Support Files/OCMockito/OCMockito-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/OCMockito/OCMockito-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Pods/Target Support Files/OCMockito/OCMockito-umbrella.h b/Pods/Target Support Files/OCMockito/OCMockito-umbrella.h new file mode 100644 index 0000000..6a83454 --- /dev/null +++ b/Pods/Target Support Files/OCMockito/OCMockito-umbrella.h @@ -0,0 +1,25 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "MKTNonObjectArgumentMatching.h" +#import "OCMockito.h" +#import "NSInvocation+OCMockito.h" +#import "MKTBaseMockObject.h" +#import "MKTClassObjectMock.h" +#import "MKTObjectAndProtocolMock.h" +#import "MKTObjectMock.h" +#import "MKTProtocolMock.h" +#import "MKTOngoingStubbing.h" + +FOUNDATION_EXPORT double OCMockitoVersionNumber; +FOUNDATION_EXPORT const unsigned char OCMockitoVersionString[]; + diff --git a/Pods/Target Support Files/OCMockito/OCMockito.debug.xcconfig b/Pods/Target Support Files/OCMockito/OCMockito.debug.xcconfig new file mode 100644 index 0000000..04d6db8 --- /dev/null +++ b/Pods/Target Support Files/OCMockito/OCMockito.debug.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/OCMockito +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/OCMockito +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/OCMockito/OCMockito.modulemap b/Pods/Target Support Files/OCMockito/OCMockito.modulemap new file mode 100644 index 0000000..5292940 --- /dev/null +++ b/Pods/Target Support Files/OCMockito/OCMockito.modulemap @@ -0,0 +1,6 @@ +framework module OCMockito { + umbrella header "OCMockito-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/OCMockito/OCMockito.release.xcconfig b/Pods/Target Support Files/OCMockito/OCMockito.release.xcconfig new file mode 100644 index 0000000..04d6db8 --- /dev/null +++ b/Pods/Target Support Files/OCMockito/OCMockito.release.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/OCMockito +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/OCMockito +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-Info.plist b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-acknowledgements.markdown b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-acknowledgements.markdown new file mode 100644 index 0000000..103c0b1 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-acknowledgements.markdown @@ -0,0 +1,59 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## OCHamcrest + +OCHamcrest by Jon Reid, https://qualitycoding.org/ +Copyright 2019 hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +(BSD License) + + +## OCMockito + +OCMockito by Jon Reid, https://qualitycoding.org/ +Copyright 2020 Quality Coding, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +(MIT License) + +----- + +TPDWeakProxy: + +The MIT License (MIT) + +Copyright © 2013 Tetherpad + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-acknowledgements.plist b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-acknowledgements.plist new file mode 100644 index 0000000..1bd2056 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-acknowledgements.plist @@ -0,0 +1,97 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + OCHamcrest by Jon Reid, https://qualitycoding.org/ +Copyright 2019 hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +(BSD License) + + License + BSD + Title + OCHamcrest + Type + PSGroupSpecifier + + + FooterText + OCMockito by Jon Reid, https://qualitycoding.org/ +Copyright 2020 Quality Coding, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +(MIT License) + +----- + +TPDWeakProxy: + +The MIT License (MIT) + +Copyright © 2013 Tetherpad + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + License + MIT + Title + OCMockito + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-dummy.m b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-dummy.m new file mode 100644 index 0000000..e24176d --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_MonsterCards_MonsterCardsUITests : NSObject +@end +@implementation PodsDummy_Pods_MonsterCards_MonsterCardsUITests +@end diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Debug-input-files.xcfilelist b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Debug-input-files.xcfilelist new file mode 100644 index 0000000..a1508a7 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Debug-input-files.xcfilelist @@ -0,0 +1,3 @@ +${PODS_ROOT}/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks.sh +${BUILT_PRODUCTS_DIR}/OCHamcrest/OCHamcrest.framework +${BUILT_PRODUCTS_DIR}/OCMockito/OCMockito.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Debug-output-files.xcfilelist b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Debug-output-files.xcfilelist new file mode 100644 index 0000000..e5a4ee9 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Debug-output-files.xcfilelist @@ -0,0 +1,2 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCHamcrest.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMockito.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Release-input-files.xcfilelist b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Release-input-files.xcfilelist new file mode 100644 index 0000000..a1508a7 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Release-input-files.xcfilelist @@ -0,0 +1,3 @@ +${PODS_ROOT}/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks.sh +${BUILT_PRODUCTS_DIR}/OCHamcrest/OCHamcrest.framework +${BUILT_PRODUCTS_DIR}/OCMockito/OCMockito.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Release-output-files.xcfilelist b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Release-output-files.xcfilelist new file mode 100644 index 0000000..e5a4ee9 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks-Release-output-files.xcfilelist @@ -0,0 +1,2 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCHamcrest.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMockito.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks.sh b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks.sh new file mode 100755 index 0000000..45d70e5 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-frameworks.sh @@ -0,0 +1,209 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +function on_error { + echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" +} +trap 'on_error $LINENO' ERR + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + elif [ -L "${binary}" ]; then + echo "Destination binary is symlinked..." + dirname="$(dirname "${binary}")" + binary="${dirname}/$(readlink "${binary}")" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + warn_missing_arch=${2:-true} + if [ -r "$source" ]; then + # Copy the dSYM into the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .dSYM "$source")" + binary_name="$(ls "$source/Contents/Resources/DWARF")" + binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then + strip_invalid_archs "$binary" "$warn_missing_arch" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" + fi + fi +} + +# Copies the bcsymbolmap files of a vendored framework +install_bcsymbolmap() { + local bcsymbolmap_path="$1" + local destination="${BUILT_PRODUCTS_DIR}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identity + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + warn_missing_arch=${2:-true} + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + if [[ "$warn_missing_arch" == "true" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + fi + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + +install_artifact() { + artifact="$1" + base="$(basename "$artifact")" + case $base in + *.framework) + install_framework "$artifact" + ;; + *.dSYM) + # Suppress arch warnings since XCFrameworks will include many dSYM files + install_dsym "$artifact" "false" + ;; + *.bcsymbolmap) + install_bcsymbolmap "$artifact" + ;; + *) + echo "error: Unrecognized artifact "$artifact"" + ;; + esac +} + +copy_artifacts() { + file_list="$1" + while read artifact; do + install_artifact "$artifact" + done <$file_list +} + +ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt" +if [ -r "${ARTIFACT_LIST_FILE}" ]; then + copy_artifacts "${ARTIFACT_LIST_FILE}" +fi + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/OCHamcrest/OCHamcrest.framework" + install_framework "${BUILT_PRODUCTS_DIR}/OCMockito/OCMockito.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/OCHamcrest/OCHamcrest.framework" + install_framework "${BUILT_PRODUCTS_DIR}/OCMockito/OCMockito.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-umbrella.h b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-umbrella.h new file mode 100644 index 0000000..7534145 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_MonsterCards_MonsterCardsUITestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_MonsterCards_MonsterCardsUITestsVersionString[]; + diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig new file mode 100644 index 0000000..6031218 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig @@ -0,0 +1,10 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest" "${PODS_CONFIGURATION_BUILD_DIR}/OCMockito" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest/OCHamcrest.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/OCMockito/OCMockito.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -framework "OCHamcrest" -framework "OCMockito" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.modulemap b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.modulemap new file mode 100644 index 0000000..98a5bc0 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_MonsterCards_MonsterCardsUITests { + umbrella header "Pods-MonsterCards-MonsterCardsUITests-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.release.xcconfig b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.release.xcconfig new file mode 100644 index 0000000..6031218 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.release.xcconfig @@ -0,0 +1,10 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest" "${PODS_CONFIGURATION_BUILD_DIR}/OCMockito" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest/OCHamcrest.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/OCMockito/OCMockito.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -framework "OCHamcrest" -framework "OCMockito" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-Info.plist b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-acknowledgements.markdown b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-acknowledgements.markdown new file mode 100644 index 0000000..102af75 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-acknowledgements.plist b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-acknowledgements.plist new file mode 100644 index 0000000..7acbad1 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-dummy.m b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-dummy.m new file mode 100644 index 0000000..f94ae0d --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_MonsterCards : NSObject +@end +@implementation PodsDummy_Pods_MonsterCards +@end diff --git a/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-umbrella.h b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-umbrella.h new file mode 100644 index 0000000..ec29624 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_MonsterCardsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_MonsterCardsVersionString[]; + diff --git a/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.debug.xcconfig b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.debug.xcconfig new file mode 100644 index 0000000..b52088a --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.debug.xcconfig @@ -0,0 +1,6 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.modulemap b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.modulemap new file mode 100644 index 0000000..d89b3a1 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.modulemap @@ -0,0 +1,6 @@ +framework module Pods_MonsterCards { + umbrella header "Pods-MonsterCards-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.release.xcconfig b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.release.xcconfig new file mode 100644 index 0000000..b52088a --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCards/Pods-MonsterCards.release.xcconfig @@ -0,0 +1,6 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-Info.plist b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-acknowledgements.markdown b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-acknowledgements.markdown new file mode 100644 index 0000000..103c0b1 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-acknowledgements.markdown @@ -0,0 +1,59 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## OCHamcrest + +OCHamcrest by Jon Reid, https://qualitycoding.org/ +Copyright 2019 hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +(BSD License) + + +## OCMockito + +OCMockito by Jon Reid, https://qualitycoding.org/ +Copyright 2020 Quality Coding, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +(MIT License) + +----- + +TPDWeakProxy: + +The MIT License (MIT) + +Copyright © 2013 Tetherpad + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-acknowledgements.plist b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-acknowledgements.plist new file mode 100644 index 0000000..1bd2056 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-acknowledgements.plist @@ -0,0 +1,97 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + OCHamcrest by Jon Reid, https://qualitycoding.org/ +Copyright 2019 hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +(BSD License) + + License + BSD + Title + OCHamcrest + Type + PSGroupSpecifier + + + FooterText + OCMockito by Jon Reid, https://qualitycoding.org/ +Copyright 2020 Quality Coding, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +(MIT License) + +----- + +TPDWeakProxy: + +The MIT License (MIT) + +Copyright © 2013 Tetherpad + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + License + MIT + Title + OCMockito + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-dummy.m b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-dummy.m new file mode 100644 index 0000000..490d9d2 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_MonsterCardsTests : NSObject +@end +@implementation PodsDummy_Pods_MonsterCardsTests +@end diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Debug-input-files.xcfilelist b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Debug-input-files.xcfilelist new file mode 100644 index 0000000..550ab15 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Debug-input-files.xcfilelist @@ -0,0 +1,3 @@ +${PODS_ROOT}/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks.sh +${BUILT_PRODUCTS_DIR}/OCHamcrest/OCHamcrest.framework +${BUILT_PRODUCTS_DIR}/OCMockito/OCMockito.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Debug-output-files.xcfilelist b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Debug-output-files.xcfilelist new file mode 100644 index 0000000..e5a4ee9 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Debug-output-files.xcfilelist @@ -0,0 +1,2 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCHamcrest.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMockito.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Release-input-files.xcfilelist b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Release-input-files.xcfilelist new file mode 100644 index 0000000..550ab15 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Release-input-files.xcfilelist @@ -0,0 +1,3 @@ +${PODS_ROOT}/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks.sh +${BUILT_PRODUCTS_DIR}/OCHamcrest/OCHamcrest.framework +${BUILT_PRODUCTS_DIR}/OCMockito/OCMockito.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Release-output-files.xcfilelist b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Release-output-files.xcfilelist new file mode 100644 index 0000000..e5a4ee9 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks-Release-output-files.xcfilelist @@ -0,0 +1,2 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCHamcrest.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMockito.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks.sh b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks.sh new file mode 100755 index 0000000..45d70e5 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-frameworks.sh @@ -0,0 +1,209 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +function on_error { + echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" +} +trap 'on_error $LINENO' ERR + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + elif [ -L "${binary}" ]; then + echo "Destination binary is symlinked..." + dirname="$(dirname "${binary}")" + binary="${dirname}/$(readlink "${binary}")" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + warn_missing_arch=${2:-true} + if [ -r "$source" ]; then + # Copy the dSYM into the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .dSYM "$source")" + binary_name="$(ls "$source/Contents/Resources/DWARF")" + binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then + strip_invalid_archs "$binary" "$warn_missing_arch" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" + fi + fi +} + +# Copies the bcsymbolmap files of a vendored framework +install_bcsymbolmap() { + local bcsymbolmap_path="$1" + local destination="${BUILT_PRODUCTS_DIR}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identity + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + warn_missing_arch=${2:-true} + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + if [[ "$warn_missing_arch" == "true" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + fi + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + +install_artifact() { + artifact="$1" + base="$(basename "$artifact")" + case $base in + *.framework) + install_framework "$artifact" + ;; + *.dSYM) + # Suppress arch warnings since XCFrameworks will include many dSYM files + install_dsym "$artifact" "false" + ;; + *.bcsymbolmap) + install_bcsymbolmap "$artifact" + ;; + *) + echo "error: Unrecognized artifact "$artifact"" + ;; + esac +} + +copy_artifacts() { + file_list="$1" + while read artifact; do + install_artifact "$artifact" + done <$file_list +} + +ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt" +if [ -r "${ARTIFACT_LIST_FILE}" ]; then + copy_artifacts "${ARTIFACT_LIST_FILE}" +fi + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/OCHamcrest/OCHamcrest.framework" + install_framework "${BUILT_PRODUCTS_DIR}/OCMockito/OCMockito.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/OCHamcrest/OCHamcrest.framework" + install_framework "${BUILT_PRODUCTS_DIR}/OCMockito/OCMockito.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-umbrella.h b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-umbrella.h new file mode 100644 index 0000000..537a1be --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_MonsterCardsTestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_MonsterCardsTestsVersionString[]; + diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.debug.xcconfig b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.debug.xcconfig new file mode 100644 index 0000000..6031218 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.debug.xcconfig @@ -0,0 +1,10 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest" "${PODS_CONFIGURATION_BUILD_DIR}/OCMockito" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest/OCHamcrest.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/OCMockito/OCMockito.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -framework "OCHamcrest" -framework "OCMockito" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.modulemap b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.modulemap new file mode 100644 index 0000000..e6243f0 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_MonsterCardsTests { + umbrella header "Pods-MonsterCardsTests-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.release.xcconfig b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.release.xcconfig new file mode 100644 index 0000000..6031218 --- /dev/null +++ b/Pods/Target Support Files/Pods-MonsterCardsTests/Pods-MonsterCardsTests.release.xcconfig @@ -0,0 +1,10 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest" "${PODS_CONFIGURATION_BUILD_DIR}/OCMockito" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/OCHamcrest/OCHamcrest.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/OCMockito/OCMockito.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -framework "OCHamcrest" -framework "OCMockito" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES From d6f12b302a609f1d2a9352630f8f366c3da64dfc Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 5 Sep 2020 23:25:40 -0700 Subject: [PATCH 021/195] Fixes default initializer of Skill model. Adds tests for Skill model. --- MonsterCards.xcodeproj/project.pbxproj | 4 + MonsterCards/Models/Skill.m | 13 ++- MonsterCardsTests/Models/SkillTests.m | 106 +++++++++++++++++++++++++ 3 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 MonsterCardsTests/Models/SkillTests.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 75325fe..a256839 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -23,6 +23,7 @@ E25BD60125036BF8007B04EF /* Language.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60025036BF8007B04EF /* Language.m */; }; E25BD60425036CF0007B04EF /* Ability.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60325036CF0007B04EF /* Ability.m */; }; E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; }; + E2ECA8F32504AC3300C1FFA5 /* SkillTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */; }; E2F7247525005E89007D87ED /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247425005E89007D87ED /* AppDelegate.m */; }; E2F7247825005E89007D87ED /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247725005E89007D87ED /* SceneDelegate.m */; }; E2F7248125005E89007D87ED /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2F7247F25005E89007D87ED /* Main.storyboard */; }; @@ -91,6 +92,7 @@ E25BD60525036CFA007B04EF /* Action.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Action.h; sourceTree = ""; }; E25BD60625036CFA007B04EF /* Action.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Action.m; sourceTree = ""; }; E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; sourceTree = ""; }; + E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SkillTests.m; sourceTree = ""; }; E2F7247025005E89007D87ED /* Monster Cards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Monster Cards.app"; sourceTree = BUILT_PRODUCTS_DIR; }; E2F7247325005E89007D87ED /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; E2F7247425005E89007D87ED /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -283,6 +285,7 @@ E2FD91E72504832A00D5E935 /* DamageTypeTests.m */, E2FD91E9250493C000D5E935 /* LanguageTests.m */, E2FD91EB250496B000D5E935 /* SavingThrowTests.m */, + E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */, ); path = Models; sourceTree = ""; @@ -553,6 +556,7 @@ E2FD91E82504832A00D5E935 /* DamageTypeTests.m in Sources */, E2FD91EC250496B000D5E935 /* SavingThrowTests.m in Sources */, E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */, + E2ECA8F32504AC3300C1FFA5 /* SkillTests.m in Sources */, E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */, E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */, ); diff --git a/MonsterCards/Models/Skill.m b/MonsterCards/Models/Skill.m index 73c1b51..a7eb595 100644 --- a/MonsterCards/Models/Skill.m +++ b/MonsterCards/Models/Skill.m @@ -10,6 +10,16 @@ @implementation Skill +-(id)init { + self = [super init]; + + self.name = @""; + self.abilityScoreName = @""; + self.notes = @""; + + return self; +} + -(id)initWithName: (NSString*)name abilityScoreName:(NSString*)abilityScoreName andNotes:(NSString*)notes{ self = [super init]; @@ -33,7 +43,8 @@ -(NSString*)textForMonster: (Monster*)monster { int bonus = [self skillBonusForMonster:monster]; - return [NSString stringWithFormat:@"%@%@ %d", [self.name substringToIndex:1], [self.name substringFromIndex:1], bonus]; +// [self.name localizedUppercaseString] + return [NSString stringWithFormat:@"%@%@ %d", [[self.name substringToIndex:1] localizedUppercaseString], [self.name substringFromIndex:1], bonus]; } @end diff --git a/MonsterCardsTests/Models/SkillTests.m b/MonsterCardsTests/Models/SkillTests.m new file mode 100644 index 0000000..a1975ad --- /dev/null +++ b/MonsterCardsTests/Models/SkillTests.m @@ -0,0 +1,106 @@ +// +// SkillTests.m +// MonsterCardsTests +// +// Created by Tom Hicks on 9/5/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +@import OCMockito; +@import OCHamcrest; +#import "Skill.h" + +@interface SkillTests : XCTestCase + +@end + +@implementation SkillTests { + Skill *_skill; + NSString *_name; + NSString *_abilityScoreName; + NSString *_notes; +} + +- (void)setUp { + _skill = [[Skill alloc] init]; + _name = @"pranking"; + _abilityScoreName = @"str"; + _notes = @"some notes"; +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testDefaultInitializer { + XCTAssertNotNil(_skill); + XCTAssertEqualObjects(@"", _skill.name); + XCTAssertEqualObjects(@"", _skill.abilityScoreName); + XCTAssertEqualObjects(@"", _skill.notes); +} + +- (void)testInitWithNameAbilityScoreNameAndNotes { + _skill = [[Skill alloc] initWithName:_name abilityScoreName:_abilityScoreName andNotes:_notes]; + XCTAssertNotNil(_skill); + XCTAssertEqualObjects(_name, _skill.name); + XCTAssertEqualObjects(_abilityScoreName, _skill.abilityScoreName); + XCTAssertEqualObjects(_notes, _skill.notes); +} + +- (void)testNameGetterAndSetter { + _skill.name = _name; + XCTAssertEqualObjects(_name, _skill.name); +} + +- (void)testAbilityScoreNameGetterAndSetter { + _skill.abilityScoreName = _abilityScoreName; + XCTAssertEqualObjects(_abilityScoreName, _skill.abilityScoreName); +} + +- (void)testNotesGetterAndSetter { + _skill.notes = _notes; + XCTAssertEqualObjects(_notes, _skill.notes); +} + +- (void)testSkillBonusForMonster { + Monster *monster = mock([Monster class]); + [given([monster abilityModifierForAbilityScoreName:_abilityScoreName]) willReturnInt:1]; + stubProperty(monster, proficiencyBonus, @2); + + _skill = [[Skill alloc] initWithName:_name abilityScoreName:_abilityScoreName andNotes:_notes]; + + XCTAssertEqual(3, [_skill skillBonusForMonster:monster]); +} + +- (void)testSkillBonusForMonsterWithExpertise { + Monster *monster = mock([Monster class]); + [given([monster abilityModifierForAbilityScoreName:_abilityScoreName]) willReturnInt:1]; + stubProperty(monster, proficiencyBonus, @2); + + _skill = [[Skill alloc] initWithName:_name abilityScoreName:_abilityScoreName andNotes:@" (ex)"]; + + XCTAssertEqual(5, [_skill skillBonusForMonster:monster]); +} + +- (void)testTextForMonster { + Monster *monster = mock([Monster class]); + [given([monster abilityModifierForAbilityScoreName:_abilityScoreName]) willReturnInt:1]; + stubProperty(monster, proficiencyBonus, @2); + + _skill = [[Skill alloc] initWithName:_name abilityScoreName:_abilityScoreName andNotes:_notes]; + + XCTAssertEqualObjects(@"Pranking 3", [_skill textForMonster:monster]); +} + +- (void)testTextForMonsterWithExpertise { + Monster *monster = mock([Monster class]); + [given([monster abilityModifierForAbilityScoreName:_abilityScoreName]) willReturnInt:1]; + stubProperty(monster, proficiencyBonus, @2); + + _skill = [[Skill alloc] initWithName:_name abilityScoreName:_abilityScoreName andNotes:@" (ex)"]; + + XCTAssertEqualObjects(@"Pranking 5", [_skill textForMonster:monster]); +} + +@end From 757f0ded69faad70ab40ed6e92ab054942ffdb70 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 6 Sep 2020 12:24:30 -0700 Subject: [PATCH 022/195] Adds UITableView for search results. Adds constraints to search view. --- MonsterCards/Base.lproj/Main.storyboard | 63 ++++++++++++++++++++--- MonsterCards/Views/SearchViewController.h | 3 ++ MonsterCards/Views/SearchViewController.m | 1 + 3 files changed, 60 insertions(+), 7 deletions(-) diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 80435d2..5dceb75 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -35,20 +35,56 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -61,10 +97,13 @@ + + + - + @@ -77,10 +116,13 @@ + + + - + @@ -93,10 +135,13 @@ + + + - + @@ -108,12 +153,16 @@ + - + + + + diff --git a/MonsterCards/Views/SearchViewController.h b/MonsterCards/Views/SearchViewController.h index 8102ab3..b08c2dc 100644 --- a/MonsterCards/Views/SearchViewController.h +++ b/MonsterCards/Views/SearchViewController.h @@ -12,6 +12,9 @@ NS_ASSUME_NONNULL_BEGIN @interface SearchViewController : UIViewController +@property (weak, nonatomic) IBOutlet UISearchBar *searchBar; +@property (weak, nonatomic) IBOutlet UITableView *searchResults; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m index 79a2a5e..76d026e 100644 --- a/MonsterCards/Views/SearchViewController.m +++ b/MonsterCards/Views/SearchViewController.m @@ -7,6 +7,7 @@ // #import "SearchViewController.h" +#import "MonsterViewController.h" @interface SearchViewController () From 3db7334ba4b24248504edd2f461365c374734cf3 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 6 Sep 2020 13:05:14 -0700 Subject: [PATCH 023/195] Adds placeholder monsters to search view. Adds navigation from search view to monster detail view. --- MonsterCards.xcodeproj/project.pbxproj | 4 +++ MonsterCards/Base.lproj/Main.storyboard | 6 ++++ MonsterCards/Views/SearchViewController.m | 44 ++++++++++++++++++++++- 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index a256839..a5ca95b 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ E25BD60425036CF0007B04EF /* Ability.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60325036CF0007B04EF /* Ability.m */; }; E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; }; E2ECA8F32504AC3300C1FFA5 /* SkillTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */; }; + E2ECA8F52504BAAD00C1FFA5 /* MonsterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F42504BAAD00C1FFA5 /* MonsterTests.m */; }; E2F7247525005E89007D87ED /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247425005E89007D87ED /* AppDelegate.m */; }; E2F7247825005E89007D87ED /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247725005E89007D87ED /* SceneDelegate.m */; }; E2F7248125005E89007D87ED /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2F7247F25005E89007D87ED /* Main.storyboard */; }; @@ -93,6 +94,7 @@ E25BD60625036CFA007B04EF /* Action.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Action.m; sourceTree = ""; }; E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; sourceTree = ""; }; E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SkillTests.m; sourceTree = ""; }; + E2ECA8F42504BAAD00C1FFA5 /* MonsterTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonsterTests.m; sourceTree = ""; }; E2F7247025005E89007D87ED /* Monster Cards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Monster Cards.app"; sourceTree = BUILT_PRODUCTS_DIR; }; E2F7247325005E89007D87ED /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; E2F7247425005E89007D87ED /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -286,6 +288,7 @@ E2FD91E9250493C000D5E935 /* LanguageTests.m */, E2FD91EB250496B000D5E935 /* SavingThrowTests.m */, E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */, + E2ECA8F42504BAAD00C1FFA5 /* MonsterTests.m */, ); path = Models; sourceTree = ""; @@ -556,6 +559,7 @@ E2FD91E82504832A00D5E935 /* DamageTypeTests.m in Sources */, E2FD91EC250496B000D5E935 /* SavingThrowTests.m in Sources */, E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */, + E2ECA8F52504BAAD00C1FFA5 /* MonsterTests.m in Sources */, E2ECA8F32504AC3300C1FFA5 /* SkillTests.m in Sources */, E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */, E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */, diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 5dceb75..0dbcdb3 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -58,6 +58,10 @@ + + + + @@ -79,6 +83,8 @@ + + diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m index 76d026e..b01b929 100644 --- a/MonsterCards/Views/SearchViewController.m +++ b/MonsterCards/Views/SearchViewController.m @@ -8,15 +8,28 @@ #import "SearchViewController.h" #import "MonsterViewController.h" +#import "Monster.h" @interface SearchViewController () @end -@implementation SearchViewController +@implementation SearchViewController { + NSMutableArray *_monsters; +} - (void)viewDidLoad { [super viewDidLoad]; + _searchBar.text = @"Hello, World!"; + _monsters = [[NSMutableArray alloc] init]; + Monster *monster; + monster = [[Monster alloc] init]; + monster.name = @"Pixie"; + [_monsters addObject:monster]; + monster = [[Monster alloc] init]; + monster.name = @"Acolyte"; + [_monsters addObject:monster]; + // Do any additional setup after loading the view. } @@ -30,4 +43,33 @@ } */ +#pragma mark - UITableViewDataSource + +- (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { + return [_monsters count]; +} + +- (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + static NSString *simpleTableIdentifier = @"SimpleTableItem"; + + UITableViewCell *cell = [_searchResults dequeueReusableCellWithIdentifier:simpleTableIdentifier]; + + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier]; + } + + cell.textLabel.text = ((Monster*)[_monsters objectAtIndex:indexPath.row]).name; + + return cell; +} + +#pragma mark - UITableViewDelegate + +// Tap on table Row +- (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath { + + [self performSegueWithIdentifier:@"ShowMonsterDetail" sender:self]; +} + + @end From d338d42912174b3207615943e08a47f51744391c Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 6 Sep 2020 13:09:03 -0700 Subject: [PATCH 024/195] Adds name to monster detail view. Passes the selected monster from the search view to the monster detail view. --- MonsterCards/Base.lproj/Main.storyboard | 36 +++++++++++++--------- MonsterCards/Views/MonsterViewController.h | 5 +++ MonsterCards/Views/MonsterViewController.m | 1 + MonsterCards/Views/SearchViewController.m | 7 +++-- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 0dbcdb3..026f497 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -47,16 +47,6 @@ - - - - - - - - - - @@ -104,7 +94,7 @@ - + @@ -123,7 +113,7 @@ - + @@ -142,7 +132,7 @@ - + @@ -154,12 +144,28 @@ - + + + + + + + + + + + + @@ -167,7 +173,7 @@ - + diff --git a/MonsterCards/Views/MonsterViewController.h b/MonsterCards/Views/MonsterViewController.h index 837043c..33d6ca3 100644 --- a/MonsterCards/Views/MonsterViewController.h +++ b/MonsterCards/Views/MonsterViewController.h @@ -7,11 +7,16 @@ // #import +#import "Monster.h" NS_ASSUME_NONNULL_BEGIN @interface MonsterViewController : UIViewController +@property (weak, nonatomic) IBOutlet UILabel *monsterName; + +@property Monster* monster; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/MonsterViewController.m b/MonsterCards/Views/MonsterViewController.m index f6214bc..506395e 100644 --- a/MonsterCards/Views/MonsterViewController.m +++ b/MonsterCards/Views/MonsterViewController.m @@ -16,6 +16,7 @@ - (void)viewDidLoad { [super viewDidLoad]; + self.monsterName.text = _monster.name; // Do any additional setup after loading the view. } diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m index b01b929..2670fb2 100644 --- a/MonsterCards/Views/SearchViewController.m +++ b/MonsterCards/Views/SearchViewController.m @@ -33,15 +33,18 @@ // Do any additional setup after loading the view. } -/* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. + if ([@"ShowMonsterDetail" isEqualToString:segue.identifier]) { + NSIndexPath *indexPath = [self.searchResults indexPathForSelectedRow]; + MonsterViewController *vc = (MonsterViewController*)segue.destinationViewController; + vc.monster = [_monsters objectAtIndex:indexPath.row]; + } } -*/ #pragma mark - UITableViewDataSource From 0ff71193d6e3aa0d9e4c8df3f12482c3395fc057 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 6 Sep 2020 17:33:58 -0700 Subject: [PATCH 025/195] Adds name to Monster detail view. Adds json initializers for Monster. --- MonsterCards/Models/Monster.h | 3 +- MonsterCards/Models/Monster.m | 17 ++++++- MonsterCards/Views/SearchViewController.m | 3 +- MonsterCardsTests/Models/MonsterTests.m | 59 +++++++++++++++++++++++ 4 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 MonsterCardsTests/Models/MonsterTests.m diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index b07c7df..eb85bd3 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -64,7 +64,8 @@ NS_ASSUME_NONNULL_BEGIN +(int)abilityModifierForScore: (int)score; +(int)hitDieForSize: (NSString*)size; --(id)initWithJSON:(NSString*)jsonData; +-(id)initWithJSONString:(NSString*)jsonString; +-(id)initWithJSONData:(NSData*)jsonData; -(NSString*)meta; -(int)abilityScoreForAbilityScoreName: (NSString*)abilityScoreName; -(int)abilityModifierForAbilityScoreName: (NSString*)abilityScoreName; diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 13ae293..314ee9a 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -19,16 +19,31 @@ } -(id)init { + NSLog(@"TOM_init"); self = [super init]; + self.name = @""; // TODO: Actually initialize the class. return self; } --(id)initWithJSON: (NSString*)jsonData { +-(id)initWithJSONString: (NSString*)jsonString { + NSLog(@"TOM_initWithJSONString"); + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + + return [self initWithJSONData:jsonData]; +} + +-(id)initWithJSONData: (NSData*)jsonData { + NSLog(@"TOM_initWithJSONData"); self = [super init]; + NSDictionary *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; + + NSString *name = [jsonRoot objectForKey:@"name"]; + NSLog(@"decoded name is |%@|", name); + self.name = name;//[jsonRoot objectForKey:@"name"]; // TODO: Actually initialize the class. return self; diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m index 2670fb2..cbce95c 100644 --- a/MonsterCards/Views/SearchViewController.m +++ b/MonsterCards/Views/SearchViewController.m @@ -26,8 +26,7 @@ monster = [[Monster alloc] init]; monster.name = @"Pixie"; [_monsters addObject:monster]; - monster = [[Monster alloc] init]; - monster.name = @"Acolyte"; + monster = [[Monster alloc] initWithJSONString:@"{\"name\":\"Acolyte\"}"]; [_monsters addObject:monster]; // Do any additional setup after loading the view. diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m new file mode 100644 index 0000000..da8dcea --- /dev/null +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -0,0 +1,59 @@ +// +// MonsterTests.m +// MonsterCardsTests +// +// Created by Tom Hicks on 9/5/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +@import OCHamcrest; +@import OCMockito; +#import "Monster.h" + +@interface MonsterTests : XCTestCase + +@end + +@implementation MonsterTests { + Monster *_monster; + NSString *_jsonString; + NSData *_jsonData; +} + +- (void)setUp { + _monster = [[Monster alloc] init]; + _jsonString = @"{\"name\":\"Acolyte\"}"; + _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testDefaultInitializer { + XCTAssertNotNil(_monster); + XCTAssertEqualObjects(@"", _monster.name); +} + +- (void)testInitWithJSONString { + _monster = [[Monster alloc] initWithJSONString:_jsonString]; + + XCTAssertNotNil(_monster); + XCTAssertEqualObjects(@"Acolyte", _monster.name); +} + +- (void)testInitWithJSONData { + _monster = [[Monster alloc] initWithJSONData:_jsonData]; + + XCTAssertNotNil(_monster); + XCTAssertEqualObjects(@"Acolyte", _monster.name); +} + +- (void)testNameGetterAndSetter { + NSString *name = @"Pixie"; + _monster.name = name; + XCTAssertEqualObjects(name, _monster.name); +} + +@end From 48792ceebe14a2cb8858e0a5595d15cc22271cbf Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 6 Sep 2020 18:47:14 -0700 Subject: [PATCH 026/195] Removes default text in search bar. --- MonsterCards/Views/SearchViewController.m | 1 - 1 file changed, 1 deletion(-) diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m index cbce95c..4f75109 100644 --- a/MonsterCards/Views/SearchViewController.m +++ b/MonsterCards/Views/SearchViewController.m @@ -20,7 +20,6 @@ - (void)viewDidLoad { [super viewDidLoad]; - _searchBar.text = @"Hello, World!"; _monsters = [[NSMutableArray alloc] init]; Monster *monster; monster = [[Monster alloc] init]; From e18f44a1360410e2756aa49ae679f0fc5794511b Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Mon, 7 Sep 2020 16:26:51 -0700 Subject: [PATCH 027/195] Makes the search screen actually do searches. Makes the monster detail view set the title if there is no name label bound. --- MonsterCards/Base.lproj/Main.storyboard | 167 +++++++++------------ MonsterCards/Views/MonsterViewController.m | 17 +-- MonsterCards/Views/SearchViewController.h | 2 +- MonsterCards/Views/SearchViewController.m | 59 +++++--- 4 files changed, 117 insertions(+), 128 deletions(-) diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 026f497..b5e01e2 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -17,7 +17,7 @@ - + @@ -25,62 +25,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -93,13 +38,10 @@ - - - - + @@ -112,13 +54,10 @@ - - - - + @@ -131,50 +70,92 @@ - - - - + - + + - + - - - - - - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - diff --git a/MonsterCards/Views/MonsterViewController.m b/MonsterCards/Views/MonsterViewController.m index 506395e..55f341b 100644 --- a/MonsterCards/Views/MonsterViewController.m +++ b/MonsterCards/Views/MonsterViewController.m @@ -16,18 +16,11 @@ - (void)viewDidLoad { [super viewDidLoad]; - self.monsterName.text = _monster.name; - // Do any additional setup after loading the view. + if (self.monsterName != nil) { + self.monsterName.text = self.monster.name; + } else if (self.navigationItem != nil && self.navigationItem.title != nil) { + self.navigationItem.title = self.monster.name; + } } -/* -#pragma mark - Navigation - -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - @end diff --git a/MonsterCards/Views/SearchViewController.h b/MonsterCards/Views/SearchViewController.h index b08c2dc..a3fd563 100644 --- a/MonsterCards/Views/SearchViewController.h +++ b/MonsterCards/Views/SearchViewController.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SearchViewController : UIViewController +@interface SearchViewController : UITableViewController @property (weak, nonatomic) IBOutlet UISearchBar *searchBar; @property (weak, nonatomic) IBOutlet UITableView *searchResults; diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m index 4f75109..f434423 100644 --- a/MonsterCards/Views/SearchViewController.m +++ b/MonsterCards/Views/SearchViewController.m @@ -12,23 +12,19 @@ @interface SearchViewController () +@property NSArray* allMonsters; +@property NSArray* foundMonsters; + @end -@implementation SearchViewController { - NSMutableArray *_monsters; -} +@implementation SearchViewController - (void)viewDidLoad { [super viewDidLoad]; - _monsters = [[NSMutableArray alloc] init]; - Monster *monster; - monster = [[Monster alloc] init]; - monster.name = @"Pixie"; - [_monsters addObject:monster]; - monster = [[Monster alloc] initWithJSONString:@"{\"name\":\"Acolyte\"}"]; - [_monsters addObject:monster]; - - // Do any additional setup after loading the view. + Monster *pixie = [[Monster alloc] initWithJSONString:@"{\"name\":\"Pixie\"}"]; + Monster *acolyte = [[Monster alloc] initWithJSONString:@"{\"name\":\"Acolyte\"}"]; + self.allMonsters = [NSArray arrayWithObjects:acolyte, pixie, nil]; + self.foundMonsters= self.allMonsters; } #pragma mark - Navigation @@ -40,37 +36,56 @@ if ([@"ShowMonsterDetail" isEqualToString:segue.identifier]) { NSIndexPath *indexPath = [self.searchResults indexPathForSelectedRow]; MonsterViewController *vc = (MonsterViewController*)segue.destinationViewController; - vc.monster = [_monsters objectAtIndex:indexPath.row]; + vc.monster = [self.foundMonsters objectAtIndex:indexPath.row]; } } #pragma mark - UITableViewDataSource - (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { - return [_monsters count]; + return [self.foundMonsters count]; } - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { - static NSString *simpleTableIdentifier = @"SimpleTableItem"; + static NSString *simpleTableIdentifier = @"MonsterCell"; - UITableViewCell *cell = [_searchResults dequeueReusableCellWithIdentifier:simpleTableIdentifier]; + UITableViewCell *cell = [self.searchResults dequeueReusableCellWithIdentifier:simpleTableIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier]; } - cell.textLabel.text = ((Monster*)[_monsters objectAtIndex:indexPath.row]).name; + Monster *monster = (Monster*)[self.foundMonsters objectAtIndex:indexPath.row]; + + cell.textLabel.text = monster.name; return cell; } -#pragma mark - UITableViewDelegate +#pragma mark - UISearchBarDelegate -// Tap on table Row -- (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath { +- (void)searchBar:(UISearchBar *)searchBar + textDidChange:(NSString *)searchText { - [self performSegueWithIdentifier:@"ShowMonsterDetail" sender:self]; + if (searchText != nil && ![@"" isEqualToString:searchText]) { + NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(id item, NSDictionary *bindings) { + if (![item isKindOfClass:[Monster class]]) { + return false; + } + Monster *monster = (Monster*)item; + + if ([monster.name localizedCaseInsensitiveContainsString:searchText]) { + return true; + } + + return false; + }]; + self.foundMonsters = [self.allMonsters filteredArrayUsingPredicate:predicate]; + } else { + self.foundMonsters = self.allMonsters; + } + + [self.tableView reloadData]; } - @end From 437e18d2cc54fb00bfa0528fa8e28d1c7faaae05 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Mon, 7 Sep 2020 18:13:59 -0700 Subject: [PATCH 028/195] Droppes deployment target to iOS 13.0 --- MonsterCards.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index a5ca95b..b0a24ef 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -727,6 +727,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = J793L9LQJ2; INFOPLIST_FILE = MonsterCards/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -745,6 +746,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = J793L9LQJ2; INFOPLIST_FILE = MonsterCards/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", From 15a89785c6cac03214861075363d746c323a7904 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Mon, 7 Sep 2020 18:17:03 -0700 Subject: [PATCH 029/195] Removes some debug logging statements. --- MonsterCards/Models/Monster.m | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 314ee9a..fe05a49 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -19,32 +19,25 @@ } -(id)init { - NSLog(@"TOM_init"); self = [super init]; self.name = @""; - // TODO: Actually initialize the class. return self; } -(id)initWithJSONString: (NSString*)jsonString { - NSLog(@"TOM_initWithJSONString"); NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; return [self initWithJSONData:jsonData]; } -(id)initWithJSONData: (NSData*)jsonData { - NSLog(@"TOM_initWithJSONData"); self = [super init]; NSDictionary *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; - NSString *name = [jsonRoot objectForKey:@"name"]; - NSLog(@"decoded name is |%@|", name); - self.name = name;//[jsonRoot objectForKey:@"name"]; - // TODO: Actually initialize the class. + self.name = [jsonRoot objectForKey:@"name"]; return self; } From 327a640b83ed995f2e8f09024f6b985973a98025 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 11 Sep 2020 23:30:22 -0700 Subject: [PATCH 030/195] Adds copy constructor to Monster initWithMonster. --- MonsterCards/Models/Monster.h | 1 + MonsterCards/Models/Monster.m | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index eb85bd3..0a945b8 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -66,6 +66,7 @@ NS_ASSUME_NONNULL_BEGIN -(id)initWithJSONString:(NSString*)jsonString; -(id)initWithJSONData:(NSData*)jsonData; +-(id)initWithMonster:(Monster*)monster; -(NSString*)meta; -(int)abilityScoreForAbilityScoreName: (NSString*)abilityScoreName; -(int)abilityModifierForAbilityScoreName: (NSString*)abilityScoreName; diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index fe05a49..12db4fc 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -42,6 +42,18 @@ return self; } +-(id)initWithMonster:(Monster*)monster { + if (monster == nil) { + return [self init]; + } + + self = [super init]; + + self.name = monster.name; + + return self; +} + -(NSString*)meta { @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; } From 651a8e30d489910b9d0b6294465c037e7028e684 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 11 Sep 2020 23:39:50 -0700 Subject: [PATCH 031/195] Makes the library view display a list of monsters. Makes the library view ad search view share a view controller for their destination. --- MonsterCards.xcodeproj/project.pbxproj | 12 +-- MonsterCards/Base.lproj/Main.storyboard | 99 ++++++++++++++++++---- MonsterCards/Views/LibraryViewController.h | 4 +- MonsterCards/Views/LibraryViewController.m | 52 ++++++++++-- MonsterCards/Views/MonsterViewController.m | 25 +++++- MonsterCards/Views/SearchViewController.m | 9 +- 6 files changed, 165 insertions(+), 36 deletions(-) diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index b0a24ef..49c46b7 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -174,16 +174,16 @@ E20D032525031BA700FB6E43 /* Views */ = { isa = PBXGroup; children = ( - E20D032225031B9D00FB6E43 /* SearchViewController.h */, - E20D032325031B9D00FB6E43 /* SearchViewController.m */, - E20D032625031BDA00FB6E43 /* MonsterViewController.h */, - E20D032725031BDA00FB6E43 /* MonsterViewController.m */, - E20D032925031BE500FB6E43 /* LibraryViewController.h */, - E20D032A25031BE500FB6E43 /* LibraryViewController.m */, E20D032C25031BEF00FB6E43 /* CollectionsViewController.h */, E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */, E20D032F25031BFD00FB6E43 /* DashboardViewController.h */, E20D033025031BFD00FB6E43 /* DashboardViewController.m */, + E20D032925031BE500FB6E43 /* LibraryViewController.h */, + E20D032A25031BE500FB6E43 /* LibraryViewController.m */, + E20D032625031BDA00FB6E43 /* MonsterViewController.h */, + E20D032725031BDA00FB6E43 /* MonsterViewController.m */, + E20D032225031B9D00FB6E43 /* SearchViewController.h */, + E20D032325031B9D00FB6E43 /* SearchViewController.m */, ); path = Views; sourceTree = ""; diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index b5e01e2..5deec64 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -20,7 +20,7 @@ - + @@ -59,26 +59,9 @@ - - - - - - - - - - - - - - - - - @@ -88,6 +71,7 @@ + @@ -155,10 +139,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MonsterCards/Views/LibraryViewController.h b/MonsterCards/Views/LibraryViewController.h index aa2ac87..db4c945 100644 --- a/MonsterCards/Views/LibraryViewController.h +++ b/MonsterCards/Views/LibraryViewController.h @@ -10,7 +10,9 @@ NS_ASSUME_NONNULL_BEGIN -@interface LibraryViewController : UIViewController +@interface LibraryViewController : UITableViewController + +@property (strong, nonatomic) IBOutlet UITableView *monstersTable; @end diff --git a/MonsterCards/Views/LibraryViewController.m b/MonsterCards/Views/LibraryViewController.m index eac9069..c937145 100644 --- a/MonsterCards/Views/LibraryViewController.m +++ b/MonsterCards/Views/LibraryViewController.m @@ -7,26 +7,68 @@ // #import "LibraryViewController.h" +#import "Monster.h" +#import "MonsterViewController.h" @interface LibraryViewController () +@property NSArray* allMonsters; + @end @implementation LibraryViewController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view. + // Temporary setup of allMonsters until we bind to CoreData. + Monster *pixie = [[Monster alloc] initWithJSONString:@"{\"name\":\"Pixie\"}"]; + Monster *acolyte = [[Monster alloc] initWithJSONString:@"{\"name\":\"Acolyte\"}"]; + self.allMonsters = [NSArray arrayWithObjects:acolyte, pixie, nil]; +} + +- (void)viewWillAppear:(BOOL)animated { + // TODO: fetch monsters from CoreData + [self.monstersTable reloadData]; +} + +- (IBAction)addNewMonster:(id)sender { + Monster *monster = [[Monster alloc] init]; + monster.name = @"Unnamed Monster"; + self.allMonsters = [self.allMonsters arrayByAddingObject:monster]; + [self.monstersTable reloadData]; } -/* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. + if ([@"ShowMonsterDetail" isEqualToString:segue.identifier]) { + NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; + MonsterViewController *vc = (MonsterViewController*)segue.destinationViewController; + vc.monster = [self.allMonsters objectAtIndex:indexPath.row]; + } +} + +#pragma mark - UITableViewDataSource + +- (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { + return [self.allMonsters count]; +} + +- (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + static NSString *simpleTableIdentifier = @"MonsterCell"; + + UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier]; + + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier]; + } + + Monster *monster = (Monster*)[self.allMonsters objectAtIndex:indexPath.row]; + + cell.textLabel.text = monster.name; + + return cell; } -*/ @end diff --git a/MonsterCards/Views/MonsterViewController.m b/MonsterCards/Views/MonsterViewController.m index 55f341b..9344e92 100644 --- a/MonsterCards/Views/MonsterViewController.m +++ b/MonsterCards/Views/MonsterViewController.m @@ -18,9 +18,32 @@ [super viewDidLoad]; if (self.monsterName != nil) { self.monsterName.text = self.monster.name; - } else if (self.navigationItem != nil && self.navigationItem.title != nil) { + } else if (self.navigationItem != nil) { self.navigationItem.title = self.monster.name; } } +- (void)viewWillAppear:(BOOL)animated { + // TODO: get the latest version of this monster from CoreData + if (self.monsterName != nil) { + self.monsterName.text = self.monster.name; + } else if (self.navigationItem != nil) { + if (self.monster.name == nil) { + self.navigationItem.title = @"Unnamed Monster"; + } else { + self.navigationItem.title = self.monster.name; + } + } +} + +- (IBAction)unwindWithSegue:(UIStoryboardSegue *)unwindSegue { +// UIViewController *sourceViewController = unwindSegue.sourceViewController; + // Use data from the view controller which initiated the unwind segue +} + +#pragma mark - Navigation + +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { +} + @end diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m index f434423..5bcf8eb 100644 --- a/MonsterCards/Views/SearchViewController.m +++ b/MonsterCards/Views/SearchViewController.m @@ -29,14 +29,13 @@ #pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. if ([@"ShowMonsterDetail" isEqualToString:segue.identifier]) { NSIndexPath *indexPath = [self.searchResults indexPathForSelectedRow]; - MonsterViewController *vc = (MonsterViewController*)segue.destinationViewController; - vc.monster = [self.foundMonsters objectAtIndex:indexPath.row]; + if ([segue.destinationViewController isKindOfClass:[MonsterViewController class]]) { + MonsterViewController *vc = (MonsterViewController*)segue.destinationViewController; + vc.monster = [self.foundMonsters objectAtIndex:indexPath.row]; + } } } From 5f58e9e41d1aefd1eacf9b806efc63c1dc171f4f Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 00:07:33 -0700 Subject: [PATCH 032/195] Adds a monster edit view. --- MonsterCards.xcodeproj/project.pbxproj | 6 ++ MonsterCards/Base.lproj/Main.storyboard | 77 ++++++++++++++++++- .../Views/EditMonsterViewController.h | 21 +++++ .../Views/EditMonsterViewController.m | 25 ++++++ 4 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 MonsterCards/Views/EditMonsterViewController.h create mode 100644 MonsterCards/Views/EditMonsterViewController.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 49c46b7..4e127b7 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -23,6 +23,7 @@ E25BD60125036BF8007B04EF /* Language.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60025036BF8007B04EF /* Language.m */; }; E25BD60425036CF0007B04EF /* Ability.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60325036CF0007B04EF /* Ability.m */; }; E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; }; + E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */; }; E2ECA8F32504AC3300C1FFA5 /* SkillTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */; }; E2ECA8F52504BAAD00C1FFA5 /* MonsterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F42504BAAD00C1FFA5 /* MonsterTests.m */; }; E2F7247525005E89007D87ED /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247425005E89007D87ED /* AppDelegate.m */; }; @@ -93,6 +94,8 @@ E25BD60525036CFA007B04EF /* Action.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Action.h; sourceTree = ""; }; E25BD60625036CFA007B04EF /* Action.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Action.m; sourceTree = ""; }; E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; sourceTree = ""; }; + E2D3E3AE250827110052A8EC /* EditMonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditMonsterViewController.h; sourceTree = ""; }; + E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditMonsterViewController.m; sourceTree = ""; }; E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SkillTests.m; sourceTree = ""; }; E2ECA8F42504BAAD00C1FFA5 /* MonsterTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonsterTests.m; sourceTree = ""; }; E2F7247025005E89007D87ED /* Monster Cards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Monster Cards.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -178,6 +181,8 @@ E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */, E20D032F25031BFD00FB6E43 /* DashboardViewController.h */, E20D033025031BFD00FB6E43 /* DashboardViewController.m */, + E2D3E3AE250827110052A8EC /* EditMonsterViewController.h */, + E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */, E20D032925031BE500FB6E43 /* LibraryViewController.h */, E20D032A25031BE500FB6E43 /* LibraryViewController.m */, E20D032625031BDA00FB6E43 /* MonsterViewController.h */, @@ -534,6 +539,7 @@ E2532E8925038DE100CA4CBA /* StringHelper.m in Sources */, E20D032825031BDA00FB6E43 /* MonsterViewController.m in Sources */, E25BD60725036CFA007B04EF /* Action.m in Sources */, + E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */, E2F7247525005E89007D87ED /* AppDelegate.m in Sources */, E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */, E20D033125031BFD00FB6E43 /* DashboardViewController.m in Sources */, diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 5deec64..97e0bad 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -20,7 +20,7 @@ - + @@ -210,13 +210,86 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MonsterCards/Views/EditMonsterViewController.h b/MonsterCards/Views/EditMonsterViewController.h new file mode 100644 index 0000000..6128f78 --- /dev/null +++ b/MonsterCards/Views/EditMonsterViewController.h @@ -0,0 +1,21 @@ +// +// EditMonsterViewController.h +// MonsterCards +// +// Created by Tom Hicks on 9/8/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "Monster.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface EditMonsterViewController : UIViewController + +@property Monster* originalMonster; +@property (weak, nonatomic) IBOutlet UITableView *monsterTableView; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m new file mode 100644 index 0000000..f441e75 --- /dev/null +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -0,0 +1,25 @@ +// +// EditMonsterViewController.m +// MonsterCards +// +// Created by Tom Hicks on 9/8/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "EditMonsterViewController.h" + +@interface EditMonsterViewController () + +@end + +@implementation EditMonsterViewController + +- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + return nil; +} + +- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return 0; +} + +@end From 25b9d06935037f1be5f47f1856d1bd03566af1b9 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 00:14:01 -0700 Subject: [PATCH 033/195] Makes nav back from edit monster to monster view update the monster. --- MonsterCards/Views/MonsterViewController.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MonsterCards/Views/MonsterViewController.m b/MonsterCards/Views/MonsterViewController.m index 9344e92..7e2a19c 100644 --- a/MonsterCards/Views/MonsterViewController.m +++ b/MonsterCards/Views/MonsterViewController.m @@ -7,6 +7,7 @@ // #import "MonsterViewController.h" +#import "EditMonsterViewController.h" @interface MonsterViewController () @@ -44,6 +45,12 @@ #pragma mark - Navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + if ([@"EditMonster" isEqualToString:segue.identifier]) { + if ([segue.destinationViewController isKindOfClass:[EditMonsterViewController class]]) { + EditMonsterViewController *vc = (EditMonsterViewController*)segue.destinationViewController; + vc.originalMonster = self.monster; + } + } } @end From 0e1a07972bfbd5dc0dacb6f3f9d2438844a27f3f Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 00:17:41 -0700 Subject: [PATCH 034/195] Adds string form field cell for use in table views to edit a string property. --- MonsterCards.xcodeproj/project.pbxproj | 16 ++++++++++ .../Views/EditMonsterViewController.h | 3 +- .../Views/EditMonsterViewController.m | 1 + .../FormFields/EditableFormFieldDelegate.h | 20 ++++++++++++ .../EditableShortStringTableViewCell.h | 30 +++++++++++++++++ .../EditableShortStringTableViewCell.m | 32 +++++++++++++++++++ 6 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 MonsterCards/Views/FormFields/EditableFormFieldDelegate.h create mode 100644 MonsterCards/Views/FormFields/EditableShortStringTableViewCell.h create mode 100644 MonsterCards/Views/FormFields/EditableShortStringTableViewCell.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 4e127b7..eccb2de 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ E25BD60425036CF0007B04EF /* Ability.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60325036CF0007B04EF /* Ability.m */; }; E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; }; E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */; }; + E2D3E3B42508C3360052A8EC /* EditableShortStringTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */; }; E2ECA8F32504AC3300C1FFA5 /* SkillTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */; }; E2ECA8F52504BAAD00C1FFA5 /* MonsterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F42504BAAD00C1FFA5 /* MonsterTests.m */; }; E2F7247525005E89007D87ED /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247425005E89007D87ED /* AppDelegate.m */; }; @@ -79,6 +80,7 @@ E20D033025031BFD00FB6E43 /* DashboardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DashboardViewController.m; sourceTree = ""; }; E2532E8725038DE100CA4CBA /* StringHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StringHelper.h; sourceTree = ""; }; E2532E8825038DE100CA4CBA /* StringHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StringHelper.m; sourceTree = ""; }; + E2591EB62509DD4900B396FD /* EditableFormFieldDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableFormFieldDelegate.h; sourceTree = ""; }; E25BD5F3250352C4007B04EF /* Monster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Monster.h; sourceTree = ""; }; E25BD5F4250352C4007B04EF /* Monster.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Monster.m; sourceTree = ""; }; E25BD5F6250368A8007B04EF /* SavingThrow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SavingThrow.h; sourceTree = ""; }; @@ -96,6 +98,8 @@ E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; sourceTree = ""; }; E2D3E3AE250827110052A8EC /* EditMonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditMonsterViewController.h; sourceTree = ""; }; E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditMonsterViewController.m; sourceTree = ""; }; + E2D3E3B22508C3360052A8EC /* EditableShortStringTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableShortStringTableViewCell.h; sourceTree = ""; }; + E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditableShortStringTableViewCell.m; sourceTree = ""; }; E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SkillTests.m; sourceTree = ""; }; E2ECA8F42504BAAD00C1FFA5 /* MonsterTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonsterTests.m; sourceTree = ""; }; E2F7247025005E89007D87ED /* Monster Cards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Monster Cards.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -177,6 +181,7 @@ E20D032525031BA700FB6E43 /* Views */ = { isa = PBXGroup; children = ( + E2D3E3B12508C2FE0052A8EC /* FormFields */, E20D032C25031BEF00FB6E43 /* CollectionsViewController.h */, E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */, E20D032F25031BFD00FB6E43 /* DashboardViewController.h */, @@ -223,6 +228,16 @@ path = Helpers; sourceTree = ""; }; + E2D3E3B12508C2FE0052A8EC /* FormFields */ = { + isa = PBXGroup; + children = ( + E2D3E3B22508C3360052A8EC /* EditableShortStringTableViewCell.h */, + E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */, + E2591EB62509DD4900B396FD /* EditableFormFieldDelegate.h */, + ); + path = FormFields; + sourceTree = ""; + }; E2F7246725005E89007D87ED = { isa = PBXGroup; children = ( @@ -541,6 +556,7 @@ E25BD60725036CFA007B04EF /* Action.m in Sources */, E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */, E2F7247525005E89007D87ED /* AppDelegate.m in Sources */, + E2D3E3B42508C3360052A8EC /* EditableShortStringTableViewCell.m in Sources */, E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */, E20D033125031BFD00FB6E43 /* DashboardViewController.m in Sources */, E25BD5FE25036A76007B04EF /* DamageType.m in Sources */, diff --git a/MonsterCards/Views/EditMonsterViewController.h b/MonsterCards/Views/EditMonsterViewController.h index 6128f78..cd799f9 100644 --- a/MonsterCards/Views/EditMonsterViewController.h +++ b/MonsterCards/Views/EditMonsterViewController.h @@ -8,10 +8,11 @@ #import #import "Monster.h" +#import "EditableShortStringTableViewCell.h" NS_ASSUME_NONNULL_BEGIN -@interface EditMonsterViewController : UIViewController +@interface EditMonsterViewController : UIViewController @property Monster* originalMonster; @property (weak, nonatomic) IBOutlet UITableView *monsterTableView; diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index f441e75..8947305 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -7,6 +7,7 @@ // #import "EditMonsterViewController.h" +#import "EditableShortStringTableViewCell.h" @interface EditMonsterViewController () diff --git a/MonsterCards/Views/FormFields/EditableFormFieldDelegate.h b/MonsterCards/Views/FormFields/EditableFormFieldDelegate.h new file mode 100644 index 0000000..877a3a1 --- /dev/null +++ b/MonsterCards/Views/FormFields/EditableFormFieldDelegate.h @@ -0,0 +1,20 @@ +// +// EditableFormFieldDelegate.h +// MonsterCards +// +// Created by Tom Hicks on 9/9/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#ifndef EditableFormFieldDelegate_h +#define EditableFormFieldDelegate_h + +@protocol EditableFormFieldDelegate + +@optional +-(void)editableValueDidChange:(NSObject*)value forIdentifier:(NSString*)identifier andType:(NSString*)type; + +@end + + +#endif /* EditableFormFieldDelegate_h */ diff --git a/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.h b/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.h new file mode 100644 index 0000000..a607709 --- /dev/null +++ b/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.h @@ -0,0 +1,30 @@ +// +// EditableShortStringTableViewCell.h +// MonsterCards +// +// Created by Tom Hicks on 9/9/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol EditableShortStringDelegate + +@optional +-(void)editableValueDidChange:(NSString*)value forIdentifier:(NSString*)identifier andType:(NSString*)type; + +@end + +@interface EditableShortStringTableViewCell : UITableViewCell + +@property NSString* identifier; +@property NSString* label; +@property NSString* value; +@property (nonatomic, weak) id delegate; +@property (weak, nonatomic) IBOutlet UITextField *textField; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.m b/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.m new file mode 100644 index 0000000..df30060 --- /dev/null +++ b/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.m @@ -0,0 +1,32 @@ +// +// EditableShortStringTableViewCell.m +// MonsterCards +// +// Created by Tom Hicks on 9/9/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "EditableShortStringTableViewCell.h" + +@implementation EditableShortStringTableViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code + self.textField.delegate = self; +} + +#pragma mark - UITextFieldDelegate + +- (BOOL)textField:(UITextField *)textField +shouldChangeCharactersInRange:(NSRange)range +replacementString:(NSString *)string { + // TODO: See this link for a potentially better way to get this text https://stackoverflow.com/questions/19110617/uitextfieldtextdidchangenotification-ios7-not-fired + NSString *finalString = [textField.text stringByReplacingCharactersInRange:range withString:string]; + if (self.delegate != nil) { + [self.delegate editableValueDidChange:finalString forIdentifier:self.identifier andType:@"String"]; + } + return YES; +} + +@end From f0e804ce59dc255de171ee615598d48fa9f5a517 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 00:21:49 -0700 Subject: [PATCH 035/195] Adds monster name as editable in the edit monster view controller. --- .../Views/EditMonsterViewController.m | 71 ++++++++++++++++++- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index 8947305..9ae5a5d 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -11,16 +11,81 @@ @interface EditMonsterViewController () +@property Monster* editingMonster; + @end @implementation EditMonsterViewController -- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { +- (void)viewDidLoad { + [super viewDidLoad]; + self.monsterTableView.dataSource = self; + self.monsterTableView.delegate = self; +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + self.editingMonster = [[Monster alloc] initWithMonster:self.originalMonster]; +} + +#pragma mark - Navigation + +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + if ([@"DiscardChanges" isEqualToString:segue.identifier]) { + } else if ([@"SaveChanges" isEqualToString:segue.identifier]) { + // TODO: this should use a method on originalMonster to copy values from editingMonster or pass the new monster back some way. Core Data would save and probably trigger a refresh in the receiving view. + self.originalMonster.name = self.editingMonster.name; + } else { + NSLog(@"Unknown Segue %@", segue.identifier); + } +} + +#pragma mark - UITableViewDataSource + +- (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { + // Section 0 is basic info + // * Name + // * Size + // * Type + // * Subtype + // * Alignment + + return 1; +} + +- (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + + EditableShortStringTableViewCell *shortStringCell = nil; + + switch (indexPath.section) { + case 0: + switch (indexPath.row) { + case 0: + shortStringCell = [self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]; + if (shortStringCell == nil) { + shortStringCell = [[EditableShortStringTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"EditableShortString"]; + } + shortStringCell.delegate = self; + shortStringCell.identifier = @"monster.name"; + // TODO: make these setters on EditableShortStringTableViewCell + shortStringCell.textField.text = self.editingMonster.name; + shortStringCell.textField.placeholder = @"Name"; + return shortStringCell; + } + break; + } + return nil; } -- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return 0; +#pragma mark - EditableShortStringDelegate + +- (void)editableValueDidChange:(NSObject*)value forIdentifier:(NSString*)identifier andType:(NSString*)type { + if ([@"String" isEqualToString:type]) { + if ([@"monster.name" isEqualToString:identifier]) { + self.editingMonster.name = (NSString*)value; + } + } } @end From fb6418cc80cf4eb09c11ffa4ba5055ee91dbc1de Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 00:55:49 -0700 Subject: [PATCH 036/195] Makes Monster a CoreData entity --- MonsterCards/Models/Monster.h | 14 +++--- MonsterCards/Models/Monster.m | 48 +++++++++++++++---- .../MonsterCards.xcdatamodel/contents | 13 ++++- MonsterCards/Views/LibraryViewController.m | 12 +++-- MonsterCards/Views/SearchViewController.m | 9 +++- 5 files changed, 71 insertions(+), 25 deletions(-) diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index 0a945b8..290f5e2 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -7,6 +7,7 @@ // #import +#import #import "Ability.h" #import "Action.h" #import "DamageType.h" @@ -18,13 +19,8 @@ NS_ASSUME_NONNULL_BEGIN @class Skill; -@interface Monster : NSObject +@interface Monster : NSManagedObject -@property NSString *name; -@property NSString *size; -@property NSString *type; -@property NSString *tag; -@property NSString *alignment; @property NSString *armorName; @property NSString *otherArmorDescription; @property NSString *hpText; @@ -64,8 +60,8 @@ NS_ASSUME_NONNULL_BEGIN +(int)abilityModifierForScore: (int)score; +(int)hitDieForSize: (NSString*)size; --(id)initWithJSONString:(NSString*)jsonString; --(id)initWithJSONData:(NSData*)jsonData; +-(id)initWithJSONString:(NSString*)jsonString andContext:(NSManagedObjectContext*)context; +-(id)initWithJSONData:(NSData*)jsonData andContext:(NSManagedObjectContext*)context; -(id)initWithMonster:(Monster*)monster; -(NSString*)meta; -(int)abilityScoreForAbilityScoreName: (NSString*)abilityScoreName; @@ -130,3 +126,5 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END + +#import "Monster+CoreDataProperties.h" diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 12db4fc..d8bcf55 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -10,6 +10,38 @@ @implementation Monster +@synthesize armorName; +@synthesize blindsightDistance; +@synthesize burrowSpeed; +@synthesize challengeRating; +@synthesize charismaScore; +@synthesize climbSpeed; +@synthesize constitutionScore; +@synthesize customChallengeRating; +@synthesize customHP; +@synthesize customProficiencyBonus; +@synthesize customSpeed; +@synthesize customSpeedDescription; +@synthesize darkvisionDistance; +@synthesize dexterityScore; +@synthesize flySpeed; +@synthesize hitDice; +@synthesize hover; +@synthesize hpText; +@synthesize intelligenceScore; +@synthesize isBlind; +@synthesize naturalArmorBonus; +@synthesize otherArmorDescription; +@synthesize shieldBonus; +@synthesize speed; +@synthesize strengthScore; +@synthesize swimSpeed; +@synthesize telepathy; +@synthesize tremorsenseDistance; +@synthesize truesightDistance; +@synthesize understandsBut; +@synthesize wisdomScore; + +(int)abilityModifierForScore: (int)score { @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; } @@ -26,14 +58,14 @@ return self; } --(id)initWithJSONString: (NSString*)jsonString { +-(id)initWithJSONString: (NSString*)jsonString andContext:(NSManagedObjectContext*)context { NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - return [self initWithJSONData:jsonData]; + return [self initWithJSONData:jsonData andContext:context]; } --(id)initWithJSONData: (NSData*)jsonData { - self = [super init]; +-(id)initWithJSONData: (NSData*)jsonData andContext:(NSManagedObjectContext*)context { + self = [self initWithContext:context]; NSDictionary *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; @@ -42,12 +74,8 @@ return self; } --(id)initWithMonster:(Monster*)monster { - if (monster == nil) { - return [self init]; - } - - self = [super init]; +-(id)initWithMonster:(Monster* _Nonnull)monster { + self = [self initWithContext:monster.managedObjectContext]; self.name = monster.name; diff --git a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents index 5d6f17b..f130f0b 100644 --- a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents +++ b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents @@ -1,4 +1,13 @@ - - + + + + + + + + + + + \ No newline at end of file diff --git a/MonsterCards/Views/LibraryViewController.m b/MonsterCards/Views/LibraryViewController.m index c937145..9406d5f 100644 --- a/MonsterCards/Views/LibraryViewController.m +++ b/MonsterCards/Views/LibraryViewController.m @@ -9,6 +9,7 @@ #import "LibraryViewController.h" #import "Monster.h" #import "MonsterViewController.h" +#import "AppDelegate.h" @interface LibraryViewController () @@ -20,9 +21,12 @@ - (void)viewDidLoad { [super viewDidLoad]; + AppDelegate *appDelegate = (AppDelegate*)UIApplication.sharedApplication.delegate; + NSManagedObjectContext *context = appDelegate.persistentContainer.viewContext; + // Temporary setup of allMonsters until we bind to CoreData. - Monster *pixie = [[Monster alloc] initWithJSONString:@"{\"name\":\"Pixie\"}"]; - Monster *acolyte = [[Monster alloc] initWithJSONString:@"{\"name\":\"Acolyte\"}"]; + Monster *pixie = [[Monster alloc] initWithJSONString:@"{\"name\":\"Pixie\"}" andContext:context]; + Monster *acolyte = [[Monster alloc] initWithJSONString:@"{\"name\":\"Acolyte\"}" andContext:context]; self.allMonsters = [NSArray arrayWithObjects:acolyte, pixie, nil]; } @@ -32,7 +36,9 @@ } - (IBAction)addNewMonster:(id)sender { - Monster *monster = [[Monster alloc] init]; + AppDelegate *appDelegate = (AppDelegate*)UIApplication.sharedApplication.delegate; + NSManagedObjectContext *context = appDelegate.persistentContainer.viewContext; + Monster *monster = [[Monster alloc] initWithContext:context]; monster.name = @"Unnamed Monster"; self.allMonsters = [self.allMonsters arrayByAddingObject:monster]; [self.monstersTable reloadData]; diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m index 5bcf8eb..9df021c 100644 --- a/MonsterCards/Views/SearchViewController.m +++ b/MonsterCards/Views/SearchViewController.m @@ -9,6 +9,7 @@ #import "SearchViewController.h" #import "MonsterViewController.h" #import "Monster.h" +#import "AppDelegate.h" @interface SearchViewController () @@ -21,8 +22,12 @@ - (void)viewDidLoad { [super viewDidLoad]; - Monster *pixie = [[Monster alloc] initWithJSONString:@"{\"name\":\"Pixie\"}"]; - Monster *acolyte = [[Monster alloc] initWithJSONString:@"{\"name\":\"Acolyte\"}"]; + AppDelegate *appDelegate = (AppDelegate*)UIApplication.sharedApplication.delegate; + NSManagedObjectContext *context = appDelegate.persistentContainer.viewContext; + Monster *pixie = [[Monster alloc] initWithContext:context]; + pixie.name = @"Pixie"; + Monster *acolyte = [[Monster alloc] initWithEntity:[NSEntityDescription entityForName:@"Monster" inManagedObjectContext:context] insertIntoManagedObjectContext:nil]; + acolyte.name = @"Acolyte"; self.allMonsters = [NSArray arrayWithObjects:acolyte, pixie, nil]; self.foundMonsters= self.allMonsters; } From 2e70466891479ab06f9a2426954ce99c2e27c12e Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 01:16:56 -0700 Subject: [PATCH 037/195] Makes views use monsters from CoreData instead of hard coded ones. --- .../Views/EditMonsterViewController.m | 11 +++++++++- MonsterCards/Views/LibraryViewController.m | 20 ++++++++----------- MonsterCards/Views/SearchViewController.m | 15 +++++++------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index 9ae5a5d..fa6f4ad 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -8,6 +8,7 @@ #import "EditMonsterViewController.h" #import "EditableShortStringTableViewCell.h" +#import "AppDelegate.h" @interface EditMonsterViewController () @@ -15,10 +16,15 @@ @end -@implementation EditMonsterViewController +@implementation EditMonsterViewController { + NSManagedObjectContext *_context; +} - (void)viewDidLoad { [super viewDidLoad]; + AppDelegate *appDelegate = (AppDelegate*)UIApplication.sharedApplication.delegate; + _context = appDelegate.persistentContainer.viewContext; + self.monsterTableView.dataSource = self; self.monsterTableView.delegate = self; } @@ -32,9 +38,12 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([@"DiscardChanges" isEqualToString:segue.identifier]) { + [_context rollback]; } else if ([@"SaveChanges" isEqualToString:segue.identifier]) { // TODO: this should use a method on originalMonster to copy values from editingMonster or pass the new monster back some way. Core Data would save and probably trigger a refresh in the receiving view. self.originalMonster.name = self.editingMonster.name; + [_context refreshObject:self.editingMonster mergeChanges:NO]; + [_context save:nil]; } else { NSLog(@"Unknown Segue %@", segue.identifier); } diff --git a/MonsterCards/Views/LibraryViewController.m b/MonsterCards/Views/LibraryViewController.m index 9406d5f..e3b28fa 100644 --- a/MonsterCards/Views/LibraryViewController.m +++ b/MonsterCards/Views/LibraryViewController.m @@ -17,36 +17,32 @@ @end -@implementation LibraryViewController +@implementation LibraryViewController { + NSManagedObjectContext *_context; +} - (void)viewDidLoad { [super viewDidLoad]; AppDelegate *appDelegate = (AppDelegate*)UIApplication.sharedApplication.delegate; - NSManagedObjectContext *context = appDelegate.persistentContainer.viewContext; - - // Temporary setup of allMonsters until we bind to CoreData. - Monster *pixie = [[Monster alloc] initWithJSONString:@"{\"name\":\"Pixie\"}" andContext:context]; - Monster *acolyte = [[Monster alloc] initWithJSONString:@"{\"name\":\"Acolyte\"}" andContext:context]; - self.allMonsters = [NSArray arrayWithObjects:acolyte, pixie, nil]; + _context = appDelegate.persistentContainer.viewContext; } - (void)viewWillAppear:(BOOL)animated { - // TODO: fetch monsters from CoreData + self.allMonsters = [_context executeFetchRequest:[Monster fetchRequest] error:nil]; [self.monstersTable reloadData]; } - (IBAction)addNewMonster:(id)sender { - AppDelegate *appDelegate = (AppDelegate*)UIApplication.sharedApplication.delegate; - NSManagedObjectContext *context = appDelegate.persistentContainer.viewContext; - Monster *monster = [[Monster alloc] initWithContext:context]; + Monster *monster = [[Monster alloc] initWithContext:_context]; monster.name = @"Unnamed Monster"; self.allMonsters = [self.allMonsters arrayByAddingObject:monster]; + //DispatchQueue.main.async{"code here"} + [_context save:nil]; [self.monstersTable reloadData]; } #pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([@"ShowMonsterDetail" isEqualToString:segue.identifier]) { NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m index 9df021c..5e61f9e 100644 --- a/MonsterCards/Views/SearchViewController.m +++ b/MonsterCards/Views/SearchViewController.m @@ -18,17 +18,18 @@ @end -@implementation SearchViewController +@implementation SearchViewController { + NSManagedObjectContext *_context; +} - (void)viewDidLoad { [super viewDidLoad]; AppDelegate *appDelegate = (AppDelegate*)UIApplication.sharedApplication.delegate; - NSManagedObjectContext *context = appDelegate.persistentContainer.viewContext; - Monster *pixie = [[Monster alloc] initWithContext:context]; - pixie.name = @"Pixie"; - Monster *acolyte = [[Monster alloc] initWithEntity:[NSEntityDescription entityForName:@"Monster" inManagedObjectContext:context] insertIntoManagedObjectContext:nil]; - acolyte.name = @"Acolyte"; - self.allMonsters = [NSArray arrayWithObjects:acolyte, pixie, nil]; + _context = appDelegate.persistentContainer.viewContext; +} + +- (void)viewWillAppear:(BOOL)animated { + self.allMonsters = [_context executeFetchRequest:[Monster fetchRequest] error:nil]; self.foundMonsters= self.allMonsters; } From fade50eef5298ccf62b725c5363b33141b4cb9a6 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 01:25:56 -0700 Subject: [PATCH 038/195] Adds swipe action to delete a card from the library. --- MonsterCards/Views/LibraryViewController.m | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/MonsterCards/Views/LibraryViewController.m b/MonsterCards/Views/LibraryViewController.m index e3b28fa..b392348 100644 --- a/MonsterCards/Views/LibraryViewController.m +++ b/MonsterCards/Views/LibraryViewController.m @@ -73,4 +73,20 @@ return cell; } +#pragma mark - UITableViewDelegate + +- (UISwipeActionsConfiguration *)tableView:(UITableView *)tableView +trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath { + UIContextualAction *action = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:NSLocalizedString(@"Delete", @"Command to delete an object.") handler:^(UIContextualAction *action, __kindof UIView *sourceView, void (^completionHandler)(BOOL actionPerformed)) { + Monster *monster = [self.allMonsters objectAtIndex:indexPath.row]; + [self->_context deleteObject:monster]; + [self->_context save:nil]; + self.allMonsters = [self->_context executeFetchRequest:[Monster fetchRequest] error:nil]; + [self.tableView reloadData]; + }]; + + UISwipeActionsConfiguration *config = [UISwipeActionsConfiguration configurationWithActions:[NSArray arrayWithObject:action]]; + return config; +} + @end From 8efb17a56c84b4dae3387283b8fbbb580744cfb3 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 01:26:59 -0700 Subject: [PATCH 039/195] Makes the search bar redo the search when the view is reloaded. --- MonsterCards/Views/SearchViewController.m | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/MonsterCards/Views/SearchViewController.m b/MonsterCards/Views/SearchViewController.m index 5e61f9e..ad6ecf1 100644 --- a/MonsterCards/Views/SearchViewController.m +++ b/MonsterCards/Views/SearchViewController.m @@ -29,8 +29,13 @@ } - (void)viewWillAppear:(BOOL)animated { + NSString *searchText = nil; + if (self.searchBar != nil) { + searchText = self.searchBar.text; + } self.allMonsters = [_context executeFetchRequest:[Monster fetchRequest] error:nil]; - self.foundMonsters= self.allMonsters; + self.foundMonsters = [self filterAllMonstersWithText:searchText]; + [self.tableView reloadData]; } #pragma mark - Navigation @@ -69,9 +74,7 @@ #pragma mark - UISearchBarDelegate -- (void)searchBar:(UISearchBar *)searchBar - textDidChange:(NSString *)searchText { - +- (NSArray*)filterAllMonstersWithText:(NSString *)searchText { if (searchText != nil && ![@"" isEqualToString:searchText]) { NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(id item, NSDictionary *bindings) { if (![item isKindOfClass:[Monster class]]) { @@ -85,10 +88,16 @@ return false; }]; - self.foundMonsters = [self.allMonsters filteredArrayUsingPredicate:predicate]; + return [self.allMonsters filteredArrayUsingPredicate:predicate]; } else { - self.foundMonsters = self.allMonsters; + return self.allMonsters; } +} + +- (void)searchBar:(UISearchBar *)searchBar + textDidChange:(NSString *)searchText { + + self.foundMonsters = [self filterAllMonstersWithText:searchText]; [self.tableView reloadData]; } From 68e2f84e2186f571ac86c503f8858b8db62c78dc Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 02:06:25 -0700 Subject: [PATCH 040/195] Fixes tests. Adds CoreData codegen categories to tests. Updates initializers to pass coredata contexts. --- MonsterCards.xcodeproj/project.pbxproj | 2 ++ MonsterCardsTests/Models/MonsterTests.m | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index eccb2de..e6ca624 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -25,6 +25,7 @@ E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; }; E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */; }; E2D3E3B42508C3360052A8EC /* EditableShortStringTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */; }; + E2E25805250CC3A7002E7308 /* MonsterCards.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E2F7248225005E89007D87ED /* MonsterCards.xcdatamodeld */; }; E2ECA8F32504AC3300C1FFA5 /* SkillTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */; }; E2ECA8F52504BAAD00C1FFA5 /* MonsterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F42504BAAD00C1FFA5 /* MonsterTests.m */; }; E2F7247525005E89007D87ED /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F7247425005E89007D87ED /* AppDelegate.m */; }; @@ -584,6 +585,7 @@ E2ECA8F52504BAAD00C1FFA5 /* MonsterTests.m in Sources */, E2ECA8F32504AC3300C1FFA5 /* SkillTests.m in Sources */, E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */, + E2E25805250CC3A7002E7308 /* MonsterCards.xcdatamodeld in Sources */, E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index da8dcea..f262cb2 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -17,12 +17,14 @@ @implementation MonsterTests { Monster *_monster; + NSManagedObjectContext *_context; NSString *_jsonString; NSData *_jsonData; } - (void)setUp { - _monster = [[Monster alloc] init]; + _context = nil; + _monster = [[Monster alloc] initWithContext:_context]; _jsonString = @"{\"name\":\"Acolyte\"}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -37,14 +39,14 @@ } - (void)testInitWithJSONString { - _monster = [[Monster alloc] initWithJSONString:_jsonString]; + _monster = [[Monster alloc] initWithJSONString:_jsonString andContext:_context]; XCTAssertNotNil(_monster); XCTAssertEqualObjects(@"Acolyte", _monster.name); } - (void)testInitWithJSONData { - _monster = [[Monster alloc] initWithJSONData:_jsonData]; + _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; XCTAssertNotNil(_monster); XCTAssertEqualObjects(@"Acolyte", _monster.name); From dd05b39ea90a78e7312ecf425a7f84021ebababe Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 02:16:14 -0700 Subject: [PATCH 041/195] Makes search and library use the same monster detail view/controller. --- MonsterCards/Base.lproj/Main.storyboard | 21 ++++----------------- MonsterCards/Views/LibraryViewController.m | 6 ++++-- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 97e0bad..b0017d5 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -59,22 +59,6 @@ - - - - - - - - - - - - - - - - @@ -100,7 +84,7 @@ - + @@ -291,6 +275,9 @@ + + + diff --git a/MonsterCards/Views/LibraryViewController.m b/MonsterCards/Views/LibraryViewController.m index b392348..b80f958 100644 --- a/MonsterCards/Views/LibraryViewController.m +++ b/MonsterCards/Views/LibraryViewController.m @@ -46,8 +46,10 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([@"ShowMonsterDetail" isEqualToString:segue.identifier]) { NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; - MonsterViewController *vc = (MonsterViewController*)segue.destinationViewController; - vc.monster = [self.allMonsters objectAtIndex:indexPath.row]; + if ([segue.destinationViewController isKindOfClass:[MonsterViewController class]]) { + MonsterViewController *vc = (MonsterViewController*)segue.destinationViewController; + vc.monster = [self.allMonsters objectAtIndex:indexPath.row]; + } } } From ee9994c2c851470af4cf1fdda94b4cf67afd0d2a Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 03:08:10 -0700 Subject: [PATCH 042/195] Adds meta string to monster cards. Implements meta method in Monster to return a formatted meta string. Adds size to edit monster. Moves monster copy logic to copyFromMonster in the Monster class. Fixes JSON parsing to set strings to an empty string if they're missing from the json blob. Makes Monster.size default to an empty string instead of null. Cleans up some raw strings to use NSLocalizedString instead. --- MonsterCards/Base.lproj/Main.storyboard | 18 ++++++++++- MonsterCards/Models/Monster.h | 2 ++ MonsterCards/Models/Monster.m | 31 +++++++++++++++++-- .../MonsterCards.xcdatamodel/contents | 2 +- .../Views/EditMonsterViewController.m | 21 ++++++++++--- MonsterCards/Views/LibraryViewController.m | 2 +- MonsterCards/Views/MonsterViewController.h | 1 + MonsterCards/Views/MonsterViewController.m | 6 ++++ MonsterCardsTests/Models/MonsterTests.m | 18 ++++++++++- 9 files changed, 91 insertions(+), 10 deletions(-) diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index b0017d5..795f07a 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -190,7 +190,20 @@ + + + + + + + + @@ -200,6 +213,9 @@ + + + @@ -276,7 +292,7 @@ - + diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index 290f5e2..b4bbcf6 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -63,6 +63,8 @@ NS_ASSUME_NONNULL_BEGIN -(id)initWithJSONString:(NSString*)jsonString andContext:(NSManagedObjectContext*)context; -(id)initWithJSONData:(NSData*)jsonData andContext:(NSManagedObjectContext*)context; -(id)initWithMonster:(Monster*)monster; +-(void)copyFromMonster:(Monster*)monster; + -(NSString*)meta; -(int)abilityScoreForAbilityScoreName: (NSString*)abilityScoreName; -(int)abilityModifierForAbilityScoreName: (NSString*)abilityScoreName; diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index d8bcf55..258e266 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -7,6 +7,7 @@ // #import "Monster.h" +#import "StringHelper.h" @implementation Monster @@ -54,6 +55,7 @@ self = [super init]; self.name = @""; + self.size = @""; return self; } @@ -69,7 +71,8 @@ NSDictionary *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; - self.name = [jsonRoot objectForKey:@"name"]; + self.name = [jsonRoot objectForKey:@"name"] ?: @""; + self.size = [jsonRoot objectForKey:@"size"] ?: @""; return self; } @@ -83,7 +86,26 @@ } -(NSString*)meta { - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + //"${size} ${type} (${subtype}) ${alignment}" + + NSMutableArray *parts = [NSMutableArray arrayWithCapacity:4]; + if (![StringHelper isStringNilOrEmpty:self.size]) { + [parts addObject:self.size]; + } + + if (![StringHelper isStringNilOrEmpty:self.type]) { + [parts addObject:self.type]; + } + + if (![StringHelper isStringNilOrEmpty:self.subtype]) { + [parts addObject:[NSString stringWithFormat:@"(%@)", self.subtype]]; + } + + if (![StringHelper isStringNilOrEmpty:self.alignment]) { + [parts addObject:self.alignment]; + } + + return [parts componentsJoinedByString:@" "]; } -(int)abilityScoreForAbilityScoreName: (NSString*)abilityScoreName { @@ -309,4 +331,9 @@ @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; } +-(void)copyFromMonster:(Monster*)monster { + self.name = monster.name; + self.size = monster.size; +} + @end diff --git a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents index f130f0b..f9229af 100644 --- a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents +++ b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents @@ -3,7 +3,7 @@ - + diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index fa6f4ad..4c0c276 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -41,7 +41,7 @@ [_context rollback]; } else if ([@"SaveChanges" isEqualToString:segue.identifier]) { // TODO: this should use a method on originalMonster to copy values from editingMonster or pass the new monster back some way. Core Data would save and probably trigger a refresh in the receiving view. - self.originalMonster.name = self.editingMonster.name; + [self.originalMonster copyFromMonster:self.editingMonster]; [_context refreshObject:self.editingMonster mergeChanges:NO]; [_context save:nil]; } else { @@ -59,7 +59,7 @@ // * Subtype // * Alignment - return 1; + return 2; } - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { @@ -76,9 +76,20 @@ } shortStringCell.delegate = self; shortStringCell.identifier = @"monster.name"; - // TODO: make these setters on EditableShortStringTableViewCell + // TODO: make these use setters on EditableShortStringTableViewCell shortStringCell.textField.text = self.editingMonster.name; - shortStringCell.textField.placeholder = @"Name"; + shortStringCell.textField.placeholder = NSLocalizedString(@"Name", @"Placeholder text for the name of a monster or NPC."); + return shortStringCell; + case 1: + shortStringCell = [self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]; + if (shortStringCell == nil) { + shortStringCell = [[EditableShortStringTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"EditableShortString"]; + } + shortStringCell.delegate = self; + shortStringCell.identifier = @"monster.size"; + // TODO: make these use setters on EditableShortStringTableViewCell + shortStringCell.textField.text = self.editingMonster.size; + shortStringCell.textField.placeholder = NSLocalizedString(@"Size", @"Placehodler text for the size of a monster or NPC."); return shortStringCell; } break; @@ -93,6 +104,8 @@ if ([@"String" isEqualToString:type]) { if ([@"monster.name" isEqualToString:identifier]) { self.editingMonster.name = (NSString*)value; + } else if ([@"monster.size" isEqualToString:identifier]) { + self.editingMonster.size = (NSString*)value; } } } diff --git a/MonsterCards/Views/LibraryViewController.m b/MonsterCards/Views/LibraryViewController.m index b80f958..69b781b 100644 --- a/MonsterCards/Views/LibraryViewController.m +++ b/MonsterCards/Views/LibraryViewController.m @@ -34,7 +34,7 @@ - (IBAction)addNewMonster:(id)sender { Monster *monster = [[Monster alloc] initWithContext:_context]; - monster.name = @"Unnamed Monster"; + monster.name = NSLocalizedString(@"Unnamed Monster", @"The default name of a new monster."); self.allMonsters = [self.allMonsters arrayByAddingObject:monster]; //DispatchQueue.main.async{"code here"} [_context save:nil]; diff --git a/MonsterCards/Views/MonsterViewController.h b/MonsterCards/Views/MonsterViewController.h index 33d6ca3..305ad8e 100644 --- a/MonsterCards/Views/MonsterViewController.h +++ b/MonsterCards/Views/MonsterViewController.h @@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MonsterViewController : UIViewController @property (weak, nonatomic) IBOutlet UILabel *monsterName; +@property (weak, nonatomic) IBOutlet UILabel *monsterMeta; @property Monster* monster; diff --git a/MonsterCards/Views/MonsterViewController.m b/MonsterCards/Views/MonsterViewController.m index 7e2a19c..33a0b66 100644 --- a/MonsterCards/Views/MonsterViewController.m +++ b/MonsterCards/Views/MonsterViewController.m @@ -35,6 +35,12 @@ self.navigationItem.title = self.monster.name; } } + NSString *metaText = self.monster.meta; + if (metaText == nil) { + self.monsterMeta.text = @""; + } else { + self.monsterMeta.text = metaText; + } } - (IBAction)unwindWithSegue:(UIStoryboardSegue *)unwindSegue { diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index f262cb2..58cd575 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\"}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"large\"}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -36,6 +36,7 @@ - (void)testDefaultInitializer { XCTAssertNotNil(_monster); XCTAssertEqualObjects(@"", _monster.name); + XCTAssertEqualObjects(@"", _monster.size); } - (void)testInitWithJSONString { @@ -43,13 +44,22 @@ XCTAssertNotNil(_monster); XCTAssertEqualObjects(@"Acolyte", _monster.name); + XCTAssertEqualObjects(@"large", _monster.size); } +- (void)testInitWithEmptyJSONString { + _monster = [[Monster alloc] initWithJSONString:@"{}" andContext:_context]; + + XCTAssertNotNil(_monster); + XCTAssertEqualObjects(@"", _monster.name); + XCTAssertEqualObjects(@"", _monster.size); +} - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; XCTAssertNotNil(_monster); XCTAssertEqualObjects(@"Acolyte", _monster.name); + XCTAssertEqualObjects(@"large", _monster.size); } - (void)testNameGetterAndSetter { @@ -58,4 +68,10 @@ XCTAssertEqualObjects(name, _monster.name); } +- (void)testSizeGetterAndSetter { + NSString *size = @"huge"; + _monster.size = size; + XCTAssertEqualObjects(size, _monster.size); +} + @end From 42ddfbd52fd044d40726f00257a5d812bb80353e Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 03:30:37 -0700 Subject: [PATCH 043/195] Adds monster type to editor. Sets all entity attributes for monster to default to empty string instead of null. Adds test for copyFromMonster. Makes initWithMonster:andContext call copyFromMonster to ensure they use the same logic to clone the other monster. --- MonsterCards/Models/Monster.m | 4 ++- .../MonsterCards.xcdatamodel/contents | 8 +++--- .../Views/EditMonsterViewController.m | 15 ++++++++++- MonsterCardsTests/Models/MonsterTests.m | 26 ++++++++++++++++--- 4 files changed, 44 insertions(+), 9 deletions(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 258e266..a6d5433 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -73,6 +73,7 @@ self.name = [jsonRoot objectForKey:@"name"] ?: @""; self.size = [jsonRoot objectForKey:@"size"] ?: @""; + self.type = [jsonRoot objectForKey:@"type"] ?: @""; return self; } @@ -80,7 +81,7 @@ -(id)initWithMonster:(Monster* _Nonnull)monster { self = [self initWithContext:monster.managedObjectContext]; - self.name = monster.name; + [self copyFromMonster:monster]; return self; } @@ -334,6 +335,7 @@ -(void)copyFromMonster:(Monster*)monster { self.name = monster.name; self.size = monster.size; + self.type = monster.type; } @end diff --git a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents index f9229af..928c297 100644 --- a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents +++ b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents @@ -1,11 +1,11 @@ - + - - - + + + diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index 4c0c276..54409f7 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -59,7 +59,7 @@ // * Subtype // * Alignment - return 2; + return 3; } - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { @@ -91,6 +91,17 @@ shortStringCell.textField.text = self.editingMonster.size; shortStringCell.textField.placeholder = NSLocalizedString(@"Size", @"Placehodler text for the size of a monster or NPC."); return shortStringCell; + case 2: + shortStringCell = [self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]; + if (shortStringCell == nil) { + shortStringCell = [[EditableShortStringTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"EditableShortString"]; + } + shortStringCell.delegate = self; + shortStringCell.identifier = @"monster.type"; + // TODO: make these use setters on EditableShortStringTableViewCell + shortStringCell.textField.text = self.editingMonster.type; + shortStringCell.textField.placeholder = NSLocalizedString(@"Type", @"Placehodler text for the type of a monster or NPC."); + return shortStringCell; } break; } @@ -106,6 +117,8 @@ self.editingMonster.name = (NSString*)value; } else if ([@"monster.size" isEqualToString:identifier]) { self.editingMonster.size = (NSString*)value; + } else if ([@"monster.type" isEqualToString:identifier]) { + self.editingMonster.type = (NSString*)value; } } } diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index 58cd575..0bfef45 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"large\"}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\"}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -37,6 +37,7 @@ XCTAssertNotNil(_monster); XCTAssertEqualObjects(@"", _monster.name); XCTAssertEqualObjects(@"", _monster.size); + XCTAssertEqualObjects(@"", _monster.type); } - (void)testInitWithJSONString { @@ -44,7 +45,8 @@ XCTAssertNotNil(_monster); XCTAssertEqualObjects(@"Acolyte", _monster.name); - XCTAssertEqualObjects(@"large", _monster.size); + XCTAssertEqualObjects(@"medium", _monster.size); + XCTAssertEqualObjects(@"humanoid", _monster.type); } - (void)testInitWithEmptyJSONString { @@ -53,13 +55,15 @@ XCTAssertNotNil(_monster); XCTAssertEqualObjects(@"", _monster.name); XCTAssertEqualObjects(@"", _monster.size); + XCTAssertEqualObjects(@"", _monster.type); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; XCTAssertNotNil(_monster); XCTAssertEqualObjects(@"Acolyte", _monster.name); - XCTAssertEqualObjects(@"large", _monster.size); + XCTAssertEqualObjects(@"medium", _monster.size); + XCTAssertEqualObjects(@"humanoid", _monster.type); } - (void)testNameGetterAndSetter { @@ -74,4 +78,20 @@ XCTAssertEqualObjects(size, _monster.size); } +- (void)testTypeGetterAndSetter { + NSString *type = @"fey"; + _monster.type = type; + XCTAssertEqualObjects(type, _monster.type); +} + +- (void)testCopyFromMonster { + Monster *otherMonster = [[Monster alloc] initWithJSONString:_jsonString andContext:_context]; + [_monster copyFromMonster:otherMonster]; + + XCTAssertNotNil(_monster); + XCTAssertEqualObjects(@"Acolyte", _monster.name); + XCTAssertEqualObjects(@"medium", _monster.size); + XCTAssertEqualObjects(@"humanoid", _monster.type); +} + @end From 0c1deecb5b3a05789e99465ad81ffd0e9bef260d Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 17:16:36 -0700 Subject: [PATCH 044/195] Adds subtype to monster. Adds EditMonsterViewController tests for editing subtype. Adds tests for meta property of Monster. --- MonsterCards.xcodeproj/project.pbxproj | 12 +++ MonsterCards/Models/Monster.m | 2 + .../Views/EditMonsterViewController.m | 35 ++++--- MonsterCardsTests/Models/MonsterTests.m | 58 +++++++++++- .../Views/EditMonsterViewControllerTests.m | 93 +++++++++++++++++++ 5 files changed, 186 insertions(+), 14 deletions(-) create mode 100644 MonsterCardsTests/Views/EditMonsterViewControllerTests.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index e6ca624..3e50f57 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ E20D032E25031BEF00FB6E43 /* CollectionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */; }; E20D033125031BFD00FB6E43 /* DashboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D033025031BFD00FB6E43 /* DashboardViewController.m */; }; E2532E8925038DE100CA4CBA /* StringHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E2532E8825038DE100CA4CBA /* StringHelper.m */; }; + E2592B8D250D6B8100906A40 /* EditMonsterViewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2592B8C250D6B8100906A40 /* EditMonsterViewControllerTests.m */; }; E25BD5F5250352C4007B04EF /* Monster.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5F4250352C4007B04EF /* Monster.m */; }; E25BD5F8250368A8007B04EF /* SavingThrow.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5F7250368A8007B04EF /* SavingThrow.m */; }; E25BD5FB250369D7007B04EF /* Skill.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5FA250369D7007B04EF /* Skill.m */; }; @@ -82,6 +83,7 @@ E2532E8725038DE100CA4CBA /* StringHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StringHelper.h; sourceTree = ""; }; E2532E8825038DE100CA4CBA /* StringHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StringHelper.m; sourceTree = ""; }; E2591EB62509DD4900B396FD /* EditableFormFieldDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableFormFieldDelegate.h; sourceTree = ""; }; + E2592B8C250D6B8100906A40 /* EditMonsterViewControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditMonsterViewControllerTests.m; sourceTree = ""; }; E25BD5F3250352C4007B04EF /* Monster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Monster.h; sourceTree = ""; }; E25BD5F4250352C4007B04EF /* Monster.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Monster.m; sourceTree = ""; }; E25BD5F6250368A8007B04EF /* SavingThrow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SavingThrow.h; sourceTree = ""; }; @@ -229,6 +231,14 @@ path = Helpers; sourceTree = ""; }; + E2592B8B250D6B6000906A40 /* Views */ = { + isa = PBXGroup; + children = ( + E2592B8C250D6B8100906A40 /* EditMonsterViewControllerTests.m */, + ); + path = Views; + sourceTree = ""; + }; E2D3E3B12508C2FE0052A8EC /* FormFields */ = { isa = PBXGroup; children = ( @@ -284,6 +294,7 @@ E2F7249425005E8A007D87ED /* MonsterCardsTests */ = { isa = PBXGroup; children = ( + E2592B8B250D6B6000906A40 /* Views */, E2FD91E225047C1D00D5E935 /* Models */, E2F7249525005E8A007D87ED /* MonsterCardsTests.m */, E2F7249725005E8A007D87ED /* Info.plist */, @@ -580,6 +591,7 @@ files = ( E2FD91EA250493C000D5E935 /* LanguageTests.m in Sources */, E2FD91E82504832A00D5E935 /* DamageTypeTests.m in Sources */, + E2592B8D250D6B8100906A40 /* EditMonsterViewControllerTests.m in Sources */, E2FD91EC250496B000D5E935 /* SavingThrowTests.m in Sources */, E2FD91E6250481F300D5E935 /* ActionTests.m in Sources */, E2ECA8F52504BAAD00C1FFA5 /* MonsterTests.m in Sources */, diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index a6d5433..d205b39 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -74,6 +74,7 @@ self.name = [jsonRoot objectForKey:@"name"] ?: @""; self.size = [jsonRoot objectForKey:@"size"] ?: @""; self.type = [jsonRoot objectForKey:@"type"] ?: @""; + self.subtype = [jsonRoot objectForKey:@"tag"] ?: @""; return self; } @@ -336,6 +337,7 @@ self.name = monster.name; self.size = monster.size; self.type = monster.type; + self.subtype = monster.subtype; } @end diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index 54409f7..abdd8a3 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -59,7 +59,16 @@ // * Subtype // * Alignment - return 3; + return 4; +} + +- (EditableShortStringTableViewCell*) makeShortStringCellFromCell:(UITableViewCell*)cell { + if (cell == nil || ![cell isKindOfClass:[EditableShortStringTableViewCell class]]) { + // TODO: Figure out why this doesn't create a cell with a text field. + return [[EditableShortStringTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"EditableShortString"]; + } else { + return (EditableShortStringTableViewCell*)cell; + } } - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { @@ -70,10 +79,7 @@ case 0: switch (indexPath.row) { case 0: - shortStringCell = [self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]; - if (shortStringCell == nil) { - shortStringCell = [[EditableShortStringTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"EditableShortString"]; - } + shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]]; shortStringCell.delegate = self; shortStringCell.identifier = @"monster.name"; // TODO: make these use setters on EditableShortStringTableViewCell @@ -81,10 +87,7 @@ shortStringCell.textField.placeholder = NSLocalizedString(@"Name", @"Placeholder text for the name of a monster or NPC."); return shortStringCell; case 1: - shortStringCell = [self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]; - if (shortStringCell == nil) { - shortStringCell = [[EditableShortStringTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"EditableShortString"]; - } + shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]]; shortStringCell.delegate = self; shortStringCell.identifier = @"monster.size"; // TODO: make these use setters on EditableShortStringTableViewCell @@ -92,16 +95,20 @@ shortStringCell.textField.placeholder = NSLocalizedString(@"Size", @"Placehodler text for the size of a monster or NPC."); return shortStringCell; case 2: - shortStringCell = [self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]; - if (shortStringCell == nil) { - shortStringCell = [[EditableShortStringTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"EditableShortString"]; - } + shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]]; shortStringCell.delegate = self; shortStringCell.identifier = @"monster.type"; // TODO: make these use setters on EditableShortStringTableViewCell shortStringCell.textField.text = self.editingMonster.type; shortStringCell.textField.placeholder = NSLocalizedString(@"Type", @"Placehodler text for the type of a monster or NPC."); return shortStringCell; + case 3: + shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]]; + shortStringCell.delegate = self; + shortStringCell.identifier = @"monster.subtype"; + shortStringCell.textField.text = self.editingMonster.subtype; + shortStringCell.textField.placeholder = NSLocalizedString(@"Subtype", @"Placeholder text for the subtype of a monster or NPC."); + return shortStringCell; } break; } @@ -119,6 +126,8 @@ self.editingMonster.size = (NSString*)value; } else if ([@"monster.type" isEqualToString:identifier]) { self.editingMonster.type = (NSString*)value; + } else if ([@"monster.subtype" isEqualToString:identifier]) { + self.editingMonster.subtype = (NSString*)value; } } } diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index 0bfef45..b4f83eb 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\"}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\"}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -38,6 +38,7 @@ XCTAssertEqualObjects(@"", _monster.name); XCTAssertEqualObjects(@"", _monster.size); XCTAssertEqualObjects(@"", _monster.type); + XCTAssertEqualObjects(@"", _monster.subtype); } - (void)testInitWithJSONString { @@ -47,6 +48,7 @@ XCTAssertEqualObjects(@"Acolyte", _monster.name); XCTAssertEqualObjects(@"medium", _monster.size); XCTAssertEqualObjects(@"humanoid", _monster.type); + XCTAssertEqualObjects(@"any race", _monster.subtype); } - (void)testInitWithEmptyJSONString { @@ -56,6 +58,7 @@ XCTAssertEqualObjects(@"", _monster.name); XCTAssertEqualObjects(@"", _monster.size); XCTAssertEqualObjects(@"", _monster.type); + XCTAssertEqualObjects(@"", _monster.subtype); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -64,6 +67,7 @@ XCTAssertEqualObjects(@"Acolyte", _monster.name); XCTAssertEqualObjects(@"medium", _monster.size); XCTAssertEqualObjects(@"humanoid", _monster.type); + XCTAssertEqualObjects(@"any race", _monster.subtype); } - (void)testNameGetterAndSetter { @@ -84,6 +88,12 @@ XCTAssertEqualObjects(type, _monster.type); } +- (void)testSubtypeGetterAndSetter { + NSString *subtype = @"elf"; + _monster.subtype = subtype; + XCTAssertEqualObjects(subtype, _monster.subtype); +} + - (void)testCopyFromMonster { Monster *otherMonster = [[Monster alloc] initWithJSONString:_jsonString andContext:_context]; [_monster copyFromMonster:otherMonster]; @@ -92,6 +102,52 @@ XCTAssertEqualObjects(@"Acolyte", _monster.name); XCTAssertEqualObjects(@"medium", _monster.size); XCTAssertEqualObjects(@"humanoid", _monster.type); + XCTAssertEqualObjects(@"any race", _monster.subtype); +} + +- (void)testMetaWithNoFieldsSet { + + XCTAssertEqualObjects(@"", _monster.meta); +} + +- (void)testMetaWithSize { + _monster.size = @"large"; + XCTAssertEqualObjects(@"large", _monster.meta); +} + +- (void)testMetaWithType { + _monster.type = @"humanoid"; + XCTAssertEqualObjects(@"humanoid", _monster.meta); +} + +- (void)testMetaWithSizeAndType { + _monster.size = @"large"; + _monster.type = @"humanoid"; + XCTAssertEqualObjects(@"large humanoid", _monster.meta); +} + +- (void)testMetaWithSubtype { + _monster.subtype = @"elf"; + XCTAssertEqualObjects(@"(elf)", _monster.meta); +} + +- (void)testMetaWithSizeAndSubtype { + _monster.size = @"large"; + _monster.subtype = @"elf"; + XCTAssertEqualObjects(@"large (elf)", _monster.meta); +} + +- (void)testMetaWithTypeAndSubtype { + _monster.type = @"humanoid"; + _monster.subtype = @"elf"; + XCTAssertEqualObjects(@"humanoid (elf)", _monster.meta); +} + +- (void)testMetaWithSizeTypeAndSubtype { + _monster.size = @"large"; + _monster.type = @"humanoid"; + _monster.subtype = @"elf"; + XCTAssertEqualObjects(@"large humanoid (elf)", _monster.meta); } @end diff --git a/MonsterCardsTests/Views/EditMonsterViewControllerTests.m b/MonsterCardsTests/Views/EditMonsterViewControllerTests.m new file mode 100644 index 0000000..49c3cc2 --- /dev/null +++ b/MonsterCardsTests/Views/EditMonsterViewControllerTests.m @@ -0,0 +1,93 @@ +// +// EditMonsterViewControllerTests.m +// MonsterCardsTests +// +// Created by Tom Hicks on 9/12/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +@import OCMockito; +@import OCHamcrest; +#import "EditMonsterViewController.h" +#import "AppDelegate.h" + +@interface EditMonsterViewControllerTests : XCTestCase + +@end + +@implementation EditMonsterViewControllerTests { + EditMonsterViewController *_viewController; + NSManagedObjectContext *_context; + AppDelegate *_appDelegate; + NSPersistentCloudKitContainer *_persistentContainer; + Monster *_monster; +} + +- (void)setUp { + _monster = mock([Monster class]); + _viewController = [[EditMonsterViewController alloc] init]; + _context = mock([NSManagedObjectContext class]); + _appDelegate = mock([AppDelegate class]); + _persistentContainer = mock([NSPersistentCloudKitContainer class]); + + UIApplication.sharedApplication.delegate = _appDelegate; +// ((AppDelegate*)UIApplication.sharedApplication.delegate).persistentContainer.viewContext = _context; +} + +- (void)tearDown { +} + +// UIViewController +// UITableViewDelegate +// UITableViewDataSource +// EditableShortStringDeletgate +// Monster *originalMonster +// UITableView *monsterTableView + +- (void)testRendersSubtypeCell { + UITableView *monstersTableView = mock([UITableView class]); + NSIndexPath *path = [NSIndexPath indexPathForRow:3 inSection:0]; + EditableShortStringTableViewCell *shortStringCell = [[EditableShortStringTableViewCell alloc] init]; + //mock([EditableShortStringTableViewCell class]); + UITextField *textField = [[UITextField alloc] init]; + shortStringCell.textField = textField; + + [given([monstersTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]) willReturn:shortStringCell]; + + _monster.subtype = @"elf"; + _viewController.originalMonster = _monster; + _viewController.monsterTableView = monstersTableView; + [_viewController viewDidLoad]; + [_viewController viewWillAppear:NO]; + + UITableViewCell *cell = [_viewController tableView:monstersTableView cellForRowAtIndexPath:path]; + + XCTAssertNotNil(cell); + + XCTAssertTrue([cell isKindOfClass:[EditableShortStringTableViewCell class]]); + shortStringCell = (EditableShortStringTableViewCell*)cell; + XCTAssertEqualObjects(@"monster.subtype", shortStringCell.identifier); + XCTAssertEqualObjects(@"Subtype", shortStringCell.textField.placeholder); + XCTAssertEqualObjects(@"", shortStringCell.textField.text); + XCTAssertEqual(_viewController, shortStringCell.delegate); +} + +- (void)testEditingSubtype { + UIViewController *destinationVC = mock([UIViewController class]); + UIStoryboardSegue *segue = [UIStoryboardSegue segueWithIdentifier:@"SaveChanges" source:_viewController destination:destinationVC performHandler:^{}]; + + _monster = [[Monster alloc] initWithContext:_context]; + _monster.subtype = @"elf"; + _viewController.originalMonster = _monster; + [_viewController viewDidLoad]; + [_viewController viewWillAppear:NO]; + + [_viewController editableValueDidChange:@"newValue" forIdentifier:@"monster.subtype" andType:@"String"]; + + [_viewController prepareForSegue:segue sender:nil]; + + XCTAssertEqualObjects(@"newValue", _viewController.originalMonster.subtype); +} + +@end From 513e2c35118aaad353c52e4c56872f4fcd353b9c Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 12 Sep 2020 17:39:07 -0700 Subject: [PATCH 045/195] Adds alignment to monsters. Adds tests for editing alignment on monsters. Adds tests for monster meta text when alignment is set. --- MonsterCards/Models/Monster.m | 2 + .../Views/EditMonsterViewController.m | 11 +++- MonsterCardsTests/Models/MonsterTests.m | 58 ++++++++++++++++++- .../Views/EditMonsterViewControllerTests.m | 56 ++++++++++++++---- 4 files changed, 115 insertions(+), 12 deletions(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index d205b39..23c5a16 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -75,6 +75,7 @@ self.size = [jsonRoot objectForKey:@"size"] ?: @""; self.type = [jsonRoot objectForKey:@"type"] ?: @""; self.subtype = [jsonRoot objectForKey:@"tag"] ?: @""; + self.alignment = [jsonRoot objectForKey:@"alignment"] ?: @""; return self; } @@ -338,6 +339,7 @@ self.size = monster.size; self.type = monster.type; self.subtype = monster.subtype; + self.alignment = monster.alignment; } @end diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index abdd8a3..ee58ef1 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -59,7 +59,7 @@ // * Subtype // * Alignment - return 4; + return 5; } - (EditableShortStringTableViewCell*) makeShortStringCellFromCell:(UITableViewCell*)cell { @@ -109,6 +109,13 @@ shortStringCell.textField.text = self.editingMonster.subtype; shortStringCell.textField.placeholder = NSLocalizedString(@"Subtype", @"Placeholder text for the subtype of a monster or NPC."); return shortStringCell; + case 4: + shortStringCell = [self makeShortStringCellFromCell: [self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]]; + shortStringCell.delegate = self; + shortStringCell.identifier = @"monster.alignment"; + shortStringCell.textField.text = self.editingMonster.alignment; + shortStringCell.textField.placeholder = NSLocalizedString(@"Alignment", @"Placeholder text for the alignment of a monster or NPC."); + return shortStringCell; } break; } @@ -128,6 +135,8 @@ self.editingMonster.type = (NSString*)value; } else if ([@"monster.subtype" isEqualToString:identifier]) { self.editingMonster.subtype = (NSString*)value; + } else if ([@"monster.alignment" isEqualToString:identifier]) { + self.editingMonster.alignment = (NSString*)value; } } } diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index b4f83eb..224aa70 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\"}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\"}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -39,6 +39,7 @@ XCTAssertEqualObjects(@"", _monster.size); XCTAssertEqualObjects(@"", _monster.type); XCTAssertEqualObjects(@"", _monster.subtype); + XCTAssertEqualObjects(@"", _monster.alignment); } - (void)testInitWithJSONString { @@ -49,6 +50,7 @@ XCTAssertEqualObjects(@"medium", _monster.size); XCTAssertEqualObjects(@"humanoid", _monster.type); XCTAssertEqualObjects(@"any race", _monster.subtype); + XCTAssertEqualObjects(@"any alignment", _monster.alignment); } - (void)testInitWithEmptyJSONString { @@ -59,6 +61,7 @@ XCTAssertEqualObjects(@"", _monster.size); XCTAssertEqualObjects(@"", _monster.type); XCTAssertEqualObjects(@"", _monster.subtype); + XCTAssertEqualObjects(@"", _monster.alignment); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -68,6 +71,7 @@ XCTAssertEqualObjects(@"medium", _monster.size); XCTAssertEqualObjects(@"humanoid", _monster.type); XCTAssertEqualObjects(@"any race", _monster.subtype); + XCTAssertEqualObjects(@"any alignment", _monster.alignment); } - (void)testNameGetterAndSetter { @@ -94,6 +98,11 @@ XCTAssertEqualObjects(subtype, _monster.subtype); } +- (void)testAlignmentGetterAndSetter { + NSString *alignment = @"chaotic good"; + _monster.alignment = alignment; + XCTAssertEqualObjects(alignment, _monster.alignment); +} - (void)testCopyFromMonster { Monster *otherMonster = [[Monster alloc] initWithJSONString:_jsonString andContext:_context]; [_monster copyFromMonster:otherMonster]; @@ -103,6 +112,7 @@ XCTAssertEqualObjects(@"medium", _monster.size); XCTAssertEqualObjects(@"humanoid", _monster.type); XCTAssertEqualObjects(@"any race", _monster.subtype); + XCTAssertEqualObjects(@"any alignment", _monster.alignment); } - (void)testMetaWithNoFieldsSet { @@ -150,4 +160,50 @@ XCTAssertEqualObjects(@"large humanoid (elf)", _monster.meta); } +- (void)testMetaWithAlignment { + _monster.alignment = @"chaotic good"; + XCTAssertEqualObjects(@"chaotic good", _monster.meta); +} + +- (void)testMetaWithSizeAndAlignment { + _monster.size = @"large"; + _monster.alignment = @"chaotic good"; + XCTAssertEqualObjects(@"large chaotic good", _monster.meta); +} + +- (void)testMetaWithTypeAndAlignment { + _monster.type = @"humanoid"; + _monster.alignment = @"chaotic good"; + XCTAssertEqualObjects(@"humanoid chaotic good", _monster.meta); +} + +- (void)testMetaWithSizeTypeAndAlignment { + _monster.size = @"large"; + _monster.type = @"humanoid"; + _monster.alignment = @"chaotic good"; + XCTAssertEqualObjects(@"large humanoid chaotic good", _monster.meta); +} + +- (void)testMetaWithSizeSubtypeAndAlignment { + _monster.size = @"large"; + _monster.subtype = @"elf"; + _monster.alignment = @"chaotic good"; + XCTAssertEqualObjects(@"large (elf) chaotic good", _monster.meta); +} + +- (void)testMetaWithTypeSubtypeAndAlignment { + _monster.type = @"humanoid"; + _monster.subtype = @"elf"; + _monster.alignment = @"chaotic good"; + XCTAssertEqualObjects(@"humanoid (elf) chaotic good", _monster.meta); +} + +- (void)testMetaWithSizeTypeSubtypeAndAlignment { + _monster.size = @"large"; + _monster.type = @"humanoid"; + _monster.subtype = @"elf"; + _monster.alignment = @"chaotic good"; + XCTAssertEqualObjects(@"large humanoid (elf) chaotic good", _monster.meta); +} + @end diff --git a/MonsterCardsTests/Views/EditMonsterViewControllerTests.m b/MonsterCardsTests/Views/EditMonsterViewControllerTests.m index 49c3cc2..aa3ac76 100644 --- a/MonsterCardsTests/Views/EditMonsterViewControllerTests.m +++ b/MonsterCardsTests/Views/EditMonsterViewControllerTests.m @@ -31,25 +31,16 @@ _appDelegate = mock([AppDelegate class]); _persistentContainer = mock([NSPersistentCloudKitContainer class]); - UIApplication.sharedApplication.delegate = _appDelegate; -// ((AppDelegate*)UIApplication.sharedApplication.delegate).persistentContainer.viewContext = _context; + UIApplication.sharedApplication.delegate = _appDelegate; } - (void)tearDown { } -// UIViewController -// UITableViewDelegate -// UITableViewDataSource -// EditableShortStringDeletgate -// Monster *originalMonster -// UITableView *monsterTableView - - (void)testRendersSubtypeCell { UITableView *monstersTableView = mock([UITableView class]); NSIndexPath *path = [NSIndexPath indexPathForRow:3 inSection:0]; EditableShortStringTableViewCell *shortStringCell = [[EditableShortStringTableViewCell alloc] init]; - //mock([EditableShortStringTableViewCell class]); UITextField *textField = [[UITextField alloc] init]; shortStringCell.textField = textField; @@ -90,4 +81,49 @@ XCTAssertEqualObjects(@"newValue", _viewController.originalMonster.subtype); } +- (void)testRendersAlignmentCell { + UITableView *monstersTableView = mock([UITableView class]); + NSIndexPath *path = [NSIndexPath indexPathForRow:4 inSection:0]; + EditableShortStringTableViewCell *shortStringCell = [[EditableShortStringTableViewCell alloc] init]; + UITextField *textField = [[UITextField alloc] init]; + shortStringCell.textField = textField; + + [given([monstersTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]) willReturn:shortStringCell]; + + _monster.alignment = @"chaotic good"; + _viewController.originalMonster = _monster; + _viewController.monsterTableView = monstersTableView; + [_viewController viewDidLoad]; + [_viewController viewWillAppear:NO]; + + UITableViewCell *cell = [_viewController tableView:monstersTableView cellForRowAtIndexPath:path]; + + XCTAssertNotNil(cell); + + XCTAssertTrue([cell isKindOfClass:[EditableShortStringTableViewCell class]]); + shortStringCell = (EditableShortStringTableViewCell*)cell; + XCTAssertEqualObjects(@"monster.alignment", shortStringCell.identifier); + XCTAssertEqualObjects(@"Alignment", shortStringCell.textField.placeholder); + XCTAssertEqualObjects(@"", shortStringCell.textField.text); + XCTAssertEqual(_viewController, shortStringCell.delegate); +} + +- (void)testEditingAlignment { + UIViewController *destinationVC = mock([UIViewController class]); + UIStoryboardSegue *segue = [UIStoryboardSegue segueWithIdentifier:@"SaveChanges" source:_viewController destination:destinationVC performHandler:^{}]; + + _monster = [[Monster alloc] initWithContext:_context]; + _monster.alignment = @"chaotic good"; + _viewController.originalMonster = _monster; + [_viewController viewDidLoad]; + [_viewController viewWillAppear:NO]; + + [_viewController editableValueDidChange:@"newValue" forIdentifier:@"monster.alignment" andType:@"String"]; + + [_viewController prepareForSegue:segue sender:nil]; + + XCTAssertEqualObjects(@"newValue", _viewController.originalMonster.alignment); +} + + @end From 2fd50a9f68c1c89ec81838c89ffac09135fd693e Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 02:47:58 -0700 Subject: [PATCH 046/195] Adds abilityModifierForScore and tests. --- MonsterCards/Models/Monster.m | 2 +- MonsterCardsTests/Models/MonsterTests.m | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 23c5a16..6f2eb1d 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -44,7 +44,7 @@ @synthesize wisdomScore; +(int)abilityModifierForScore: (int)score { - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + return (int)floor((score - 10) / 2.0); } +(int)hitDieForSize: (NSString*)size{ diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index 224aa70..8324113 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -206,4 +206,29 @@ XCTAssertEqualObjects(@"large humanoid (elf) chaotic good", _monster.meta); } +- (void)testAbilityModifierForScore { + XCTAssertEqual(-6, [Monster abilityModifierForScore:-1]); + XCTAssertEqual(-5, [Monster abilityModifierForScore:0]); + XCTAssertEqual(-5, [Monster abilityModifierForScore:1]); + XCTAssertEqual(-4, [Monster abilityModifierForScore:2]); + XCTAssertEqual(-4, [Monster abilityModifierForScore:3]); + XCTAssertEqual(-3, [Monster abilityModifierForScore:4]); + XCTAssertEqual(-3, [Monster abilityModifierForScore:5]); + XCTAssertEqual(-2, [Monster abilityModifierForScore:6]); + XCTAssertEqual(-2, [Monster abilityModifierForScore:7]); + XCTAssertEqual(-1, [Monster abilityModifierForScore:8]); + XCTAssertEqual(-1, [Monster abilityModifierForScore:9]); + XCTAssertEqual(0, [Monster abilityModifierForScore:10]); + XCTAssertEqual(0, [Monster abilityModifierForScore:11]); + XCTAssertEqual(1, [Monster abilityModifierForScore:12]); + XCTAssertEqual(1, [Monster abilityModifierForScore:13]); + XCTAssertEqual(2, [Monster abilityModifierForScore:14]); + XCTAssertEqual(2, [Monster abilityModifierForScore:15]); + XCTAssertEqual(3, [Monster abilityModifierForScore:16]); + XCTAssertEqual(3, [Monster abilityModifierForScore:17]); + XCTAssertEqual(4, [Monster abilityModifierForScore:18]); + XCTAssertEqual(4, [Monster abilityModifierForScore:19]); + XCTAssertEqual(5, [Monster abilityModifierForScore:20]); +} + @end From 91a99a5df3d084009a932b005f041b0efbc14ecb Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 03:16:32 -0700 Subject: [PATCH 047/195] Adds strengthScore and strengthModifier to Monster. Adds tests for strengthScore and strengthModifier. --- MonsterCards/Models/Monster.m | 8 +++++++- MonsterCardsTests/Models/MonsterTests.m | 23 ++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 6f2eb1d..de885cd 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -70,12 +70,17 @@ self = [self initWithContext:context]; NSDictionary *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; + NSNumber *tempNumber; self.name = [jsonRoot objectForKey:@"name"] ?: @""; self.size = [jsonRoot objectForKey:@"size"] ?: @""; self.type = [jsonRoot objectForKey:@"type"] ?: @""; self.subtype = [jsonRoot objectForKey:@"tag"] ?: @""; self.alignment = [jsonRoot objectForKey:@"alignment"] ?: @""; + tempNumber = [jsonRoot objectForKey:@"strPoints"]; + if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { + self.strengthScore = tempNumber.intValue; + } return self; } @@ -120,7 +125,7 @@ } -(int)strengthModifier { - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + return [Monster abilityModifierForScore:self.strengthScore]; } -(int)dexterityModifier { @@ -340,6 +345,7 @@ self.type = monster.type; self.subtype = monster.subtype; self.alignment = monster.alignment; + self.strengthScore = monster.strengthScore; } @end diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index 8324113..9e6de72 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\"}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -40,6 +40,7 @@ XCTAssertEqualObjects(@"", _monster.type); XCTAssertEqualObjects(@"", _monster.subtype); XCTAssertEqualObjects(@"", _monster.alignment); + XCTAssertEqual(0, _monster.strengthScore); } - (void)testInitWithJSONString { @@ -51,6 +52,7 @@ XCTAssertEqualObjects(@"humanoid", _monster.type); XCTAssertEqualObjects(@"any race", _monster.subtype); XCTAssertEqualObjects(@"any alignment", _monster.alignment); + XCTAssertEqual(8, _monster.strengthScore); } - (void)testInitWithEmptyJSONString { @@ -62,6 +64,7 @@ XCTAssertEqualObjects(@"", _monster.type); XCTAssertEqualObjects(@"", _monster.subtype); XCTAssertEqualObjects(@"", _monster.alignment); + XCTAssertEqual(0, _monster.strengthScore); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -72,6 +75,7 @@ XCTAssertEqualObjects(@"humanoid", _monster.type); XCTAssertEqualObjects(@"any race", _monster.subtype); XCTAssertEqualObjects(@"any alignment", _monster.alignment); + XCTAssertEqual(8, _monster.strengthScore); } - (void)testNameGetterAndSetter { @@ -113,6 +117,7 @@ XCTAssertEqualObjects(@"humanoid", _monster.type); XCTAssertEqualObjects(@"any race", _monster.subtype); XCTAssertEqualObjects(@"any alignment", _monster.alignment); + XCTAssertEqual(8, _monster.strengthScore); } - (void)testMetaWithNoFieldsSet { @@ -231,4 +236,20 @@ XCTAssertEqual(5, [Monster abilityModifierForScore:20]); } +- (void)testStrengthScoreGetterAndSetter { + _monster.strengthScore = 11; + XCTAssertEqual(11, _monster.strengthScore); +} + +- (void)testStrengthModifier { + _monster.strengthScore = 9; + XCTAssertEqual(-1, _monster.strengthModifier); + + _monster.strengthScore = 10; + XCTAssertEqual(0, _monster.strengthModifier); + + _monster.strengthScore = 12; + XCTAssertEqual(1, _monster.strengthModifier); +} + @end From d3dd60fb2c31bcf61ba85f417c0eb6dc26f22b64 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 03:26:23 -0700 Subject: [PATCH 048/195] Adds dexterityScore and dexterityModifier to Monster. Adds tests for dexterityScore and dexterityModifier. --- MonsterCards/Models/Monster.m | 8 ++++++-- MonsterCardsTests/Models/MonsterTests.m | 23 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index de885cd..1985458 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -81,7 +81,10 @@ if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { self.strengthScore = tempNumber.intValue; } - + tempNumber = [jsonRoot objectForKey:@"dexPoints"]; + if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { + self.dexterityScore = tempNumber.intValue; + } return self; } @@ -129,7 +132,7 @@ } -(int)dexterityModifier { - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + return [Monster abilityModifierForScore:self.dexterityScore]; } -(int)constitutionModifier { @@ -346,6 +349,7 @@ self.subtype = monster.subtype; self.alignment = monster.alignment; self.strengthScore = monster.strengthScore; + self.dexterityScore = monster.dexterityScore; } @end diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index 9e6de72..440b046 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -41,6 +41,7 @@ XCTAssertEqualObjects(@"", _monster.subtype); XCTAssertEqualObjects(@"", _monster.alignment); XCTAssertEqual(0, _monster.strengthScore); + XCTAssertEqual(0, _monster.dexterityScore); } - (void)testInitWithJSONString { @@ -53,6 +54,7 @@ XCTAssertEqualObjects(@"any race", _monster.subtype); XCTAssertEqualObjects(@"any alignment", _monster.alignment); XCTAssertEqual(8, _monster.strengthScore); + XCTAssertEqual(10, _monster.dexterityScore); } - (void)testInitWithEmptyJSONString { @@ -65,6 +67,7 @@ XCTAssertEqualObjects(@"", _monster.subtype); XCTAssertEqualObjects(@"", _monster.alignment); XCTAssertEqual(0, _monster.strengthScore); + XCTAssertEqual(0, _monster.dexterityScore); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -76,6 +79,7 @@ XCTAssertEqualObjects(@"any race", _monster.subtype); XCTAssertEqualObjects(@"any alignment", _monster.alignment); XCTAssertEqual(8, _monster.strengthScore); + XCTAssertEqual(10, _monster.dexterityScore); } - (void)testNameGetterAndSetter { @@ -118,6 +122,7 @@ XCTAssertEqualObjects(@"any race", _monster.subtype); XCTAssertEqualObjects(@"any alignment", _monster.alignment); XCTAssertEqual(8, _monster.strengthScore); + XCTAssertEqual(10, _monster.dexterityScore); } - (void)testMetaWithNoFieldsSet { @@ -252,4 +257,20 @@ XCTAssertEqual(1, _monster.strengthModifier); } +- (void)testDexterityScoreGetterAndSetter { + _monster.dexterityScore = 11; + XCTAssertEqual(11, _monster.dexterityScore); +} + +- (void)testDexterityModifier { + _monster.dexterityScore = 9; + XCTAssertEqual(-1, _monster.dexterityModifier); + + _monster.dexterityScore = 10; + XCTAssertEqual(0, _monster.dexterityModifier); + + _monster.dexterityScore = 12; + XCTAssertEqual(1, _monster.dexterityModifier); +} + @end From 26f92e43f619fbeea0afebe63c10c0150f6346c6 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 03:29:01 -0700 Subject: [PATCH 049/195] Adds constitutionScore and constitutionModifier to Monster. Adds tests for constitutionScore and constitutionModifier. --- MonsterCards/Models/Monster.m | 7 ++++++- MonsterCardsTests/Models/MonsterTests.m | 23 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 1985458..3d2159f 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -85,6 +85,10 @@ if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { self.dexterityScore = tempNumber.intValue; } + tempNumber = [jsonRoot objectForKey:@"conPoints"]; + if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { + self.constitutionScore = tempNumber.intValue; + } return self; } @@ -136,7 +140,7 @@ } -(int)constitutionModifier { - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + return [Monster abilityModifierForScore:self.constitutionScore]; } -(int)intelligenceModifier { @@ -350,6 +354,7 @@ self.alignment = monster.alignment; self.strengthScore = monster.strengthScore; self.dexterityScore = monster.dexterityScore; + self.constitutionScore = monster.constitutionScore; } @end diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index 440b046..c6a76af 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -42,6 +42,7 @@ XCTAssertEqualObjects(@"", _monster.alignment); XCTAssertEqual(0, _monster.strengthScore); XCTAssertEqual(0, _monster.dexterityScore); + XCTAssertEqual(0, _monster.constitutionScore); } - (void)testInitWithJSONString { @@ -55,6 +56,7 @@ XCTAssertEqualObjects(@"any alignment", _monster.alignment); XCTAssertEqual(8, _monster.strengthScore); XCTAssertEqual(10, _monster.dexterityScore); + XCTAssertEqual(12, _monster.constitutionScore); } - (void)testInitWithEmptyJSONString { @@ -68,6 +70,7 @@ XCTAssertEqualObjects(@"", _monster.alignment); XCTAssertEqual(0, _monster.strengthScore); XCTAssertEqual(0, _monster.dexterityScore); + XCTAssertEqual(0, _monster.constitutionScore); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -80,6 +83,7 @@ XCTAssertEqualObjects(@"any alignment", _monster.alignment); XCTAssertEqual(8, _monster.strengthScore); XCTAssertEqual(10, _monster.dexterityScore); + XCTAssertEqual(12, _monster.constitutionScore); } - (void)testNameGetterAndSetter { @@ -123,6 +127,7 @@ XCTAssertEqualObjects(@"any alignment", _monster.alignment); XCTAssertEqual(8, _monster.strengthScore); XCTAssertEqual(10, _monster.dexterityScore); + XCTAssertEqual(12, _monster.constitutionScore); } - (void)testMetaWithNoFieldsSet { @@ -273,4 +278,20 @@ XCTAssertEqual(1, _monster.dexterityModifier); } +- (void)testConstitutionScoreGetterAndSetter { + _monster.constitutionScore = 11; + XCTAssertEqual(11, _monster.constitutionScore); +} + +- (void)testConstitutionModifier { + _monster.constitutionScore = 9; + XCTAssertEqual(-1, _monster.constitutionModifier); + + _monster.constitutionScore = 10; + XCTAssertEqual(0, _monster.constitutionModifier); + + _monster.constitutionScore = 12; + XCTAssertEqual(1, _monster.constitutionModifier); +} + @end From 05b3ad12802eb652b00a94b6d3e5abf8a8d66992 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 03:31:21 -0700 Subject: [PATCH 050/195] Adds intelligenceScore and intelligenceModifier to Monster. Adds tests for intelligenceScore and intelligenceModifier. --- MonsterCards/Models/Monster.m | 7 ++++++- MonsterCardsTests/Models/MonsterTests.m | 23 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 3d2159f..b32b45b 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -89,6 +89,10 @@ if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { self.constitutionScore = tempNumber.intValue; } + tempNumber = [jsonRoot objectForKey:@"intPoints"]; + if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { + self.intelligenceScore = tempNumber.intValue; + } return self; } @@ -144,7 +148,7 @@ } -(int)intelligenceModifier { - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + return [Monster abilityModifierForScore:self.intelligenceScore]; } -(int)wisdomModifier { @@ -355,6 +359,7 @@ self.strengthScore = monster.strengthScore; self.dexterityScore = monster.dexterityScore; self.constitutionScore = monster.constitutionScore; + self.intelligenceScore = monster.intelligenceScore; } @end diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index c6a76af..d97eb2e 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -43,6 +43,7 @@ XCTAssertEqual(0, _monster.strengthScore); XCTAssertEqual(0, _monster.dexterityScore); XCTAssertEqual(0, _monster.constitutionScore); + XCTAssertEqual(0, _monster.intelligenceScore); } - (void)testInitWithJSONString { @@ -57,6 +58,7 @@ XCTAssertEqual(8, _monster.strengthScore); XCTAssertEqual(10, _monster.dexterityScore); XCTAssertEqual(12, _monster.constitutionScore); + XCTAssertEqual(14, _monster.intelligenceScore); } - (void)testInitWithEmptyJSONString { @@ -71,6 +73,7 @@ XCTAssertEqual(0, _monster.strengthScore); XCTAssertEqual(0, _monster.dexterityScore); XCTAssertEqual(0, _monster.constitutionScore); + XCTAssertEqual(0, _monster.intelligenceScore); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -84,6 +87,7 @@ XCTAssertEqual(8, _monster.strengthScore); XCTAssertEqual(10, _monster.dexterityScore); XCTAssertEqual(12, _monster.constitutionScore); + XCTAssertEqual(14, _monster.intelligenceScore); } - (void)testNameGetterAndSetter { @@ -128,6 +132,7 @@ XCTAssertEqual(8, _monster.strengthScore); XCTAssertEqual(10, _monster.dexterityScore); XCTAssertEqual(12, _monster.constitutionScore); + XCTAssertEqual(14, _monster.intelligenceScore); } - (void)testMetaWithNoFieldsSet { @@ -294,4 +299,20 @@ XCTAssertEqual(1, _monster.constitutionModifier); } +- (void)testIntelligenceScoreGetterAndSetter { + _monster.intelligenceScore = 11; + XCTAssertEqual(11, _monster.intelligenceScore); +} + +- (void)testIntelligenceModifier { + _monster.intelligenceScore = 9; + XCTAssertEqual(-1, _monster.intelligenceModifier); + + _monster.intelligenceScore = 10; + XCTAssertEqual(0, _monster.intelligenceModifier); + + _monster.intelligenceScore = 12; + XCTAssertEqual(1, _monster.intelligenceModifier); +} + @end From a26031a04fb6015faab9296c9cb4c852ae45840e Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 03:33:14 -0700 Subject: [PATCH 051/195] Adds wisdomScore and wisdomModifier to Monster. Adds tests for wisdomScore and wisdomModifier. --- MonsterCards/Models/Monster.m | 7 ++++++- MonsterCardsTests/Models/MonsterTests.m | 23 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index b32b45b..7ef69a3 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -93,6 +93,10 @@ if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { self.intelligenceScore = tempNumber.intValue; } + tempNumber = [jsonRoot objectForKey:@"wisPoints"]; + if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { + self.wisdomScore = tempNumber.intValue; + } return self; } @@ -152,7 +156,7 @@ } -(int)wisdomModifier { - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + return [Monster abilityModifierForScore:self.wisdomScore]; } -(int)charismaModifier { @@ -360,6 +364,7 @@ self.dexterityScore = monster.dexterityScore; self.constitutionScore = monster.constitutionScore; self.intelligenceScore = monster.intelligenceScore; + self.wisdomScore = monster.wisdomScore; } @end diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index d97eb2e..0464b24 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14,\"wisPoints\":16}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -44,6 +44,7 @@ XCTAssertEqual(0, _monster.dexterityScore); XCTAssertEqual(0, _monster.constitutionScore); XCTAssertEqual(0, _monster.intelligenceScore); + XCTAssertEqual(0, _monster.wisdomScore); } - (void)testInitWithJSONString { @@ -59,6 +60,7 @@ XCTAssertEqual(10, _monster.dexterityScore); XCTAssertEqual(12, _monster.constitutionScore); XCTAssertEqual(14, _monster.intelligenceScore); + XCTAssertEqual(16, _monster.wisdomScore); } - (void)testInitWithEmptyJSONString { @@ -74,6 +76,7 @@ XCTAssertEqual(0, _monster.dexterityScore); XCTAssertEqual(0, _monster.constitutionScore); XCTAssertEqual(0, _monster.intelligenceScore); + XCTAssertEqual(0, _monster.wisdomScore); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -88,6 +91,7 @@ XCTAssertEqual(10, _monster.dexterityScore); XCTAssertEqual(12, _monster.constitutionScore); XCTAssertEqual(14, _monster.intelligenceScore); + XCTAssertEqual(16, _monster.wisdomScore); } - (void)testNameGetterAndSetter { @@ -133,6 +137,7 @@ XCTAssertEqual(10, _monster.dexterityScore); XCTAssertEqual(12, _monster.constitutionScore); XCTAssertEqual(14, _monster.intelligenceScore); + XCTAssertEqual(16, _monster.wisdomScore); } - (void)testMetaWithNoFieldsSet { @@ -315,4 +320,20 @@ XCTAssertEqual(1, _monster.intelligenceModifier); } +- (void)testWisdomScoreGetterAndSetter { + _monster.wisdomScore = 11; + XCTAssertEqual(11, _monster.wisdomScore); +} + +- (void)testWisdomModifier { + _monster.wisdomScore = 9; + XCTAssertEqual(-1, _monster.wisdomModifier); + + _monster.wisdomScore = 10; + XCTAssertEqual(0, _monster.wisdomModifier); + + _monster.wisdomScore = 12; + XCTAssertEqual(1, _monster.wisdomModifier); +} + @end From e541fdcae37d5cd149726483e853359aec04710a Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 03:39:55 -0700 Subject: [PATCH 052/195] Adds charismaScore and charismaModifier to Monster. Adds tests for charismaScore and charismaModifier. --- MonsterCards/Models/Monster.m | 9 ++++++++- MonsterCardsTests/Models/MonsterTests.m | 23 ++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 7ef69a3..89df28f 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -97,6 +97,11 @@ if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { self.wisdomScore = tempNumber.intValue; } + tempNumber = [jsonRoot objectForKey:@"chaPoints"]; + if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { + self.charismaScore = tempNumber.intValue; + } + return self; } @@ -160,9 +165,10 @@ } -(int)charismaModifier { - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + return [Monster abilityModifierForScore:self.charismaScore]; } + //getArmorClass -(NSString*)armorClassDescription { @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; @@ -365,6 +371,7 @@ self.constitutionScore = monster.constitutionScore; self.intelligenceScore = monster.intelligenceScore; self.wisdomScore = monster.wisdomScore; + self.charismaScore = monster.charismaScore; } @end diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index 0464b24..e84c616 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14,\"wisPoints\":16}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14,\"wisPoints\":16,\"chaPoints\":18}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -45,6 +45,7 @@ XCTAssertEqual(0, _monster.constitutionScore); XCTAssertEqual(0, _monster.intelligenceScore); XCTAssertEqual(0, _monster.wisdomScore); + XCTAssertEqual(0, _monster.charismaScore); } - (void)testInitWithJSONString { @@ -61,6 +62,7 @@ XCTAssertEqual(12, _monster.constitutionScore); XCTAssertEqual(14, _monster.intelligenceScore); XCTAssertEqual(16, _monster.wisdomScore); + XCTAssertEqual(18, _monster.charismaScore); } - (void)testInitWithEmptyJSONString { @@ -77,6 +79,7 @@ XCTAssertEqual(0, _monster.constitutionScore); XCTAssertEqual(0, _monster.intelligenceScore); XCTAssertEqual(0, _monster.wisdomScore); + XCTAssertEqual(0, _monster.charismaScore); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -92,6 +95,7 @@ XCTAssertEqual(12, _monster.constitutionScore); XCTAssertEqual(14, _monster.intelligenceScore); XCTAssertEqual(16, _monster.wisdomScore); + XCTAssertEqual(18, _monster.charismaScore); } - (void)testNameGetterAndSetter { @@ -138,6 +142,7 @@ XCTAssertEqual(12, _monster.constitutionScore); XCTAssertEqual(14, _monster.intelligenceScore); XCTAssertEqual(16, _monster.wisdomScore); + XCTAssertEqual(18, _monster.charismaScore); } - (void)testMetaWithNoFieldsSet { @@ -336,4 +341,20 @@ XCTAssertEqual(1, _monster.wisdomModifier); } +- (void)testCharismaScoreGetterAndSetter { + _monster.charismaScore = 11; + XCTAssertEqual(11, _monster.charismaScore); +} + +- (void)testCharismaModifier { + _monster.charismaScore = 9; + XCTAssertEqual(-1, _monster.charismaModifier); + + _monster.charismaScore = 10; + XCTAssertEqual(0, _monster.charismaModifier); + + _monster.charismaScore = 12; + XCTAssertEqual(1, _monster.charismaModifier); +} + @end From a6f048cc2d28567d9618f1d833d8e52c27edb386 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 04:03:30 -0700 Subject: [PATCH 053/195] Moves ability scores to Core Data entity. --- MonsterCards/Models/Monster.h | 6 ------ MonsterCards/Models/Monster.m | 6 ------ .../MonsterCards.xcdatamodel/contents | 8 +++++++- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index b4bbcf6..4f6ad6f 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -39,12 +39,6 @@ NS_ASSUME_NONNULL_BEGIN @property NSString *truesightDistance; @property NSString *understandsBut; -@property int strengthScore; -@property int dexterityScore; -@property int constitutionScore; -@property int intelligenceScore; -@property int wisdomScore; -@property int charismaScore; @property int shieldBonus; @property int naturalArmorBonus; @property int hitDice; diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 89df28f..9f0a398 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -15,33 +15,27 @@ @synthesize blindsightDistance; @synthesize burrowSpeed; @synthesize challengeRating; -@synthesize charismaScore; @synthesize climbSpeed; -@synthesize constitutionScore; @synthesize customChallengeRating; @synthesize customHP; @synthesize customProficiencyBonus; @synthesize customSpeed; @synthesize customSpeedDescription; @synthesize darkvisionDistance; -@synthesize dexterityScore; @synthesize flySpeed; @synthesize hitDice; @synthesize hover; @synthesize hpText; -@synthesize intelligenceScore; @synthesize isBlind; @synthesize naturalArmorBonus; @synthesize otherArmorDescription; @synthesize shieldBonus; @synthesize speed; -@synthesize strengthScore; @synthesize swimSpeed; @synthesize telepathy; @synthesize tremorsenseDistance; @synthesize truesightDistance; @synthesize understandsBut; -@synthesize wisdomScore; +(int)abilityModifierForScore: (int)score { return (int)floor((score - 10) / 2.0); diff --git a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents index 928c297..d6bd62e 100644 --- a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents +++ b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents @@ -2,12 +2,18 @@ + + + + + + - + \ No newline at end of file From 5aa88932f74405480ee5d89464272e2f5aa0f2e1 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 04:15:17 -0700 Subject: [PATCH 054/195] Adds armorName to Monster entity. Adds tests for armorName. --- MonsterCards/Models/Monster.h | 1 - MonsterCards/Models/Monster.m | 3 ++- .../MonsterCards.xcdatamodel/contents | 3 ++- MonsterCardsTests/Models/MonsterTests.m | 12 +++++++++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index 4f6ad6f..d8afc72 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -21,7 +21,6 @@ NS_ASSUME_NONNULL_BEGIN @interface Monster : NSManagedObject -@property NSString *armorName; @property NSString *otherArmorDescription; @property NSString *hpText; @property NSString *speed; diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 9f0a398..69c77e8 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -11,7 +11,6 @@ @implementation Monster -@synthesize armorName; @synthesize blindsightDistance; @synthesize burrowSpeed; @synthesize challengeRating; @@ -71,6 +70,7 @@ self.type = [jsonRoot objectForKey:@"type"] ?: @""; self.subtype = [jsonRoot objectForKey:@"tag"] ?: @""; self.alignment = [jsonRoot objectForKey:@"alignment"] ?: @""; + self.armorName = [jsonRoot objectForKey:@"armorName"] ?: @""; tempNumber = [jsonRoot objectForKey:@"strPoints"]; if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { self.strengthScore = tempNumber.intValue; @@ -366,6 +366,7 @@ self.intelligenceScore = monster.intelligenceScore; self.wisdomScore = monster.wisdomScore; self.charismaScore = monster.charismaScore; + self.armorName = monster.armorName; } @end diff --git a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents index d6bd62e..d2b1834 100644 --- a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents +++ b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents @@ -2,6 +2,7 @@ + @@ -14,6 +15,6 @@ - + \ No newline at end of file diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index e84c616..3034547 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14,\"wisPoints\":16,\"chaPoints\":18}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14,\"wisPoints\":16,\"chaPoints\":18,\"armorName\":\"none\"}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -46,6 +46,7 @@ XCTAssertEqual(0, _monster.intelligenceScore); XCTAssertEqual(0, _monster.wisdomScore); XCTAssertEqual(0, _monster.charismaScore); + XCTAssertEqualObjects(@"", _monster.armorName); } - (void)testInitWithJSONString { @@ -63,6 +64,7 @@ XCTAssertEqual(14, _monster.intelligenceScore); XCTAssertEqual(16, _monster.wisdomScore); XCTAssertEqual(18, _monster.charismaScore); + XCTAssertEqualObjects(@"none", _monster.armorName); } - (void)testInitWithEmptyJSONString { @@ -80,6 +82,7 @@ XCTAssertEqual(0, _monster.intelligenceScore); XCTAssertEqual(0, _monster.wisdomScore); XCTAssertEqual(0, _monster.charismaScore); + XCTAssertEqualObjects(@"", _monster.armorName); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -96,6 +99,7 @@ XCTAssertEqual(14, _monster.intelligenceScore); XCTAssertEqual(16, _monster.wisdomScore); XCTAssertEqual(18, _monster.charismaScore); + XCTAssertEqualObjects(@"none", _monster.armorName); } - (void)testNameGetterAndSetter { @@ -143,6 +147,7 @@ XCTAssertEqual(14, _monster.intelligenceScore); XCTAssertEqual(16, _monster.wisdomScore); XCTAssertEqual(18, _monster.charismaScore); + XCTAssertEqualObjects(@"none", _monster.armorName); } - (void)testMetaWithNoFieldsSet { @@ -357,4 +362,9 @@ XCTAssertEqual(1, _monster.charismaModifier); } +- (void)testGetterAndSetterForArmorName { + _monster.armorName = @"dandelion"; + XCTAssertEqualObjects(_monster.armorName, @"dandelion"); +} + @end From bead4f8ee5c59374152ff365c6ce5f85e0408183 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 04:25:08 -0700 Subject: [PATCH 055/195] Adds otherArmorDescription to Monster entity. Adds tests for otherArmorDescription. --- MonsterCards/Models/Monster.h | 1 - MonsterCards/Models/Monster.m | 3 ++- .../MonsterCards.xcdatamodel/contents | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index d8afc72..d7884f9 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -21,7 +21,6 @@ NS_ASSUME_NONNULL_BEGIN @interface Monster : NSManagedObject -@property NSString *otherArmorDescription; @property NSString *hpText; @property NSString *speed; @property NSString *burrowSpeed; diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 69c77e8..634f197 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -27,7 +27,6 @@ @synthesize hpText; @synthesize isBlind; @synthesize naturalArmorBonus; -@synthesize otherArmorDescription; @synthesize shieldBonus; @synthesize speed; @synthesize swimSpeed; @@ -71,6 +70,7 @@ self.subtype = [jsonRoot objectForKey:@"tag"] ?: @""; self.alignment = [jsonRoot objectForKey:@"alignment"] ?: @""; self.armorName = [jsonRoot objectForKey:@"armorName"] ?: @""; + self.otherArmorDescription = [jsonRoot objectForKey:@"otherArmorDesc"] ?: @""; tempNumber = [jsonRoot objectForKey:@"strPoints"]; if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { self.strengthScore = tempNumber.intValue; @@ -367,6 +367,7 @@ self.wisdomScore = monster.wisdomScore; self.charismaScore = monster.charismaScore; self.armorName = monster.armorName; + self.otherArmorDescription = monster.otherArmorDescription; } @end diff --git a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents index d2b1834..9ae689f 100644 --- a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents +++ b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents @@ -8,6 +8,7 @@ + @@ -15,6 +16,6 @@ - + \ No newline at end of file From 3e93aa59b4429fa1dfd92b91fda792c4c819f29b Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 04:35:49 -0700 Subject: [PATCH 056/195] Adds shieldBonus to Monster entity. Adds tests for shieldBonus. --- MonsterCards/Models/Monster.h | 1 - MonsterCards/Models/Monster.m | 6 +++++- .../MonsterCards.xcdatamodel/contents | 3 ++- MonsterCardsTests/Models/MonsterTests.m | 19 +++++++++++++++++-- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index d7884f9..6b36c20 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -37,7 +37,6 @@ NS_ASSUME_NONNULL_BEGIN @property NSString *truesightDistance; @property NSString *understandsBut; -@property int shieldBonus; @property int naturalArmorBonus; @property int hitDice; @property int customProficiencyBonus; diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 634f197..24becdf 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -27,7 +27,6 @@ @synthesize hpText; @synthesize isBlind; @synthesize naturalArmorBonus; -@synthesize shieldBonus; @synthesize speed; @synthesize swimSpeed; @synthesize telepathy; @@ -95,6 +94,10 @@ if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { self.charismaScore = tempNumber.intValue; } + tempNumber = [jsonRoot objectForKey:@"shieldBonus"]; + if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { + self.shieldBonus = tempNumber.intValue; + } return self; } @@ -368,6 +371,7 @@ self.charismaScore = monster.charismaScore; self.armorName = monster.armorName; self.otherArmorDescription = monster.otherArmorDescription; + self.shieldBonus = monster.shieldBonus; } @end diff --git a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents index 9ae689f..3d90d75 100644 --- a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents +++ b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents @@ -9,6 +9,7 @@ + @@ -16,6 +17,6 @@ - + \ No newline at end of file diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index 3034547..61285fc 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14,\"wisPoints\":16,\"chaPoints\":18,\"armorName\":\"none\"}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14,\"wisPoints\":16,\"chaPoints\":18,\"armorName\":\"none\",\"otherArmorDesc\":\"10\",\"shieldBonus\":2}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -47,6 +47,8 @@ XCTAssertEqual(0, _monster.wisdomScore); XCTAssertEqual(0, _monster.charismaScore); XCTAssertEqualObjects(@"", _monster.armorName); + XCTAssertEqualObjects(@"", _monster.otherArmorDescription); + XCTAssertEqual(0, _monster.shieldBonus); } - (void)testInitWithJSONString { @@ -65,6 +67,8 @@ XCTAssertEqual(16, _monster.wisdomScore); XCTAssertEqual(18, _monster.charismaScore); XCTAssertEqualObjects(@"none", _monster.armorName); + XCTAssertEqualObjects(@"10", _monster.otherArmorDescription); + XCTAssertEqual(2, _monster.shieldBonus); } - (void)testInitWithEmptyJSONString { @@ -83,6 +87,8 @@ XCTAssertEqual(0, _monster.wisdomScore); XCTAssertEqual(0, _monster.charismaScore); XCTAssertEqualObjects(@"", _monster.armorName); + XCTAssertEqualObjects(@"", _monster.otherArmorDescription); + XCTAssertEqual(0, _monster.shieldBonus); } - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -100,6 +106,8 @@ XCTAssertEqual(16, _monster.wisdomScore); XCTAssertEqual(18, _monster.charismaScore); XCTAssertEqualObjects(@"none", _monster.armorName); + XCTAssertEqualObjects(@"10", _monster.otherArmorDescription); + XCTAssertEqual(2, _monster.shieldBonus); } - (void)testNameGetterAndSetter { @@ -148,6 +156,8 @@ XCTAssertEqual(16, _monster.wisdomScore); XCTAssertEqual(18, _monster.charismaScore); XCTAssertEqualObjects(@"none", _monster.armorName); + XCTAssertEqualObjects(@"10", _monster.otherArmorDescription); + XCTAssertEqual(2, _monster.shieldBonus); } - (void)testMetaWithNoFieldsSet { @@ -364,7 +374,12 @@ - (void)testGetterAndSetterForArmorName { _monster.armorName = @"dandelion"; - XCTAssertEqualObjects(_monster.armorName, @"dandelion"); + XCTAssertEqualObjects(@"dandelion", _monster.armorName); +} + +- (void)testGetterAndSetterForOtherArmorDescription { + _monster.otherArmorDescription = @"green"; + XCTAssertEqualObjects(@"green", _monster.otherArmorDescription); } @end From 4ff6a28c67d08ffad2395162378bd6ba18d4026b Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 04:37:39 -0700 Subject: [PATCH 057/195] Adds armorClassDescription to Monster. --- MonsterCards/Models/Monster.m | 101 +++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 24becdf..e65233b 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -165,10 +165,109 @@ return [Monster abilityModifierForScore:self.charismaScore]; } +const int kArmorClassUnarmored = 10; +const int kArmorClassMageArmor = kArmorClassUnarmored + 3; +const int kArmorClassPadded = kArmorClassUnarmored + 1; +const int kArmorClassLeather = kArmorClassUnarmored + 1; +const int kArmorClassStudded = kArmorClassUnarmored + 2; +const int kArmorClassHide = kArmorClassUnarmored + 2; +const int kArmorClassChainShirt = kArmorClassUnarmored + 3; +const int kArmorClassScaleMail = kArmorClassUnarmored + 4; +const int kArmorClassBreastplate = kArmorClassUnarmored + 4; +const int kArmorClassHalfPlate = kArmorClassUnarmored + 5; +const int kArmorClassRingMail = kArmorClassUnarmored + 4; +const int kArmorClassChainMail = kArmorClassUnarmored + 6; +const int kArmorClassSplintMail = kArmorClassUnarmored + 7; +const int kArmorClassPlate = kArmorClassUnarmored + 8; + +NSString const *kArmorNameNone = @"none"; +NSString const *kArmorNameNaturalArmor = @"natural armor"; +NSString const *kArmorNameMageArmor = @"mage armor"; +NSString const *kArmorNamePadded = @"padded"; +NSString const *kArmorNameLeather = @"leather"; +NSString const *kArmorNameStuddedLeather = @"studded"; +NSString const *kArmorNameHide = @"hide"; +NSString const *kArmorNameChainShirt = @"chain shirt"; +NSString const *kArmorNameScaleMail = @"scale mail"; +NSString const *kArmorNameBreastplate = @"breastplate"; +NSString const *kArmorNameHalfPlate = @"half plate"; +NSString const *kArmorNameRingMail = @"ring mail"; +NSString const *kArmorNameChainMail = @"chain mail"; +NSString const *kArmorNameSplintMail = @"splint"; +NSString const *kArmorNamePlateMail = @"plate"; +NSString const *kArmorNameOther = @"other"; //getArmorClass -(NSString*)armorClassDescription { - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + BOOL hasShield = [self shieldBonus] != 0; + NSString *armorName = [self armorName]; + if ([StringHelper isStringNilOrEmpty:armorName] || [kArmorNameNone isEqualToString:armorName]) { + // 10 + dexMod + 2 for shieldBonus "15" or "17 (shield)" + int armorClass = kArmorClassUnarmored + self.dexterityModifier + self.shieldBonus; + return [NSString stringWithFormat:@"%d%@", armorClass, (hasShield ? @" (shield)" : @"")]; + } else if ([kArmorNameNaturalArmor isEqualToString:armorName]) { + // 10 + dexMod + naturalArmorBonus + 2 for shieldBonus "16 (natural armor)" or "18 (natural armor, shield)" + int armorClass = kArmorClassUnarmored + self.dexterityModifier + self.naturalArmorBonus + self.shieldBonus; + return [NSString stringWithFormat:@"%d (natural armor%@)", armorClass, (hasShield ? @" (shield)" : @"")]; + } else if ([kArmorNameMageArmor isEqualToString:armorName]) { + // 10 + dexMod + 2 for shield + 3 for mage armor "15 (18 with mage armor)" or 17 (shield, 20 with mage armor) + int armorClass = kArmorClassUnarmored + self.dexterityModifier + self.shieldBonus; + int armorClassWithMageArmor = kArmorClassMageArmor + self.dexterityModifier + self.shieldBonus; + return [NSString stringWithFormat:@"%d (%@%d with mage armor)", armorClass, (hasShield ? @"shield, " : @""), armorClassWithMageArmor]; + } else if ([kArmorNamePadded isEqualToString:armorName]) { + // 11 + dexMod + 2 for shield "18 (padded armor, shield)" + int armorClass = kArmorClassPadded + self.dexterityModifier + self.shieldBonus; + return [NSString stringWithFormat:@"%d (padded%@)", armorClass, (hasShield ? @"shield, " : @"")]; + } else if ([kArmorNameLeather isEqualToString:armorName]) { + // 11 + dexMod + 2 for shield "18 (leather, shield)" + int armorClass = kArmorClassLeather + self.dexterityModifier + self.shieldBonus; + return [NSString stringWithFormat:@"%d (leather%@)", armorClass, (hasShield ? @"shield, " : @"")]; + } else if ([kArmorNameStuddedLeather isEqualToString:armorName]) { + // 12 + dexMod +2 for shield "17 (studded leather)" + int armorClass = kArmorClassStudded + self.dexterityModifier + self.shieldBonus; + return [NSString stringWithFormat:@"%d (studded leather%@)", armorClass, (hasShield ? @"shield, " : @"")]; + } else if ([kArmorNameHide isEqualToString:armorName]) { + // 12 + Min(2, dexMod) + 2 for shield "12 (hide armor)" + int armorClass = kArmorClassHide + MIN(2, self.dexterityModifier) + self.shieldBonus; + return [NSString stringWithFormat:@"%d (hide%@)", armorClass, (hasShield ? @", shield" : @"")]; + } else if ([kArmorNameChainShirt isEqualToString:armorName]) { + // 13 + Min(2, dexMod) + 2 for shield "12 (chain shirt)" + int armorClass = kArmorClassChainShirt + MIN(2, self.dexterityModifier) + self.shieldBonus; + return [NSString stringWithFormat:@"%d (chain shirt%@)", armorClass, (hasShield ? @", shield" : @"")]; + } else if ([kArmorNameScaleMail isEqualToString:armorName]) { + // 14 + Min(2, dexMod) + 2 for shield "14 (scale mail)" + int armorClass = kArmorClassScaleMail + MIN(2, self.dexterityModifier) + self.shieldBonus; + return [NSString stringWithFormat:@"%d (scale mail%@)", armorClass, (hasShield ? @", shield" : @"")]; + } else if ([kArmorNameBreastplate isEqualToString:armorName]) { + // 14 + Min(2, dexMod) + 2 for shield "16 (breastplate)" + int armorClass = kArmorClassBreastplate + MIN(2, self.dexterityModifier) + self.shieldBonus; + return [NSString stringWithFormat:@"%d (breastplate%@)", armorClass, (hasShield ? @", shield" : @"")]; + } else if ([kArmorNameHalfPlate isEqualToString:armorName]) { + // 15 + Min(2, dexMod) + 2 for shield "17 (half plate)" + int armorClass = kArmorClassHalfPlate + MIN(2, self.dexterityModifier) + self.shieldBonus; + return [NSString stringWithFormat:@"%d (half plate%@)", armorClass, (hasShield ? @", shield" : @"")]; + } else if ([kArmorNameRingMail isEqualToString:armorName]) { + // 14 + 2 for shield "14 (ring mail) + int armorClass = kArmorClassRingMail + self.shieldBonus; + return [NSString stringWithFormat:@"%d (ring mail%@)", armorClass, (hasShield ? @", shield" : @"")]; + } else if ([kArmorNameChainMail isEqualToString:armorName]) { + // 16 + 2 for shield "16 (chain mail)" + int armorClass = kArmorClassChainMail + self.shieldBonus; + return [NSString stringWithFormat:@"%d (chain mail%@)", armorClass, (hasShield ? @", shield" : @"")]; + } else if ([kArmorNameSplintMail isEqualToString:armorName]) { + // 17 + 2 for shield "17 (splint)" + int armorClass = kArmorClassSplintMail + self.shieldBonus; + return [NSString stringWithFormat:@"%d (splint%@)", armorClass, (hasShield ? @", shield" : @"")]; + } else if ([kArmorNamePlateMail isEqualToString:armorName]) { + // 18 + 2 for shield "18 (plate)" + int armorClass = kArmorClassPlate + self.shieldBonus; + return [NSString stringWithFormat:@"%d (plate%@)", armorClass, (hasShield ? @", shield" : @"")]; + } else if ([kArmorNameOther isEqualToString:armorName]) { + // pure string value shield check does nothing just copies the string from otherArmorDesc + return self.otherArmorDescription; + } else { + return @""; + } } //getHitPoints From 8029fb7540051287a4ec6b4bfd2f2052579740d4 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Tue, 15 Sep 2020 20:18:08 -0700 Subject: [PATCH 058/195] Adds HTMLHelper to convert from HTML in an NSString to a properly attributed NSAttributedString. --- MonsterCards.xcodeproj/project.pbxproj | 6 ++++++ MonsterCards/Helpers/HTMLHelper.h | 19 +++++++++++++++++++ MonsterCards/Helpers/HTMLHelper.m | 22 ++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 MonsterCards/Helpers/HTMLHelper.h create mode 100644 MonsterCards/Helpers/HTMLHelper.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 3e50f57..fbcff00 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ E25BD60125036BF8007B04EF /* Language.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60025036BF8007B04EF /* Language.m */; }; E25BD60425036CF0007B04EF /* Ability.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60325036CF0007B04EF /* Ability.m */; }; E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; }; + E26A73572511BA1900C5677E /* HTMLHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E26A73562511BA1900C5677E /* HTMLHelper.m */; }; E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */; }; E2D3E3B42508C3360052A8EC /* EditableShortStringTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */; }; E2E25805250CC3A7002E7308 /* MonsterCards.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E2F7248225005E89007D87ED /* MonsterCards.xcdatamodeld */; }; @@ -99,6 +100,8 @@ E25BD60525036CFA007B04EF /* Action.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Action.h; sourceTree = ""; }; E25BD60625036CFA007B04EF /* Action.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Action.m; sourceTree = ""; }; E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; sourceTree = ""; }; + E26A73552511BA1900C5677E /* HTMLHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLHelper.h; sourceTree = ""; }; + E26A73562511BA1900C5677E /* HTMLHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLHelper.m; sourceTree = ""; }; E2D3E3AE250827110052A8EC /* EditMonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditMonsterViewController.h; sourceTree = ""; }; E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditMonsterViewController.m; sourceTree = ""; }; E2D3E3B22508C3360052A8EC /* EditableShortStringTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableShortStringTableViewCell.h; sourceTree = ""; }; @@ -227,6 +230,8 @@ children = ( E2532E8725038DE100CA4CBA /* StringHelper.h */, E2532E8825038DE100CA4CBA /* StringHelper.m */, + E26A73552511BA1900C5677E /* HTMLHelper.h */, + E26A73562511BA1900C5677E /* HTMLHelper.m */, ); path = Helpers; sourceTree = ""; @@ -575,6 +580,7 @@ E2F7248425005E89007D87ED /* MonsterCards.xcdatamodeld in Sources */, E25BD60425036CF0007B04EF /* Ability.m in Sources */, E20D032E25031BEF00FB6E43 /* CollectionsViewController.m in Sources */, + E26A73572511BA1900C5677E /* HTMLHelper.m in Sources */, E25BD5F5250352C4007B04EF /* Monster.m in Sources */, E25BD5F8250368A8007B04EF /* SavingThrow.m in Sources */, E2F7248C25005E8A007D87ED /* main.m in Sources */, diff --git a/MonsterCards/Helpers/HTMLHelper.h b/MonsterCards/Helpers/HTMLHelper.h new file mode 100644 index 0000000..48f309d --- /dev/null +++ b/MonsterCards/Helpers/HTMLHelper.h @@ -0,0 +1,19 @@ +// +// HtmlHelper.h +// MonsterCards +// +// Created by Tom Hicks on 9/12/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface HTMLHelper : NSObject + ++(NSAttributedString*)attributedStringFromHTML:(NSString*)html; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Helpers/HTMLHelper.m b/MonsterCards/Helpers/HTMLHelper.m new file mode 100644 index 0000000..9755d3c --- /dev/null +++ b/MonsterCards/Helpers/HTMLHelper.m @@ -0,0 +1,22 @@ +// +// HtmlHelper.m +// MonsterCards +// +// Created by Tom Hicks on 9/12/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "HTMLHelper.h" +@import UIKit; + +@implementation HTMLHelper + ++ (NSAttributedString*)attributedStringFromHTML:(NSString *)htmlString { + + return [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES] + options:@{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, + NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding)} + documentAttributes:nil error:nil]; +} + +@end From 42baec2a38580b9adee79d4a1a9f3f2d23187da4 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 05:04:22 -0700 Subject: [PATCH 059/195] Adds armor class to monster cards. --- MonsterCards.xcodeproj/project.pbxproj | 4 +++ .../first.imageset/Contents.json | 12 --------- .../Assets.xcassets/first.imageset/first.pdf | Bin 2465 -> 0 bytes .../second.imageset/Contents.json | 12 --------- .../second.imageset/second.pdf | Bin 2423 -> 0 bytes MonsterCards/Assets/section-divider.png | Bin 0 -> 338 bytes MonsterCards/Assets/section-divider@2x.png | Bin 0 -> 1001 bytes MonsterCards/Assets/section-divider@3x.png | Bin 0 -> 2774 bytes MonsterCards/Base.lproj/Main.storyboard | 20 +++++++++++++++ MonsterCards/Images.xcassets/Contents.json | 6 +++++ .../section-divider.imageset/Contents.json | 23 ++++++++++++++++++ .../section-divider.png | Bin 0 -> 338 bytes .../section-divider@2x.png | Bin 0 -> 1001 bytes .../section-divider@3x.png | Bin 0 -> 2774 bytes MonsterCards/Views/MonsterViewController.h | 1 + MonsterCards/Views/MonsterViewController.m | 21 ++++++++++++---- Pods/Pods.xcodeproj/project.pbxproj | 4 +-- 17 files changed, 72 insertions(+), 31 deletions(-) delete mode 100644 MonsterCards/Assets.xcassets/first.imageset/Contents.json delete mode 100644 MonsterCards/Assets.xcassets/first.imageset/first.pdf delete mode 100644 MonsterCards/Assets.xcassets/second.imageset/Contents.json delete mode 100644 MonsterCards/Assets.xcassets/second.imageset/second.pdf create mode 100644 MonsterCards/Assets/section-divider.png create mode 100644 MonsterCards/Assets/section-divider@2x.png create mode 100644 MonsterCards/Assets/section-divider@3x.png create mode 100644 MonsterCards/Images.xcassets/Contents.json create mode 100644 MonsterCards/Images.xcassets/section-divider.imageset/Contents.json create mode 100644 MonsterCards/Images.xcassets/section-divider.imageset/section-divider.png create mode 100644 MonsterCards/Images.xcassets/section-divider.imageset/section-divider@2x.png create mode 100644 MonsterCards/Images.xcassets/section-divider.imageset/section-divider@3x.png diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index fbcff00..5d80e08 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -25,6 +25,7 @@ E25BD60425036CF0007B04EF /* Ability.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60325036CF0007B04EF /* Ability.m */; }; E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; }; E26A73572511BA1900C5677E /* HTMLHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E26A73562511BA1900C5677E /* HTMLHelper.m */; }; + E278E21B250DFFCA00D3EC0E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E278E21A250DFFCA00D3EC0E /* Images.xcassets */; }; E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */; }; E2D3E3B42508C3360052A8EC /* EditableShortStringTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */; }; E2E25805250CC3A7002E7308 /* MonsterCards.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E2F7248225005E89007D87ED /* MonsterCards.xcdatamodeld */; }; @@ -102,6 +103,7 @@ E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; sourceTree = ""; }; E26A73552511BA1900C5677E /* HTMLHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLHelper.h; sourceTree = ""; }; E26A73562511BA1900C5677E /* HTMLHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLHelper.m; sourceTree = ""; }; + E278E21A250DFFCA00D3EC0E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; E2D3E3AE250827110052A8EC /* EditMonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditMonsterViewController.h; sourceTree = ""; }; E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditMonsterViewController.m; sourceTree = ""; }; E2D3E3B22508C3360052A8EC /* EditableShortStringTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableShortStringTableViewCell.h; sourceTree = ""; }; @@ -286,6 +288,7 @@ E2F7247425005E89007D87ED /* AppDelegate.m */, E2F7247625005E89007D87ED /* SceneDelegate.h */, E2F7247725005E89007D87ED /* SceneDelegate.m */, + E278E21A250DFFCA00D3EC0E /* Images.xcassets */, E2F7247F25005E89007D87ED /* Main.storyboard */, E2F7248525005E8A007D87ED /* Assets.xcassets */, E2F7248725005E8A007D87ED /* LaunchScreen.storyboard */, @@ -439,6 +442,7 @@ buildActionMask = 2147483647; files = ( E2F7248925005E8A007D87ED /* LaunchScreen.storyboard in Resources */, + E278E21B250DFFCA00D3EC0E /* Images.xcassets in Resources */, E2F7248625005E8A007D87ED /* Assets.xcassets in Resources */, E2F7248125005E89007D87ED /* Main.storyboard in Resources */, ); diff --git a/MonsterCards/Assets.xcassets/first.imageset/Contents.json b/MonsterCards/Assets.xcassets/first.imageset/Contents.json deleted file mode 100644 index 33a7451..0000000 --- a/MonsterCards/Assets.xcassets/first.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "first.pdf" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MonsterCards/Assets.xcassets/first.imageset/first.pdf b/MonsterCards/Assets.xcassets/first.imageset/first.pdf deleted file mode 100644 index 47d911dea647d55983671ead4d08b6f6b3600715..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2465 zcmai03se(l7FLvisY+L#f-EBsK`11Xkc1=%MIujmB|xQ!>5vQ%APFP`Mlf5nSPOKE z2-^C>7DZkM!J;Da5{kfrC?Kvp3J41-3shFXvhuJqKo*oer*r0H{{P-P_x0cTzLzjD!bE z0qT;#Q7l4Gy%fMoXJaKT`@{5#R(MOqJPwQifv8iK6A%Ot9L14h2`38T!2s4PM=1!< zmL06}VYAA|ay#jZRs>HpA%X+eQW4rufWU%d1w5GTy!X#LeZsF_+~ccZmn3Fi)v^Z; zIG;?uU*yLLEYs61tjD>gXOFvSWsh{48xJvPNqKrIJtMdCz2cA2aC7TF?b@K`V!Lw- zE;zpH&ApqhoRjAHt}gK}>(qAc8dvrkD31*`<5<%C(&4_LqhQ3-GOf8~n^leG?+-@@^pjPa$J2gW@O)!b9hdTJ zTauyIJ&~rqeEZC1p9dWgx7{_WRc2=drMO=wcT7B{Zd58z`d)r_36r4V<6PGkCjpGfbnVMtm@;b}F!T?)Qav$_y7H5T;Mf!T}M zWxP9TNqrV?e5;b|pWd3^u2KAatk&3aDB@0 zZBaQNdCZ2#fblzYZnRCCjQ-GQWb-s8bX&<)?SxnUGdDYVFVk`xIf7@g3~$DX`H71_;r5OSZz1p`$_8y_9 z{;MJJ+n=>7Ewg;GnGHoz)&ID0z@F2!e$F7cWQ?d6s(!VY)_Gw})xCyMvsD={5i&H* zAIr_ACo8;Se6<*!-mm9Am79Iz^RVlc?%S5sg|E*SyIV{dd9{Mpf#d3cih5WKt=%ps zBEo)bt8EjmeCFYJRYU|b7d`p+-V|X2wOCYtyLP6t=!WH-kgdf0A};ytPfZiCwVPx{ z`g;zpe{8a4RQxQUwVU02<4X3w|9h;}XjhGWquqn{vVqq8g{*}BQF9=ybe_TM*!M=rFs1pN)yzctIXAoicsCe6>fit>wgZ#vp^hZOY0`J`rx zwdSK?GwR_xm9;5XjH|vf{O+Yg-)z;s*xt>;-vU`D-_SK<=~4eEVQkV~57{vyH6ebu>DqwE~Mx_A31Lg~$ zy`i52ew?GEluE%AN>ju*5z~dx2QQLP-G+E>o|En2+s&<^4*d zWD+<8PXs_Jp7_5Dpi(Gg3J?M;%Rn0{dcxQRh!ip+iHJ_e`!bM1MGxwI8Iedr+x>wI zq@&04fsADHfBccq^gpm8Q_u-~Uj|Z$YwSR(^_mzUb!}Xb2Cj`uqphg}v_Y%?Fs=;= zWq3s{hy)Tu!ji@RJsd$C+G{F6V2j1*Xk+7xo|LO7M2yb)(wc=%x-AclP9pLsbTF7m tf?*P!2EjJu5MD57P32Q4pdJ3tO_shCDT2=K;$ebx8ymcd$v!V9{2$sQiO>K5 diff --git a/MonsterCards/Assets.xcassets/second.imageset/Contents.json b/MonsterCards/Assets.xcassets/second.imageset/Contents.json deleted file mode 100644 index 03bd9c9..0000000 --- a/MonsterCards/Assets.xcassets/second.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "second.pdf" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/MonsterCards/Assets.xcassets/second.imageset/second.pdf b/MonsterCards/Assets.xcassets/second.imageset/second.pdf deleted file mode 100644 index 401614e288b4b160471c2776bed6f09762af3e1c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2423 zcmai02~-nz8dqq7rWU#)x2z)&iMWtV?gK$2a)?|BP!TbkV}J-Gl1wmy+3G9S0=uOY zwCjai6uBOPMMdNiN`VDYKwLQr2#W^`R93*Ua=0^)EGYY4=grIf|KIohziYnv{elnR zdN_hk6db<(+3RPcxs!iut8c(j0TLh=9mY931H^rhEE0|aXo!dh5Iv+ZFr+}9F+v#P zLSnfD0$f~hN>~92V{z)WJA&2)5rW!|I?;o?oI*%zejJiuY>hFLQwKlAa9O+PnPh#% zJp~JAfs-De6u@;{cREMs}D-sGib_4>50m8_|Uj-zC0m@Qx zJV+^5Da4Qxpf3sBtKZs<_aI$Cb1T+h<->yL^rfiGNelYkqgC3#SqVP_iy*_RPcbjH)xYf zvYdC-)D_t8c{=5%;$VJQxs_#61J*kuXMC?|&PbPo-7uSxoNr~&J94|gKk+03JGXXM zx4w~=^VUzWqQveu_ilRgPdgNNdnLZCH`=;w91}cP5ihdm*B_jI+rk=Pz2Lk!)XUu| zkls3P5&YHJ!t0kF+MUVBHOAx)a zy|JxHNd37z*~b5#%*0w_F|#4?erNP;pG`Fevoq2%?9Y>%Cmzv1(ks;aPIGaiy1mhU zr{7lB^Mem&`QK{b{uiDC zLD8muY(FNk{YdV|zO#o_VB%);8|~Bh(Z4p?GM}g-HN2;q7~YNl-lD~HZ$taYw$Fzbn6c?c5eo=@`i>()el#qwB)hI-gp0 ztsw@dh-I5NJkk)RCoBC`L8ffKfY)=oG=#4LA9TO6eA}9~@a6dupB+=S{%s&NY}^0GY`hAqod)uxXHitrN%bWOJohV>t?!&Z#d4y^7J@=Oh`HV zee**4j>xRUd)|D0^I-B#<`m1-5PO{)!v(q?ecFYqr_8Q{+z7#n0uFbq%_?hZ-Ck(6NRn=vDS7Nb1Xxx_)9`!i- zGR>av*PJ+P_AGO*a_$FbtCCISg5PK44p&W#t$)+HVcxpR9LAL%_Pv$p`0tO*sYZD0 zCG3-ipr4WoVbjpw%Nf^r^rnWcDcjumgBPEjO;NM6QtZ8wU#0rjHx5zs%CahF4$W*U zxu!q8kYP+>v!BNPVIRJUGIWU@7qVvx2VZDw4gV8%z%bjpF#aF(W|PmliwlakuRq>= zhaCRc^R!7T)#Twb0{!Tns=CxGcGX|leErg`f3|v0eBXxHU&6Sj-_>zOL!!d+j5Xt* zPS;rWd^zEF{5d5%)nNK=)zFJ8Uc=aQKD%UK)_TNes1Gh{SD*Mb_@O` z7*zs9Uq~Vq?v|^8FcM-yLGMKzR3YFB0z@CFM2X-dio%Gu6&MJj=I?uS7sA3AdE^p8 zE49$PjJzPIJwfn;jso7X2#jynr3dO@p5QAK1O9wqKLC=PkQjj~p#n|-5O`ihbTzzu zL{}2QEe28pJYfVZRW56FL`LvO&|C^1Th{0}hQMW$Ng$QPpnzlwnMnf=kVy8(y==L% zLMa>r0gELdTl@6q@3MdrJZ{%l~(8;inh0Tt^L7Bxv8mN$=OTpoj!3Rc$2mD!_0?hIZ d3}FwLcISnH8|LSJnj6K_TAZzL3vJEGBl@9+ltnmM3 zY}^3R)D?3uAlk&`=xe2E`Vz}dwN-qo6N$V2fA-4{hNbhYmbFc&JK^CzvE+pYuY9nx z$LaU=KYn-R+t<12GIM|p@Rrh+@Ooa|V}D_ORe^n3eP>f*h5e#G4EE*={(NqzfAZYi zOlC`sNm$RF_$-I4zaDFrEnIwrfeEBH!2RHYgov#P4@}tvK>UV6E;iP~YOKub4I4oG z1Em@gB0OAddWRwEpD#}cFwl_LAp^16eG!=3pas$0=KwS_u1TF2Wgwp$e1D*du2MeF8_z$ zi?=3JJX7x2HRCzszbg}jX1=y$Thj68dw8(XlYRg1+&BLAKga;2iQ!ELNY@`(rM#0D zr}OTg^!m=v+7Hju+ox1Nv(lA~>T18%U-l_M9;CG4>|eIR%mud{0+Dmvv4F FO#p~uOMzCZFMlQZX>=Q+=F z-tSUifUl{^783w~=}|xLAOMW1@VkrAM)>)d^Xa?rvGGHHUvKz?XVI(W0stnLk9vEM z(}sT^d6@UVP78znf4KX6Vf^dY6$3|kZ@k=fCG#1{#qcy6>vKD2i+tK{ z>grf~cD6dP<_x@~&#TscfHb!F-b6{hlB41d*Kx$Ol5Gdvq|+&1t;!+QPNxnJGTtjkU-tLjAHMZObeCCUK;6L3p9$lDKgSFAYQ0 z=H9tc_488Xt58{Z9HpCIhRJ9cCmgYRT-~lZVk!OM#npQg2T;{N%!JrW=H`?^e(|`@ z1Gw+em&Ci~^+F@WAB@_(Y72?)B1`gamtjs)q+2pMB+6!jI8O2)_HIP?^vVH8;V4sx z&K=GeY)0YgY!r3L_Ey)2i;9FO#gnn8W2(h-vn7tcf3)*S16Cg1Xwz%*w0>|P*6XnF z-?h07NZ+6`bfnP9w#@16#O0QTi*lcn&j*t7oUsYgl&r;GU&G2{*~>5Il)31$S_(vm zu<}{FtMX>wVCLtn=7SZy_~*+eDphe-YRB=88Fqnbs5bJv8&o)AP8{Xg?AwETq9?l`R*z(`;D=*#0fYcjQ0`7^m>KRi(AJIRP3%H9UT6~)q z5q63fcYI2t^~4yRLAm6taXv{RNgKl)Qn~p|$2z@z-Pc*ovyXBa?-wpp6I+*s?R_|BrLsKZcHaTYp9g3MO;qwT}gso|C z-WS={pcRGD3=;X^@8)fKV=F)|TWPENgfe$S4MEHNp}&D7zq7^<_`L3@=v2XPtMvcW4|C}CTQrlzJso2=0EtRnh{6JdKg-y_Isd-yz@I4{isKYcOK3|4(#GjCavPJ5}BbO&jb z@z$dCp@V+WM)l&9jqv{7Uhsbqvg&VyQLj%TOP=V(SR|r~D<^82_a}PZ9$`x?zY8W6 zwzMseGegwThp|SGfwWQ`#Q|>BXfxjHNe!mkPE;EWDG%2zH5eVJMjohxb%6M;?iOkh ztGTV$xkg#BDTcG{eAqZyl0V_o`W1)awcAh)B@MGdy#ixj!(%Y4m4MCxpnqyzkHNSZ zrv#{ABvl7+kmR98zU1h!2~A%FVcrq$G(~#Flz$QX?7_E%`oFq!j&cT;qZSeMS#9G!5Y zy850glU_s9e|pyny-*hKkKBTKx5(VH^6-k8pO7qxWd`3oNS#Z{VDU1>j;W?R53kY- zmFm7BR9s{BG;{Nh9AWQiZ};-lI+A@tfoUG`v2uE9q3T)hM24!(6~m1)oGd+cYrOII zm6c!*XSnt?hiZ$=y&3I=j~2*l^XUGtWMoUIdeB8(N9o5pM(oVTf71RrpHyMcI`Qdc5|pycXgB);9ccOW&R&4vx}er literal 0 HcmV?d00001 diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 795f07a..5462e72 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -197,12 +197,30 @@ + + + + + + + + + + + + + @@ -214,6 +232,7 @@ + @@ -299,6 +318,7 @@ +
diff --git a/MonsterCards/Images.xcassets/Contents.json b/MonsterCards/Images.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MonsterCards/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MonsterCards/Images.xcassets/section-divider.imageset/Contents.json b/MonsterCards/Images.xcassets/section-divider.imageset/Contents.json new file mode 100644 index 0000000..0db353e --- /dev/null +++ b/MonsterCards/Images.xcassets/section-divider.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "section-divider.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "section-divider@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "section-divider@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MonsterCards/Images.xcassets/section-divider.imageset/section-divider.png b/MonsterCards/Images.xcassets/section-divider.imageset/section-divider.png new file mode 100644 index 0000000000000000000000000000000000000000..6340565d03473bf1cfc17a432342d07ab304f9ca GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0y~yU{(OKML5`iWNC4vACO{8@^*It(m?Rjd3QYn10%bq zi(^Q|t+&?${SG;Zv|Y@8q!iI4T^yQsM)ilDh~S1jCMlOZCRpUATRm4X|9tDq%m4H4 z#hKLt4LI|l@+Ciz-t@bt<88t2CvPWh@9wBAieGHa^WAn=a?$c9=T81rxz3;O;-c@s z!0@2(DBqusj_cq1m;OKR%f!OaASC%iTNNmCE9Jpv4n`&h172qNIzl@6q@3MdrJZ{%l~(8;inh0Tt^L7Bxv8mN$=OTpoj!3Rc$2mD!_0?hIZ d3}FwLcISnH8|LSJnj6K_TAZzL3vJEGBl@9+ltnmM3 zY}^3R)D?3uAlk&`=xe2E`Vz}dwN-qo6N$V2fA-4{hNbhYmbFc&JK^CzvE+pYuY9nx z$LaU=KYn-R+t<12GIM|p@Rrh+@Ooa|V}D_ORe^n3eP>f*h5e#G4EE*={(NqzfAZYi zOlC`sNm$RF_$-I4zaDFrEnIwrfeEBH!2RHYgov#P4@}tvK>UV6E;iP~YOKub4I4oG z1Em@gB0OAddWRwEpD#}cFwl_LAp^16eG!=3pas$0=KwS_u1TF2Wgwp$e1D*du2MeF8_z$ zi?=3JJX7x2HRCzszbg}jX1=y$Thj68dw8(XlYRg1+&BLAKga;2iQ!ELNY@`(rM#0D zr}OTg^!m=v+7Hju+ox1Nv(lA~>T18%U-l_M9;CG4>|eIR%mud{0+Dmvv4F FO#p~uOMzCZFMlQZX>=Q+=F z-tSUifUl{^783w~=}|xLAOMW1@VkrAM)>)d^Xa?rvGGHHUvKz?XVI(W0stnLk9vEM z(}sT^d6@UVP78znf4KX6Vf^dY6$3|kZ@k=fCG#1{#qcy6>vKD2i+tK{ z>grf~cD6dP<_x@~&#TscfHb!F-b6{hlB41d*Kx$Ol5Gdvq|+&1t;!+QPNxnJGTtjkU-tLjAHMZObeCCUK;6L3p9$lDKgSFAYQ0 z=H9tc_488Xt58{Z9HpCIhRJ9cCmgYRT-~lZVk!OM#npQg2T;{N%!JrW=H`?^e(|`@ z1Gw+em&Ci~^+F@WAB@_(Y72?)B1`gamtjs)q+2pMB+6!jI8O2)_HIP?^vVH8;V4sx z&K=GeY)0YgY!r3L_Ey)2i;9FO#gnn8W2(h-vn7tcf3)*S16Cg1Xwz%*w0>|P*6XnF z-?h07NZ+6`bfnP9w#@16#O0QTi*lcn&j*t7oUsYgl&r;GU&G2{*~>5Il)31$S_(vm zu<}{FtMX>wVCLtn=7SZy_~*+eDphe-YRB=88Fqnbs5bJv8&o)AP8{Xg?AwETq9?l`R*z(`;D=*#0fYcjQ0`7^m>KRi(AJIRP3%H9UT6~)q z5q63fcYI2t^~4yRLAm6taXv{RNgKl)Qn~p|$2z@z-Pc*ovyXBa?-wpp6I+*s?R_|BrLsKZcHaTYp9g3MO;qwT}gso|C z-WS={pcRGD3=;X^@8)fKV=F)|TWPENgfe$S4MEHNp}&D7zq7^<_`L3@=v2XPtMvcW4|C}CTQrlzJso2=0EtRnh{6JdKg-y_Isd-yz@I4{isKYcOK3|4(#GjCavPJ5}BbO&jb z@z$dCp@V+WM)l&9jqv{7Uhsbqvg&VyQLj%TOP=V(SR|r~D<^82_a}PZ9$`x?zY8W6 zwzMseGegwThp|SGfwWQ`#Q|>BXfxjHNe!mkPE;EWDG%2zH5eVJMjohxb%6M;?iOkh ztGTV$xkg#BDTcG{eAqZyl0V_o`W1)awcAh)B@MGdy#ixj!(%Y4m4MCxpnqyzkHNSZ zrv#{ABvl7+kmR98zU1h!2~A%FVcrq$G(~#Flz$QX?7_E%`oFq!j&cT;qZSeMS#9G!5Y zy850glU_s9e|pyny-*hKkKBTKx5(VH^6-k8pO7qxWd`3oNS#Z{VDU1>j;W?R53kY- zmFm7BR9s{BG;{Nh9AWQiZ};-lI+A@tfoUG`v2uE9q3T)hM24!(6~m1)oGd+cYrOII zm6c!*XSnt?hiZ$=y&3I=j~2*l^XUGtWMoUIdeB8(N9o5pM(oVTf71RrpHyMcI`Qdc5|pycXgB);9ccOW&R&4vx}er literal 0 HcmV?d00001 diff --git a/MonsterCards/Views/MonsterViewController.h b/MonsterCards/Views/MonsterViewController.h index 305ad8e..c3d8e16 100644 --- a/MonsterCards/Views/MonsterViewController.h +++ b/MonsterCards/Views/MonsterViewController.h @@ -15,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN @property (weak, nonatomic) IBOutlet UILabel *monsterName; @property (weak, nonatomic) IBOutlet UILabel *monsterMeta; +@property (weak, nonatomic) IBOutlet UILabel *monsterArmorClass; @property Monster* monster; diff --git a/MonsterCards/Views/MonsterViewController.m b/MonsterCards/Views/MonsterViewController.m index 33a0b66..a7cacf3 100644 --- a/MonsterCards/Views/MonsterViewController.m +++ b/MonsterCards/Views/MonsterViewController.m @@ -8,6 +8,7 @@ #import "MonsterViewController.h" #import "EditMonsterViewController.h" +#import "HTMLHelper.h" @interface MonsterViewController () @@ -35,11 +36,21 @@ self.navigationItem.title = self.monster.name; } } - NSString *metaText = self.monster.meta; - if (metaText == nil) { - self.monsterMeta.text = @""; - } else { - self.monsterMeta.text = metaText; + if (self.monsterMeta != nil) { + NSString *metaText = self.monster.meta; + if (metaText == nil) { + self.monsterMeta.text = @""; + } else { + self.monsterMeta.text = metaText; + } + } + if (self.monsterArmorClass != nil) { + NSString *armorClassDescription = self.monster.armorClassDescription; + if (armorClassDescription == nil) { + self.monsterArmorClass.text = @""; + } else { + self.monsterArmorClass.attributedText = [HTMLHelper attributedStringFromHTML:[NSString stringWithFormat:@"Armor Class %@", armorClassDescription]]; + } } } diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index f0ac369..248d683 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ @@ -1546,7 +1546,7 @@ LastUpgradeCheck = 1100; }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 9.3"; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( From bc23b554292dad7ab3c5cd2059127e4b52eab671 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 13 Sep 2020 05:04:22 -0700 Subject: [PATCH 060/195] Adds JSONHelper methods to read strings. (+1 squashed commit) Squashed commits: [30b0a71] Adds JSONHelper methods to read strings. --- MonsterCards.xcodeproj/project.pbxproj | 20 +++ MonsterCards/Helpers/JSONHelper.h | 21 +++ MonsterCards/Helpers/JSONHelper.m | 39 ++++++ MonsterCardsTests/Helpers/JSONHelperTests.m | 147 ++++++++++++++++++++ 4 files changed, 227 insertions(+) create mode 100644 MonsterCards/Helpers/JSONHelper.h create mode 100644 MonsterCards/Helpers/JSONHelper.m create mode 100644 MonsterCardsTests/Helpers/JSONHelperTests.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 5d80e08..7f48f93 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -15,6 +15,8 @@ E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032A25031BE500FB6E43 /* LibraryViewController.m */; }; E20D032E25031BEF00FB6E43 /* CollectionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */; }; E20D033125031BFD00FB6E43 /* DashboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D033025031BFD00FB6E43 /* DashboardViewController.m */; }; + E22F837C2511D14E0072105C /* JSONHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E22F837B2511D14E0072105C /* JSONHelper.m */; }; + E22F837F2511E8500072105C /* JSONHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E22F837E2511E8500072105C /* JSONHelperTests.m */; }; E2532E8925038DE100CA4CBA /* StringHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E2532E8825038DE100CA4CBA /* StringHelper.m */; }; E2592B8D250D6B8100906A40 /* EditMonsterViewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2592B8C250D6B8100906A40 /* EditMonsterViewControllerTests.m */; }; E25BD5F5250352C4007B04EF /* Monster.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD5F4250352C4007B04EF /* Monster.m */; }; @@ -82,6 +84,9 @@ E20D032D25031BEF00FB6E43 /* CollectionsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CollectionsViewController.m; sourceTree = ""; }; E20D032F25031BFD00FB6E43 /* DashboardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DashboardViewController.h; sourceTree = ""; }; E20D033025031BFD00FB6E43 /* DashboardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DashboardViewController.m; sourceTree = ""; }; + E22F837A2511D14E0072105C /* JSONHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSONHelper.h; sourceTree = ""; }; + E22F837B2511D14E0072105C /* JSONHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JSONHelper.m; sourceTree = ""; }; + E22F837E2511E8500072105C /* JSONHelperTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JSONHelperTests.m; sourceTree = ""; }; E2532E8725038DE100CA4CBA /* StringHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StringHelper.h; sourceTree = ""; }; E2532E8825038DE100CA4CBA /* StringHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StringHelper.m; sourceTree = ""; }; E2591EB62509DD4900B396FD /* EditableFormFieldDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableFormFieldDelegate.h; sourceTree = ""; }; @@ -234,6 +239,16 @@ E2532E8825038DE100CA4CBA /* StringHelper.m */, E26A73552511BA1900C5677E /* HTMLHelper.h */, E26A73562511BA1900C5677E /* HTMLHelper.m */, + E22F837A2511D14E0072105C /* JSONHelper.h */, + E22F837B2511D14E0072105C /* JSONHelper.m */, + ); + path = Helpers; + sourceTree = ""; + }; + E22F837D2511E8350072105C /* Helpers */ = { + isa = PBXGroup; + children = ( + E22F837E2511E8500072105C /* JSONHelperTests.m */, ); path = Helpers; sourceTree = ""; @@ -302,6 +317,7 @@ E2F7249425005E8A007D87ED /* MonsterCardsTests */ = { isa = PBXGroup; children = ( + E22F837D2511E8350072105C /* Helpers */, E2592B8B250D6B6000906A40 /* Views */, E2FD91E225047C1D00D5E935 /* Models */, E2F7249525005E8A007D87ED /* MonsterCardsTests.m */, @@ -591,6 +607,7 @@ E25BD5FB250369D7007B04EF /* Skill.m in Sources */, E2F7247825005E89007D87ED /* SceneDelegate.m in Sources */, E20D032425031B9D00FB6E43 /* SearchViewController.m in Sources */, + E22F837C2511D14E0072105C /* JSONHelper.m in Sources */, E25BD60125036BF8007B04EF /* Language.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -609,6 +626,7 @@ E2FD91E425047C4400D5E935 /* AbilityTests.m in Sources */, E2E25805250CC3A7002E7308 /* MonsterCards.xcdatamodeld in Sources */, E2F7249625005E8A007D87ED /* MonsterCardsTests.m in Sources */, + E22F837F2511E8500072105C /* JSONHelperTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -772,6 +790,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = J793L9LQJ2; + HEADER_SEARCH_PATHS = "$(SRCROOT)/Pods/**"; INFOPLIST_FILE = MonsterCards/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -791,6 +810,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = J793L9LQJ2; + HEADER_SEARCH_PATHS = "$(SRCROOT)/Pods/**"; INFOPLIST_FILE = MonsterCards/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/MonsterCards/Helpers/JSONHelper.h b/MonsterCards/Helpers/JSONHelper.h new file mode 100644 index 0000000..f8efb01 --- /dev/null +++ b/MonsterCards/Helpers/JSONHelper.h @@ -0,0 +1,21 @@ +// +// JSONHelper.h +// MonsterCards +// +// Created by Tom Hicks on 9/15/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface JSONHelper : NSObject + ++(NSString*)readStringFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; ++(NSString*)readStringFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSString* _Nullable)defaultValue; ++(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index; ++(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSString* _Nullable)defaultValue; +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Helpers/JSONHelper.m b/MonsterCards/Helpers/JSONHelper.m new file mode 100644 index 0000000..61c956e --- /dev/null +++ b/MonsterCards/Helpers/JSONHelper.m @@ -0,0 +1,39 @@ +// +// JSONHelper.m +// MonsterCards +// +// Created by Tom Hicks on 9/15/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "JSONHelper.h" + +@implementation JSONHelper + +NSString* coerceObjectToString(NSObject *object, NSString *defaultValue) { + if ([object isKindOfClass:[NSString class]]) { + return (NSString*)object; + } + + return defaultValue; +} + ++(NSString*)readStringFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key { + return [JSONHelper readStringFromDictionary:dictionary forKey:key withDefaultValue:nil]; +} + ++(NSString*)readStringFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSString* _Nullable)defaultValue { + NSObject *object = [dictionary objectForKey:key]; + return coerceObjectToString(object, defaultValue); +} + ++(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index{ + return [JSONHelper readStringFromArray:array forIndex:index withDefaultValue:nil]; +} + ++(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSString* _Nullable)defaultValue { + NSObject *object = [array objectAtIndex:index]; + return coerceObjectToString(object, defaultValue); +} + +@end diff --git a/MonsterCardsTests/Helpers/JSONHelperTests.m b/MonsterCardsTests/Helpers/JSONHelperTests.m new file mode 100644 index 0000000..1acd0cc --- /dev/null +++ b/MonsterCardsTests/Helpers/JSONHelperTests.m @@ -0,0 +1,147 @@ +// +// JSONHelperTests.m +// MonsterCardsTests +// +// Created by Tom Hicks on 9/15/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "JSONHelper.h" + +@interface JSONHelperTests : XCTestCase + +@end + +@implementation JSONHelperTests { + NSString *_jsonStringKey; + NSString *_jsonStringValue; + NSString *_jsonStringFragment; + NSString *_jsonIntegerKey; + NSNumber *_jsonIntegerValue; + NSString *_jsonIntegerFragment; +} + +NSString* escapeStringForJSON(NSString *unescaped) { + return [[unescaped stringByReplacingOccurrencesOfString:@"\\" withString:@"\\\\"] stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""]; +} + +NSDictionary* readJSONDictionaryFromString(NSString *jsonString) { + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + NSDictionary *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; + if (![jsonRoot isKindOfClass:[NSDictionary class]]) { + return nil; + } else { + return jsonRoot; + } +} + +NSArray* readJSONArrayFromString(NSString *jsonString) { + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + NSArray *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; + if (![jsonRoot isKindOfClass:[NSArray class]]) { + return nil; + } else { + return jsonRoot; + } +} + +- (void)setUp { + _jsonStringKey = @"my_string"; + _jsonStringValue = @"Hello, World!"; + _jsonStringFragment = [NSString stringWithFormat:@"\"%@\":\"%@\"", escapeStringForJSON(_jsonStringKey), escapeStringForJSON(_jsonStringValue)]; + _jsonIntegerKey = @"my_int"; + _jsonIntegerValue = @12345; + _jsonIntegerFragment = [NSString stringWithFormat:@"\"%@\":%@", escapeStringForJSON(_jsonIntegerKey), [_jsonIntegerValue stringValue]]; +} + +- (void)tearDown { +} + +#pragma mark - Strings in Dictionaries + +- (void)testReadStringFromDictionaryReturnsNilIfKeyNotPresent { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonIntegerFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSString *readString = [JSONHelper readStringFromDictionary:jsonRoot forKey:_jsonStringKey]; + XCTAssertNil(readString); +} + +- (void)testReadStringFromDictionaryWithDefaultReturnsDefaultIfKeyNotPresent { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonIntegerFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSString *readString = [JSONHelper readStringFromDictionary:jsonRoot forKey:_jsonStringKey withDefaultValue:_jsonStringValue]; + XCTAssertEqualObjects(_jsonStringValue, readString); +} + +- (void) testReadStringFromDictionaryReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSString *readString = [JSONHelper readStringFromDictionary:jsonRoot forKey:_jsonStringKey]; + XCTAssertEqualObjects(_jsonStringValue, readString); +} + +- (void)testReadStringFromDictionaryWithDefaultReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSString *readString = [JSONHelper readStringFromDictionary:jsonRoot forKey:_jsonStringKey withDefaultValue:@"Some other string"]; + XCTAssertEqualObjects(_jsonStringValue, readString); +} + +- (void) testReadStringFromDictionaryReturnsNilIfWrongType { + NSString *jsonString = [NSString stringWithFormat:@"{\"%@\":%@}", _jsonStringKey, _jsonIntegerValue]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSString *readString = [JSONHelper readStringFromDictionary:jsonRoot forKey:_jsonStringKey]; + XCTAssertNil(readString); +} + +#pragma mark - Strings in Arrays + +- (void)testReadStringFromArrayReturnsNilIfNotAString { + NSString *jsonString = [NSString stringWithFormat:@"[%@]", _jsonIntegerValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSString *readString = [JSONHelper readStringFromArray:jsonRoot forIndex:0]; + XCTAssertNil(readString); +} + +- (void)testReadStringFromArrayWithDefaultReturnsDefaultValueIfNotAString { + NSString *jsonString = [NSString stringWithFormat:@"[%@]", _jsonIntegerValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSString *readString = [JSONHelper readStringFromArray:jsonRoot forIndex:0 withDefaultValue:_jsonStringValue]; + XCTAssertEqualObjects(_jsonStringValue, readString); +} + +- (void)testReadStringFromArrayThrowsIfIndexOutOfRange { + // TODO: Decide if this should throw or return nil + NSString *jsonString = @"[]"; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + XCTAssertThrows([JSONHelper readStringFromArray:jsonRoot forIndex:0]); + XCTAssertThrows([JSONHelper readStringFromArray:jsonRoot forIndex:-1]); +} + +- (void)testReadStringFromArrayReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSString *readString = [JSONHelper readStringFromArray:jsonRoot forIndex:0]; + XCTAssertEqualObjects(_jsonStringValue, readString); +} + +@end From 82625d4548807750797428fe194b388d9cf7e8e5 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 17 Sep 2020 00:26:58 -0700 Subject: [PATCH 061/195] Adds JSONHelper methods to read numbers as NSNumber objects. --- MonsterCards/Helpers/JSONHelper.h | 5 ++ MonsterCards/Helpers/JSONHelper.m | 26 +++++++ MonsterCardsTests/Helpers/JSONHelperTests.m | 86 +++++++++++++++++++++ 3 files changed, 117 insertions(+) diff --git a/MonsterCards/Helpers/JSONHelper.h b/MonsterCards/Helpers/JSONHelper.h index f8efb01..c4027c5 100644 --- a/MonsterCards/Helpers/JSONHelper.h +++ b/MonsterCards/Helpers/JSONHelper.h @@ -14,8 +14,13 @@ NS_ASSUME_NONNULL_BEGIN +(NSString*)readStringFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; +(NSString*)readStringFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSString* _Nullable)defaultValue; ++(NSNumber*)readNumberFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; ++(NSNumber*)readNumberFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSNumber* _Nullable)defaultValue; +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index; +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSString* _Nullable)defaultValue; ++(NSNumber*)readNumberFromArray:(NSArray*)array forIndex:(NSUInteger)index; ++(NSNumber*)readNumberFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSNumber* _Nullable)defaultValue; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Helpers/JSONHelper.m b/MonsterCards/Helpers/JSONHelper.m index 61c956e..07a0015 100644 --- a/MonsterCards/Helpers/JSONHelper.m +++ b/MonsterCards/Helpers/JSONHelper.m @@ -18,6 +18,14 @@ NSString* coerceObjectToString(NSObject *object, NSString *defaultValue) { return defaultValue; } +NSNumber* coerceObjectToNumber(NSObject *object, NSNumber *defaultValue) { + if ([object isKindOfClass:[NSNumber class]]) { + return (NSNumber*)object; + } + + return defaultValue; +} + +(NSString*)readStringFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key { return [JSONHelper readStringFromDictionary:dictionary forKey:key withDefaultValue:nil]; } @@ -27,6 +35,15 @@ NSString* coerceObjectToString(NSObject *object, NSString *defaultValue) { return coerceObjectToString(object, defaultValue); } ++(NSNumber*)readNumberFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key { + return [JSONHelper readNumberFromDictionary:dictionary forKey:key withDefaultValue:nil]; +} + ++(NSNumber*)readNumberFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSNumber* _Nullable)defaultValue { + NSObject *object = [dictionary objectForKey:key]; + return coerceObjectToNumber(object, defaultValue); +} + +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index{ return [JSONHelper readStringFromArray:array forIndex:index withDefaultValue:nil]; } @@ -36,4 +53,13 @@ NSString* coerceObjectToString(NSObject *object, NSString *defaultValue) { return coerceObjectToString(object, defaultValue); } ++(NSNumber*)readNumberFromArray:(NSArray*)array forIndex:(NSUInteger)index { + return [JSONHelper readNumberFromArray:array forIndex:index withDefaultValue:nil]; +} + ++(NSNumber*)readNumberFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSNumber* _Nullable)defaultValue { + NSObject *object = [array objectAtIndex:index]; + return coerceObjectToNumber(object, defaultValue); +} + @end diff --git a/MonsterCardsTests/Helpers/JSONHelperTests.m b/MonsterCardsTests/Helpers/JSONHelperTests.m index 1acd0cc..77a2470 100644 --- a/MonsterCardsTests/Helpers/JSONHelperTests.m +++ b/MonsterCardsTests/Helpers/JSONHelperTests.m @@ -144,4 +144,90 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { XCTAssertEqualObjects(_jsonStringValue, readString); } +#pragma mark - Integers in Dictionaries + +- (void)testReadIntegerFromDictionaryReturnsNilIfKeyNotPresent { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSNumber *readNumber = [JSONHelper readNumberFromDictionary:jsonRoot forKey:_jsonIntegerKey]; + XCTAssertNil(readNumber); +} + +- (void)testReadIntegerFromDictionaryWithDefaultReturnsDefaultIfKeyNotPresent { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSNumber *readNumber = [JSONHelper readNumberFromDictionary:jsonRoot forKey:_jsonIntegerKey withDefaultValue:_jsonIntegerValue]; + XCTAssertEqualObjects(_jsonIntegerValue, readNumber); +} + +- (void) testReadIntegerFromDictionaryReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonIntegerFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSNumber *readNumber = [JSONHelper readNumberFromDictionary:jsonRoot forKey:_jsonIntegerKey]; + XCTAssertEqualObjects(_jsonIntegerValue, readNumber); +} + +- (void)testReadIntegerFromDictionaryWithDefaultReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonIntegerFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSNumber *readNumber = [JSONHelper readNumberFromDictionary:jsonRoot forKey:_jsonIntegerKey withDefaultValue:@67890]; + XCTAssertEqualObjects(_jsonIntegerValue, readNumber); +} + +- (void) testReadIntegerFromDictionaryReturnsNilIfWrongType { + NSString *jsonString = [NSString stringWithFormat:@"{\"%@\":\"%@\"}", _jsonIntegerKey, _jsonStringValue]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSNumber *readNumber = [JSONHelper readNumberFromDictionary:jsonRoot forKey:_jsonIntegerKey]; + XCTAssertNil(readNumber); +} + +#pragma mark - Integers in Arrays + +- (void)testReadIntegerFromArrayReturnsNilIfNotAnInteger { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSNumber *readNumber = [JSONHelper readNumberFromArray:jsonRoot forIndex:0]; + XCTAssertNil(readNumber); +} + +- (void)testReadIntegerFromArrayWithDefaultReturnsDefaultValueIfNotAnInteger { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSNumber *readNumber = [JSONHelper readNumberFromArray:jsonRoot forIndex:0 withDefaultValue:_jsonIntegerValue]; + XCTAssertEqualObjects(_jsonIntegerValue, readNumber); +} + +- (void)testReadIntegerFromArrayThrowsIfIndexOutOfRange { + // TODO: Decide if this should throw or return nil + NSString *jsonString = @"[]"; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + XCTAssertThrows([JSONHelper readNumberFromArray:jsonRoot forIndex:0]); + XCTAssertThrows([JSONHelper readNumberFromArray:jsonRoot forIndex:-1]); +} + +- (void)testReadIntegerFromArrayReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"[%@]", _jsonIntegerValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSNumber *readNumber = [JSONHelper readNumberFromArray:jsonRoot forIndex:0]; + XCTAssertEqualObjects(_jsonIntegerValue, readNumber); +} + @end From 4a1145fd28f056c95ebaa0563eb85fbdec94caa9 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 17 Sep 2020 00:30:22 -0700 Subject: [PATCH 062/195] Adds JSONHelper methods to read numbers as ints. --- MonsterCards/Helpers/JSONHelper.h | 5 ++ MonsterCards/Helpers/JSONHelper.m | 35 +++++++++ MonsterCardsTests/Helpers/JSONHelperTests.m | 82 +++++++++++++++++++++ 3 files changed, 122 insertions(+) diff --git a/MonsterCards/Helpers/JSONHelper.h b/MonsterCards/Helpers/JSONHelper.h index c4027c5..55ff2da 100644 --- a/MonsterCards/Helpers/JSONHelper.h +++ b/MonsterCards/Helpers/JSONHelper.h @@ -16,10 +16,15 @@ NS_ASSUME_NONNULL_BEGIN +(NSString*)readStringFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSString* _Nullable)defaultValue; +(NSNumber*)readNumberFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; +(NSNumber*)readNumberFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSNumber* _Nullable)defaultValue; ++(int)readIntFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; ++(int)readIntFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(int)defaultValue; + +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index; +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSString* _Nullable)defaultValue; +(NSNumber*)readNumberFromArray:(NSArray*)array forIndex:(NSUInteger)index; +(NSNumber*)readNumberFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSNumber* _Nullable)defaultValue; ++(int)readIntFromArray:(NSArray*)array forIndex:(NSUInteger)index; ++(int)readIntFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(int)defaultValue; @end diff --git a/MonsterCards/Helpers/JSONHelper.m b/MonsterCards/Helpers/JSONHelper.m index 07a0015..943ecce 100644 --- a/MonsterCards/Helpers/JSONHelper.m +++ b/MonsterCards/Helpers/JSONHelper.m @@ -26,6 +26,23 @@ NSNumber* coerceObjectToNumber(NSObject *object, NSNumber *defaultValue) { return defaultValue; } +int coerceObjectToInt(NSObject *object, int defaultValue) { + if ([object isKindOfClass:[NSNumber class]]) { + return [(NSNumber*)object intValue]; + } + + if ([object isKindOfClass:[NSString class]]) { + NSScanner *scanner; + int temp; + scanner = [NSScanner scannerWithString:(NSString*)object]; + if ([scanner scanInt:&temp]) { + return temp; + } + } + + return defaultValue; +} + +(NSString*)readStringFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key { return [JSONHelper readStringFromDictionary:dictionary forKey:key withDefaultValue:nil]; } @@ -44,6 +61,15 @@ NSNumber* coerceObjectToNumber(NSObject *object, NSNumber *defaultValue) { return coerceObjectToNumber(object, defaultValue); } ++(int)readIntFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key { + return [JSONHelper readIntFromDictionary:dictionary forKey:key withDefaultValue:0]; +} + ++(int)readIntFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(int)defaultValue { + NSObject *object = [dictionary objectForKey:key]; + return coerceObjectToInt(object, defaultValue); +} + +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index{ return [JSONHelper readStringFromArray:array forIndex:index withDefaultValue:nil]; } @@ -62,4 +88,13 @@ NSNumber* coerceObjectToNumber(NSObject *object, NSNumber *defaultValue) { return coerceObjectToNumber(object, defaultValue); } ++(int)readIntFromArray:(NSArray*)array forIndex:(NSUInteger)index { + return [JSONHelper readIntFromArray:array forIndex:index withDefaultValue:0]; +} + ++(int)readIntFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(int)defaultValue { + NSObject *object = [array objectAtIndex:index]; + return coerceObjectToInt(object, defaultValue); +} + @end diff --git a/MonsterCardsTests/Helpers/JSONHelperTests.m b/MonsterCardsTests/Helpers/JSONHelperTests.m index 77a2470..abbe1a5 100644 --- a/MonsterCardsTests/Helpers/JSONHelperTests.m +++ b/MonsterCardsTests/Helpers/JSONHelperTests.m @@ -191,6 +191,51 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { XCTAssertNil(readNumber); } +- (void)testReadIntFromDictionaryReturnsZeroIfKeyNotPresent { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + int readNumber = [JSONHelper readIntFromDictionary:jsonRoot forKey:_jsonIntegerKey]; + XCTAssertEqual(0, readNumber); +} + +- (void)testReadIntFromDictionaryWithDefaultReturnsDefaultIfKeyNotPresent { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + int readNumber = [JSONHelper readIntFromDictionary:jsonRoot forKey:_jsonIntegerKey withDefaultValue:[_jsonIntegerValue intValue]]; + XCTAssertEqual([_jsonIntegerValue intValue], readNumber); +} + +- (void) testReadIntFromDictionaryReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonIntegerFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + int readNumber = [JSONHelper readIntFromDictionary:jsonRoot forKey:_jsonIntegerKey]; + XCTAssertEqual([_jsonIntegerValue intValue], readNumber); +} + +- (void)testReadIntFromDictionaryWithDefaultReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonIntegerFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + int readNumber = [JSONHelper readIntFromDictionary:jsonRoot forKey:_jsonIntegerKey withDefaultValue:67890]; + XCTAssertEqual([_jsonIntegerValue intValue], readNumber); +} + +- (void) testReadIntFromDictionaryReturnsZeroIfWrongType { + NSString *jsonString = [NSString stringWithFormat:@"{\"%@\":\"%@\"}", _jsonIntegerKey, _jsonStringValue]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + int readNumber = [JSONHelper readIntFromDictionary:jsonRoot forKey:_jsonIntegerKey]; + XCTAssertEqual(0, readNumber); +} + #pragma mark - Integers in Arrays - (void)testReadIntegerFromArrayReturnsNilIfNotAnInteger { @@ -230,4 +275,41 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { XCTAssertEqualObjects(_jsonIntegerValue, readNumber); } +- (void)testReadIntFromArrayReturnsNilIfNotAnInteger { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + int readNumber = [JSONHelper readIntFromArray:jsonRoot forIndex:0]; + XCTAssertEqual(0, readNumber); +} + +- (void)testReadIntFromArrayWithDefaultReturnsDefaultValueIfNotAnInteger { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + int readNumber = [JSONHelper readIntFromArray:jsonRoot forIndex:0 withDefaultValue:[_jsonIntegerValue intValue]]; + XCTAssertEqual([_jsonIntegerValue intValue], readNumber); +} + +- (void)testReadIntFromArrayThrowsIfIndexOutOfRange { + // TODO: Decide if this should throw or return 0 + NSString *jsonString = @"[]"; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + XCTAssertThrows([JSONHelper readIntFromArray:jsonRoot forIndex:0]); + XCTAssertThrows([JSONHelper readIntFromArray:jsonRoot forIndex:-1]); +} + +- (void)testReadIntFromArrayReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"[%@]", _jsonIntegerValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + int readNumber = [JSONHelper readIntFromArray:jsonRoot forIndex:0]; + XCTAssertEqual([_jsonIntegerValue intValue], readNumber); +} + @end From 9bf1595f292d9039a0272a2ee57b1012623bf383 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 17 Sep 2020 00:32:53 -0700 Subject: [PATCH 063/195] Adds methods to JSONHelper to read boolean values. --- MonsterCards/Helpers/JSONHelper.h | 4 + MonsterCards/Helpers/JSONHelper.m | 26 ++++++ MonsterCardsTests/Helpers/JSONHelperTests.m | 92 +++++++++++++++++++++ 3 files changed, 122 insertions(+) diff --git a/MonsterCards/Helpers/JSONHelper.h b/MonsterCards/Helpers/JSONHelper.h index 55ff2da..aaf2107 100644 --- a/MonsterCards/Helpers/JSONHelper.h +++ b/MonsterCards/Helpers/JSONHelper.h @@ -18,6 +18,8 @@ NS_ASSUME_NONNULL_BEGIN +(NSNumber*)readNumberFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSNumber* _Nullable)defaultValue; +(int)readIntFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; +(int)readIntFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(int)defaultValue; ++(BOOL)readBoolFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; ++(BOOL)readBoolFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(BOOL)defaultValue; +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index; +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSString* _Nullable)defaultValue; @@ -25,6 +27,8 @@ NS_ASSUME_NONNULL_BEGIN +(NSNumber*)readNumberFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSNumber* _Nullable)defaultValue; +(int)readIntFromArray:(NSArray*)array forIndex:(NSUInteger)index; +(int)readIntFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(int)defaultValue; ++(BOOL)readBoolFromArray:(NSArray*)array forIndex:(NSUInteger)index; ++(BOOL)readBoolFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(BOOL)defaultValue; @end diff --git a/MonsterCards/Helpers/JSONHelper.m b/MonsterCards/Helpers/JSONHelper.m index 943ecce..5b64643 100644 --- a/MonsterCards/Helpers/JSONHelper.m +++ b/MonsterCards/Helpers/JSONHelper.m @@ -43,6 +43,14 @@ int coerceObjectToInt(NSObject *object, int defaultValue) { return defaultValue; } +BOOL coerceObjectToBool(NSObject *object, BOOL defaultValue) { + if ([object isKindOfClass:[NSNumber class]]) { + return [(NSNumber*)object boolValue]; + } + + return defaultValue; +} + +(NSString*)readStringFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key { return [JSONHelper readStringFromDictionary:dictionary forKey:key withDefaultValue:nil]; } @@ -70,6 +78,15 @@ int coerceObjectToInt(NSObject *object, int defaultValue) { return coerceObjectToInt(object, defaultValue); } ++(BOOL)readBoolFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key { + return [JSONHelper readBoolFromDictionary:dictionary forKey:key withDefaultValue:NO]; +} + ++(BOOL)readBoolFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(BOOL)defaultValue { + NSObject *object = [dictionary objectForKey:key]; + return coerceObjectToBool(object, defaultValue); +} + +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index{ return [JSONHelper readStringFromArray:array forIndex:index withDefaultValue:nil]; } @@ -97,4 +114,13 @@ int coerceObjectToInt(NSObject *object, int defaultValue) { return coerceObjectToInt(object, defaultValue); } ++(BOOL)readBoolFromArray:(NSArray*)array forIndex:(NSUInteger)index { + return [JSONHelper readBoolFromArray:array forIndex:index withDefaultValue:nil]; +} + ++(BOOL)readBoolFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(BOOL)defaultValue { + NSObject *object = [array objectAtIndex:index]; + return coerceObjectToBool(object, defaultValue); +} + @end diff --git a/MonsterCardsTests/Helpers/JSONHelperTests.m b/MonsterCardsTests/Helpers/JSONHelperTests.m index abbe1a5..7fa1bff 100644 --- a/MonsterCardsTests/Helpers/JSONHelperTests.m +++ b/MonsterCardsTests/Helpers/JSONHelperTests.m @@ -20,6 +20,9 @@ NSString *_jsonIntegerKey; NSNumber *_jsonIntegerValue; NSString *_jsonIntegerFragment; + NSString *_jsonBooleanKey; + BOOL _jsonBooleanValue; + NSString *_jsonBooleanFragment; } NSString* escapeStringForJSON(NSString *unescaped) { @@ -53,6 +56,9 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { _jsonIntegerKey = @"my_int"; _jsonIntegerValue = @12345; _jsonIntegerFragment = [NSString stringWithFormat:@"\"%@\":%@", escapeStringForJSON(_jsonIntegerKey), [_jsonIntegerValue stringValue]]; + _jsonBooleanKey = @"my_bool"; + _jsonBooleanValue = YES; + _jsonBooleanFragment = [NSString stringWithFormat:@"\"%@\":true", escapeStringForJSON(_jsonBooleanKey)]; } - (void)tearDown { @@ -312,4 +318,90 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { XCTAssertEqual([_jsonIntegerValue intValue], readNumber); } +#pragma mark - BOOLs in Dictionaries + +- (void)testReadBoolFromDictionaryReturnsFalseIfKeyNotPresent { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + BOOL readValue = [JSONHelper readBoolFromDictionary:jsonRoot forKey:_jsonBooleanKey]; + XCTAssertEqual(0, readValue); +} + +- (void)testReadBoolFromDictionaryWithDefaultReturnsDefaultIfKeyNotPresent { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + BOOL readValue = [JSONHelper readBoolFromDictionary:jsonRoot forKey:_jsonIntegerKey withDefaultValue:_jsonBooleanValue]; + XCTAssertEqual(_jsonBooleanValue, readValue); +} + +- (void) testReadBoolFromDictionaryReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonBooleanFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + BOOL readValue = [JSONHelper readBoolFromDictionary:jsonRoot forKey:_jsonBooleanKey]; + XCTAssertEqual(_jsonBooleanValue, readValue); +} + +- (void)testReadBoolFromDictionaryWithDefaultReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonBooleanFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + BOOL readValue = [JSONHelper readBoolFromDictionary:jsonRoot forKey:_jsonBooleanKey withDefaultValue:NO]; + XCTAssertEqual(_jsonBooleanValue, readValue); +} + +- (void) testReadBoolFromDictionaryReturnsFalseIfWrongType { + NSString *jsonString = [NSString stringWithFormat:@"{\"%@\":\"%@\"}", _jsonIntegerKey, _jsonStringValue]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + BOOL readValue = [JSONHelper readBoolFromDictionary:jsonRoot forKey:_jsonIntegerKey]; + XCTAssertEqual(NO, readValue); +} + +#pragma mark - BOOLs in Arrays + +- (void)testReadBoolFromArrayReturnsFalseIfNotCoercable { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + BOOL readValue = [JSONHelper readBoolFromArray:jsonRoot forIndex:0]; + XCTAssertEqual(NO, readValue); +} + +- (void)testReadBoolFromArrayWithDefaultReturnsDefaultValueIfNotCoercable { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + BOOL readValue = [JSONHelper readIntFromArray:jsonRoot forIndex:0 withDefaultValue:YES]; + XCTAssertEqual(YES, readValue); +} + +- (void)testReadBoolFromArrayThrowsIfIndexOutOfRange { + // TODO: Decide if this should throw or return 0 + NSString *jsonString = @"[]"; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + XCTAssertThrows([JSONHelper readBoolFromArray:jsonRoot forIndex:0]); + XCTAssertThrows([JSONHelper readBoolFromArray:jsonRoot forIndex:-1]); +} + +- (void)testReadBoolFromArrayReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"[%s]", _jsonBooleanValue ? "true" : "false"]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + BOOL readValue = [JSONHelper readBoolFromArray:jsonRoot forIndex:0]; + XCTAssertEqual(_jsonBooleanValue, readValue); +} + @end From 555efac0c4126493f776c7a3c135e56dc1676a3d Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 17 Sep 2020 01:32:52 -0700 Subject: [PATCH 064/195] Adds JSONHelper methods to read dictionaries. --- MonsterCards/Helpers/JSONHelper.h | 4 + MonsterCards/Helpers/JSONHelper.m | 26 ++++++ MonsterCardsTests/Helpers/JSONHelperTests.m | 95 +++++++++++++++++++++ 3 files changed, 125 insertions(+) diff --git a/MonsterCards/Helpers/JSONHelper.h b/MonsterCards/Helpers/JSONHelper.h index aaf2107..50948e0 100644 --- a/MonsterCards/Helpers/JSONHelper.h +++ b/MonsterCards/Helpers/JSONHelper.h @@ -20,6 +20,8 @@ NS_ASSUME_NONNULL_BEGIN +(int)readIntFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(int)defaultValue; +(BOOL)readBoolFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; +(BOOL)readBoolFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(BOOL)defaultValue; ++(NSDictionary*)readDictionaryFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; ++(NSDictionary*)readDictionaryFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSDictionary* _Nullable)defaultValue; +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index; +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSString* _Nullable)defaultValue; @@ -29,6 +31,8 @@ NS_ASSUME_NONNULL_BEGIN +(int)readIntFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(int)defaultValue; +(BOOL)readBoolFromArray:(NSArray*)array forIndex:(NSUInteger)index; +(BOOL)readBoolFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(BOOL)defaultValue; ++(NSDictionary*)readDictionaryFromArray:(NSArray*)array forIndex:(NSUInteger)index; ++(NSDictionary*)readDictionaryFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSDictionary* _Nullable)defaultValue; @end diff --git a/MonsterCards/Helpers/JSONHelper.m b/MonsterCards/Helpers/JSONHelper.m index 5b64643..1b81862 100644 --- a/MonsterCards/Helpers/JSONHelper.m +++ b/MonsterCards/Helpers/JSONHelper.m @@ -87,6 +87,19 @@ BOOL coerceObjectToBool(NSObject *object, BOOL defaultValue) { return coerceObjectToBool(object, defaultValue); } ++(NSDictionary*)readDictionaryFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key { + return [JSONHelper readDictionaryFromDictionary:dictionary forKey:key withDefaultValue:nil]; +} + ++(NSDictionary*)readDictionaryFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSDictionary* _Nullable)defaultValue { + NSObject *object = [dictionary objectForKey:key]; + if ([object isKindOfClass:[NSDictionary class]]) { + return (NSDictionary*)object; + } + + return defaultValue; +} + +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index{ return [JSONHelper readStringFromArray:array forIndex:index withDefaultValue:nil]; } @@ -123,4 +136,17 @@ BOOL coerceObjectToBool(NSObject *object, BOOL defaultValue) { return coerceObjectToBool(object, defaultValue); } ++(NSDictionary*)readDictionaryFromArray:(NSArray*)array forIndex:(NSUInteger)index { + return [JSONHelper readDictionaryFromArray:array forIndex:index withDefaultValue:nil]; +} + ++(NSDictionary*)readDictionaryFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSDictionary* _Nullable)defaultValue { + NSObject *object = [array objectAtIndex:index]; + if ([object isKindOfClass:[NSDictionary class]]) { + return (NSDictionary*)object; + } + + return defaultValue; +} + @end diff --git a/MonsterCardsTests/Helpers/JSONHelperTests.m b/MonsterCardsTests/Helpers/JSONHelperTests.m index 7fa1bff..ddf42d6 100644 --- a/MonsterCardsTests/Helpers/JSONHelperTests.m +++ b/MonsterCardsTests/Helpers/JSONHelperTests.m @@ -23,6 +23,10 @@ NSString *_jsonBooleanKey; BOOL _jsonBooleanValue; NSString *_jsonBooleanFragment; + NSString *_jsonDictionaryKey; + NSDictionary *_jsonDictionaryValue; + NSString *_jsonDictionaryFragment; + NSString *_jsonDictionaryStringValue; } NSString* escapeStringForJSON(NSString *unescaped) { @@ -59,6 +63,10 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { _jsonBooleanKey = @"my_bool"; _jsonBooleanValue = YES; _jsonBooleanFragment = [NSString stringWithFormat:@"\"%@\":true", escapeStringForJSON(_jsonBooleanKey)]; + _jsonDictionaryKey = @"my_dictionary"; + _jsonDictionaryValue = [NSDictionary dictionaryWithObjectsAndKeys:_jsonStringValue, _jsonStringKey, nil]; + _jsonDictionaryStringValue = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + _jsonDictionaryFragment = [NSString stringWithFormat:@"\"%@\":%@", escapeStringForJSON(_jsonDictionaryKey), _jsonDictionaryStringValue]; } - (void)tearDown { @@ -242,6 +250,54 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { XCTAssertEqual(0, readNumber); } +#pragma mark - Dictionaries in Dictionaries + +- (void)testReadDictionaryFromDictionaryReturnsNilIfKeyNotPresent { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + + NSDictionary *readValue = [JSONHelper readDictionaryFromDictionary:jsonRoot forKey:_jsonDictionaryKey]; + XCTAssertNil(readValue); +} + +- (void)testReadDictionaryFromDictionaryWithDefaultReturnsDefaultIfKeyNotPresent{ + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSDictionary *readValue = [JSONHelper readDictionaryFromDictionary:jsonRoot forKey:_jsonDictionaryKey withDefaultValue:@{}]; + XCTAssertEqualObjects(@{}, readValue); +} + +- (void)testReadDictionaryFromDictionaryReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonDictionaryFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSDictionary *readValue = [JSONHelper readDictionaryFromDictionary:jsonRoot forKey:_jsonDictionaryKey]; + XCTAssertEqualObjects(_jsonDictionaryValue, readValue); +} + +- (void)testReadDictionaryFromDictionaryWithDefaultReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonIntegerFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSDictionary *readValue = [JSONHelper readDictionaryFromDictionary:jsonRoot forKey:_jsonDictionaryKey withDefaultValue:@{}]; + XCTAssertEqualObjects(@{}, readValue); +} + +- (void)testReadDictionaryFromDictionaryReturnsNilIfWrongType { + NSString *jsonString = [NSString stringWithFormat:@"{\"%@\":\"%@\"}", _jsonDictionaryKey, _jsonStringValue]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSDictionary *readValue = [JSONHelper readDictionaryFromDictionary:jsonRoot forKey:_jsonDictionaryKey]; + XCTAssertNil(readValue); +} + #pragma mark - Integers in Arrays - (void)testReadIntegerFromArrayReturnsNilIfNotAnInteger { @@ -404,4 +460,43 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { XCTAssertEqual(_jsonBooleanValue, readValue); } +#pragma mark - Dictionaries in Arrays + +- (void)testReadDictionaryFromArrayReturnsNilIfNotCoercable { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSDictionary *readValue = [JSONHelper readDictionaryFromArray:jsonRoot forIndex:0]; + XCTAssertNil(readValue); +} + +- (void)testReadDictionaryFromArrayWithDefaultReturnsDefaultValueIfNotCoercable { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSDictionary *readValue = [JSONHelper readDictionaryFromArray:jsonRoot forIndex:0 withDefaultValue:@{}]; + XCTAssertEqualObjects(@{}, readValue); +} + +- (void)testReadDictionaryFromArrayThrowsIfIndexOutOfRange { + // TODO: Decide if this should throw or return nil + NSString *jsonString = @"[]"; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + XCTAssertThrows([JSONHelper readDictionaryFromArray:jsonRoot forIndex:0]); + XCTAssertThrows([JSONHelper readDictionaryFromArray:jsonRoot forIndex:-1]); +} + +- (void)testReadDictionaryFromArrayReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"[%@]", _jsonDictionaryStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSDictionary *readValue = [JSONHelper readDictionaryFromArray:jsonRoot forIndex:0]; + XCTAssertEqualObjects(_jsonDictionaryValue, readValue); +} + @end From 8f52940d98910257ddb4599a2009ad28a2bb6def Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 17 Sep 2020 12:37:03 -0700 Subject: [PATCH 065/195] Adds JSONHelper methods to read arrays. --- MonsterCards/Helpers/JSONHelper.h | 4 + MonsterCards/Helpers/JSONHelper.m | 26 ++++++ MonsterCardsTests/Helpers/JSONHelperTests.m | 97 ++++++++++++++++++++- 3 files changed, 126 insertions(+), 1 deletion(-) diff --git a/MonsterCards/Helpers/JSONHelper.h b/MonsterCards/Helpers/JSONHelper.h index 50948e0..05b1294 100644 --- a/MonsterCards/Helpers/JSONHelper.h +++ b/MonsterCards/Helpers/JSONHelper.h @@ -22,6 +22,8 @@ NS_ASSUME_NONNULL_BEGIN +(BOOL)readBoolFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(BOOL)defaultValue; +(NSDictionary*)readDictionaryFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; +(NSDictionary*)readDictionaryFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSDictionary* _Nullable)defaultValue; ++(NSArray*)readArrayFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key; ++(NSArray*)readArrayFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSArray* _Nullable)defaultValue; +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index; +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSString* _Nullable)defaultValue; @@ -33,6 +35,8 @@ NS_ASSUME_NONNULL_BEGIN +(BOOL)readBoolFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(BOOL)defaultValue; +(NSDictionary*)readDictionaryFromArray:(NSArray*)array forIndex:(NSUInteger)index; +(NSDictionary*)readDictionaryFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSDictionary* _Nullable)defaultValue; ++(NSArray*)readArrayFromArray:(NSArray*)array forIndex:(NSUInteger)index; ++(NSArray*)readArrayFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSArray* _Nullable)defaultValue; @end diff --git a/MonsterCards/Helpers/JSONHelper.m b/MonsterCards/Helpers/JSONHelper.m index 1b81862..f8d128d 100644 --- a/MonsterCards/Helpers/JSONHelper.m +++ b/MonsterCards/Helpers/JSONHelper.m @@ -100,6 +100,19 @@ BOOL coerceObjectToBool(NSObject *object, BOOL defaultValue) { return defaultValue; } ++(NSArray*)readArrayFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key { + return [JSONHelper readArrayFromDictionary:dictionary forKey:key withDefaultValue:nil]; +} + ++(NSArray*)readArrayFromDictionary:(NSDictionary*)dictionary forKey:(NSString*)key withDefaultValue:(NSArray* _Nullable)defaultValue { + NSObject *object = [dictionary objectForKey:key]; + if ([object isKindOfClass:[NSArray class]]) { + return (NSArray*)object; + } + + return defaultValue; +} + +(NSString*)readStringFromArray:(NSArray*)array forIndex:(NSUInteger)index{ return [JSONHelper readStringFromArray:array forIndex:index withDefaultValue:nil]; } @@ -149,4 +162,17 @@ BOOL coerceObjectToBool(NSObject *object, BOOL defaultValue) { return defaultValue; } ++(NSArray*)readArrayFromArray:(NSArray*)array forIndex:(NSUInteger)index { + return [JSONHelper readArrayFromArray:array forIndex:index withDefaultValue:nil]; +} + ++(NSArray*)readArrayFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSArray* _Nullable)defaultValue { + NSObject *object = [array objectAtIndex:index]; + if ([object isKindOfClass:[NSArray class]]) { + return (NSArray*)object; + } + + return defaultValue; +} + @end diff --git a/MonsterCardsTests/Helpers/JSONHelperTests.m b/MonsterCardsTests/Helpers/JSONHelperTests.m index ddf42d6..d23ecc2 100644 --- a/MonsterCardsTests/Helpers/JSONHelperTests.m +++ b/MonsterCardsTests/Helpers/JSONHelperTests.m @@ -27,6 +27,10 @@ NSDictionary *_jsonDictionaryValue; NSString *_jsonDictionaryFragment; NSString *_jsonDictionaryStringValue; + NSString *_jsonArrayKey; + NSArray *_jsonArrayValue; + NSString *_jsonArrayFragment; + NSString *_jsonArrayStringValue; } NSString* escapeStringForJSON(NSString *unescaped) { @@ -64,9 +68,13 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { _jsonBooleanValue = YES; _jsonBooleanFragment = [NSString stringWithFormat:@"\"%@\":true", escapeStringForJSON(_jsonBooleanKey)]; _jsonDictionaryKey = @"my_dictionary"; - _jsonDictionaryValue = [NSDictionary dictionaryWithObjectsAndKeys:_jsonStringValue, _jsonStringKey, nil]; + _jsonDictionaryValue = @{_jsonStringKey: _jsonStringValue}; _jsonDictionaryStringValue = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; _jsonDictionaryFragment = [NSString stringWithFormat:@"\"%@\":%@", escapeStringForJSON(_jsonDictionaryKey), _jsonDictionaryStringValue]; + _jsonArrayKey = @"my_array"; + _jsonArrayValue = @[_jsonStringValue]; + _jsonArrayStringValue = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + _jsonArrayFragment = [NSString stringWithFormat:@"\"%@\":%@", escapeStringForJSON(_jsonArrayKey), _jsonArrayStringValue]; } - (void)tearDown { @@ -298,6 +306,54 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { XCTAssertNil(readValue); } +#pragma mark - Arrays in Dictionaries + +- (void)testReadArrayFromDictionaryReturnsNilIfKeyNotPresent { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + + NSArray *readValue = [JSONHelper readArrayFromDictionary:jsonRoot forKey:_jsonArrayKey]; + XCTAssertNil(readValue); +} + +- (void)testReadArrayFromDictionaryWithDefaultReturnsDefaultIfKeyNotPresent{ + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonStringFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSArray *readValue = [JSONHelper readArrayFromDictionary:jsonRoot forKey:_jsonArrayKey withDefaultValue:@[]]; + XCTAssertEqualObjects(@[], readValue); +} + +- (void)testReadArrayFromDictionaryReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonArrayFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSArray *readValue = [JSONHelper readArrayFromDictionary:jsonRoot forKey:_jsonArrayKey]; + XCTAssertEqualObjects(_jsonArrayValue, readValue); +} + +- (void)testReadArrayFromDictionaryWithDefaultReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"{%@}", _jsonIntegerFragment]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSArray *readValue = [JSONHelper readArrayFromDictionary:jsonRoot forKey:_jsonArrayKey withDefaultValue:@[]]; + XCTAssertEqualObjects(@[], readValue); +} + +- (void)testReadArrayFromDictionaryReturnsNilIfWrongType { + NSString *jsonString = [NSString stringWithFormat:@"{\"%@\":\"%@\"}", _jsonArrayKey, _jsonStringValue]; + NSDictionary *jsonRoot = readJSONDictionaryFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSArray *readValue = [JSONHelper readArrayFromDictionary:jsonRoot forKey:_jsonArrayKey]; + XCTAssertNil(readValue); +} + #pragma mark - Integers in Arrays - (void)testReadIntegerFromArrayReturnsNilIfNotAnInteger { @@ -499,4 +555,43 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { XCTAssertEqualObjects(_jsonDictionaryValue, readValue); } +#pragma mark - Arrays in Arrays + +- (void)testReadArrayFromArrayReturnsNilIfNotCoercable { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSArray *readValue = [JSONHelper readArrayFromArray:jsonRoot forIndex:0]; + XCTAssertNil(readValue); +} + +- (void)testReadArrayFromArrayWithDefaultReturnsDefaultValueIfNotCoercable { + NSString *jsonString = [NSString stringWithFormat:@"[\"%@\"]", _jsonStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSArray *readValue = [JSONHelper readArrayFromArray:jsonRoot forIndex:0 withDefaultValue:@[]]; + XCTAssertEqualObjects(@[], readValue); +} + +- (void)testReadArrayFromArrayThrowsIfIndexOutOfRange { + // TODO: Decide if this should throw or return nil + NSString *jsonString = @"[]"; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + XCTAssertThrows([JSONHelper readArrayFromArray:jsonRoot forIndex:0]); + XCTAssertThrows([JSONHelper readArrayFromArray:jsonRoot forIndex:-1]); +} + +- (void)testReadArrayFromArrayReturnsCorrectValue { + NSString *jsonString = [NSString stringWithFormat:@"[%@]", _jsonArrayStringValue]; + NSArray *jsonRoot = readJSONArrayFromString(jsonString); + XCTAssertNotNil(jsonRoot); + + NSArray *readValue = [JSONHelper readArrayFromArray:jsonRoot forIndex:0]; + XCTAssertEqualObjects(_jsonArrayValue, readValue); +} + @end From c224c51f8426f066d8b3e096b0f968bfef6c2975 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 17 Sep 2020 12:58:59 -0700 Subject: [PATCH 066/195] Adds JSONHelper methods to make parsing json from strings and NSData objects easier. --- MonsterCards/Helpers/JSONHelper.h | 8 ++ MonsterCards/Helpers/JSONHelper.m | 49 ++++++++++ MonsterCardsTests/Helpers/JSONHelperTests.m | 100 ++++++++++++++++++++ 3 files changed, 157 insertions(+) diff --git a/MonsterCards/Helpers/JSONHelper.h b/MonsterCards/Helpers/JSONHelper.h index 05b1294..0ee4b67 100644 --- a/MonsterCards/Helpers/JSONHelper.h +++ b/MonsterCards/Helpers/JSONHelper.h @@ -38,6 +38,14 @@ NS_ASSUME_NONNULL_BEGIN +(NSArray*)readArrayFromArray:(NSArray*)array forIndex:(NSUInteger)index; +(NSArray*)readArrayFromArray:(NSArray*)array forIndex:(NSUInteger)index withDefaultValue:(NSArray* _Nullable)defaultValue; ++(id)parseJSONString:(NSString*)jsonString; ++(NSDictionary*)parseJSONStringAsDictionary:(NSString*)jsonString; ++(NSArray*)parseJSONStringAsArray:(NSString*)jsonString; + ++(id)parseJSONData:(NSData*)jsonData; ++(NSDictionary*)parseJSONDataAsDictionary:(NSData*)jsonData; ++(NSArray*)parseJSONDataAsArray:(NSData*)jsonData; + @end NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Helpers/JSONHelper.m b/MonsterCards/Helpers/JSONHelper.m index f8d128d..a30b092 100644 --- a/MonsterCards/Helpers/JSONHelper.m +++ b/MonsterCards/Helpers/JSONHelper.m @@ -175,4 +175,53 @@ BOOL coerceObjectToBool(NSObject *object, BOOL defaultValue) { return defaultValue; } ++(id)parseJSONString:(NSString*)jsonString { + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + NSArray *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; + return jsonRoot; +} + ++(NSDictionary*)parseJSONStringAsDictionary:(NSString*)jsonString { + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + NSDictionary *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; + if (![jsonRoot isKindOfClass:[NSDictionary class]]) { + return nil; + } else { + return jsonRoot; + } +} + ++(NSArray*)parseJSONStringAsArray:(NSString*)jsonString { + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + NSArray *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; + if (![jsonRoot isKindOfClass:[NSArray class]]) { + return nil; + } else { + return jsonRoot; + } +} + ++(id)parseJSONData:(NSData*)jsonData { + NSArray *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; + return jsonRoot; +} + ++(NSDictionary*)parseJSONDataAsDictionary:(NSData*)jsonData { + NSDictionary *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; + if (![jsonRoot isKindOfClass:[NSDictionary class]]) { + return nil; + } else { + return jsonRoot; + } +} + ++(NSArray*)parseJSONDataAsArray:(NSData*)jsonData { + NSArray *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; + if (![jsonRoot isKindOfClass:[NSArray class]]) { + return nil; + } else { + return jsonRoot; + } +} + @end diff --git a/MonsterCardsTests/Helpers/JSONHelperTests.m b/MonsterCardsTests/Helpers/JSONHelperTests.m index d23ecc2..ce3bc83 100644 --- a/MonsterCardsTests/Helpers/JSONHelperTests.m +++ b/MonsterCardsTests/Helpers/JSONHelperTests.m @@ -594,4 +594,104 @@ NSArray* readJSONArrayFromString(NSString *jsonString) { XCTAssertEqualObjects(_jsonArrayValue, readValue); } +#pragma mark - JSON parsing + +- (void)testParseJSONDataReturnsDictionary { + NSString *jsonString = @"{\"a\":1,\"b\":2}"; + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + + id parsedResult = [JSONHelper parseJSONData:jsonData]; + XCTAssertNotNil(parsedResult); + XCTAssertTrue([parsedResult isKindOfClass:[NSDictionary class]]); +} + +- (void)testParseJSONDataReturnsArray { + NSString *jsonString = @"[\"a\",1,\"b\",2]"; + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + + id parsedResult = [JSONHelper parseJSONData:jsonData]; + XCTAssertNotNil(parsedResult); + XCTAssertTrue([parsedResult isKindOfClass:[NSArray class]]); +} + +- (void)testParseJSONDataAsDictionaryReturnsDictionary { + NSString *jsonString = @"{\"a\":1,\"b\":2}"; + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + + NSDictionary *parsedResult = [JSONHelper parseJSONDataAsDictionary:jsonData]; + XCTAssertNotNil(parsedResult); + XCTAssertTrue([parsedResult isKindOfClass:[NSDictionary class]]); +} + +- (void)testParseJSONDataAsDictionaryReturnsNilIfNotDictionary { + NSString *jsonString = @"[\"a\",1,\"b\",2]"; + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + + id parsedResult = [JSONHelper parseJSONDataAsDictionary:jsonData]; + XCTAssertNil(parsedResult); +} + +- (void)testParseJSONDataAsArrayReturnsArray { + NSString *jsonString = @"[\"a\",1,\"b\",2]"; + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + + id parsedResult = [JSONHelper parseJSONDataAsArray:jsonData]; + XCTAssertNotNil(parsedResult); + XCTAssertTrue([parsedResult isKindOfClass:[NSArray class]]); +} + +- (void)testParseJSONDataAsArrayReturnsNilIfNotArray { + NSString *jsonString = @"{\"a\":1,\"b\":2}"; + NSData* jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; + + id parsedResult = [JSONHelper parseJSONDataAsArray:jsonData]; + XCTAssertNil(parsedResult); +} + +- (void)testParseJSONStringReturnsDictionary { + NSString *jsonString = @"{\"a\":1,\"b\":2}"; + + id parsedResult = [JSONHelper parseJSONString:jsonString]; + XCTAssertNotNil(parsedResult); + XCTAssertTrue([parsedResult isKindOfClass:[NSDictionary class]]); +} + +- (void)testParseJSONStringReturnsArray { + NSString *jsonString = @"[\"a\",1,\"b\",2]"; + + id parsedResult = [JSONHelper parseJSONString:jsonString]; + XCTAssertNotNil(parsedResult); + XCTAssertTrue([parsedResult isKindOfClass:[NSArray class]]); +} + +- (void)testParseJSONStringAsDictionaryReturnsDictionary { + NSString *jsonString = @"{\"a\":1,\"b\":2}"; + + NSDictionary *parsedResult = [JSONHelper parseJSONStringAsDictionary:jsonString]; + XCTAssertNotNil(parsedResult); + XCTAssertTrue([parsedResult isKindOfClass:[NSDictionary class]]); +} + +- (void)testParseJSONStringAsDictionaryReturnsNilIfNotDictionary { + NSString *jsonString = @"[\"a\",1,\"b\",2]"; + + id parsedResult = [JSONHelper parseJSONStringAsDictionary:jsonString]; + XCTAssertNil(parsedResult); +} + +- (void)testParseJSONStringAsArrayReturnsArray { + NSString *jsonString = @"[\"a\",1,\"b\",2]"; + + id parsedResult = [JSONHelper parseJSONStringAsArray:jsonString]; + XCTAssertNotNil(parsedResult); + XCTAssertTrue([parsedResult isKindOfClass:[NSArray class]]); +} + +- (void)testParseJSONStringAsArrayReturnsNilIfNotArray { + NSString *jsonString = @"{\"a\":1,\"b\":2}"; + + id parsedResult = [JSONHelper parseJSONStringAsArray:jsonString]; + XCTAssertNil(parsedResult); +} + @end From c58f0909bb951ab6e6ffa4da202280e992f60d3e Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 17 Sep 2020 13:03:48 -0700 Subject: [PATCH 067/195] Makes Monster initializer use new JSONHelper methods to make parsing more expressive. --- MonsterCards/Models/Monster.m | 53 +++++++++++------------------------ 1 file changed, 16 insertions(+), 37 deletions(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index e65233b..1e49694 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -8,6 +8,7 @@ #import "Monster.h" #import "StringHelper.h" +#import "JSONHelper.h" @implementation Monster @@ -60,44 +61,22 @@ -(id)initWithJSONData: (NSData*)jsonData andContext:(NSManagedObjectContext*)context { self = [self initWithContext:context]; - NSDictionary *jsonRoot = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; - NSNumber *tempNumber; + NSDictionary *jsonRoot = [JSONHelper parseJSONDataAsDictionary:jsonData]; - self.name = [jsonRoot objectForKey:@"name"] ?: @""; - self.size = [jsonRoot objectForKey:@"size"] ?: @""; - self.type = [jsonRoot objectForKey:@"type"] ?: @""; - self.subtype = [jsonRoot objectForKey:@"tag"] ?: @""; - self.alignment = [jsonRoot objectForKey:@"alignment"] ?: @""; - self.armorName = [jsonRoot objectForKey:@"armorName"] ?: @""; - self.otherArmorDescription = [jsonRoot objectForKey:@"otherArmorDesc"] ?: @""; - tempNumber = [jsonRoot objectForKey:@"strPoints"]; - if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { - self.strengthScore = tempNumber.intValue; - } - tempNumber = [jsonRoot objectForKey:@"dexPoints"]; - if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { - self.dexterityScore = tempNumber.intValue; - } - tempNumber = [jsonRoot objectForKey:@"conPoints"]; - if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { - self.constitutionScore = tempNumber.intValue; - } - tempNumber = [jsonRoot objectForKey:@"intPoints"]; - if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { - self.intelligenceScore = tempNumber.intValue; - } - tempNumber = [jsonRoot objectForKey:@"wisPoints"]; - if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { - self.wisdomScore = tempNumber.intValue; - } - tempNumber = [jsonRoot objectForKey:@"chaPoints"]; - if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { - self.charismaScore = tempNumber.intValue; - } - tempNumber = [jsonRoot objectForKey:@"shieldBonus"]; - if (tempNumber != nil && [tempNumber isKindOfClass:[NSNumber class]]) { - self.shieldBonus = tempNumber.intValue; - } + self.name = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"name" withDefaultValue:@""]; + self.size = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"size" withDefaultValue:@""]; + self.type = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"type" withDefaultValue:@""]; + self.subtype = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"tag" withDefaultValue:@""]; + self.alignment = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"alignment" withDefaultValue:@""]; + self.armorName = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"armorName" withDefaultValue:@""]; + self.otherArmorDescription = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"otherArmorDesc" withDefaultValue:@""]; + self.strengthScore = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"strPoints" withDefaultValue:0]; + self.dexterityScore = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"dexPoints" withDefaultValue:0]; + self.constitutionScore = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"conPoints" withDefaultValue:0]; + self.intelligenceScore = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"intPoints" withDefaultValue:0]; + self.wisdomScore = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"wisPoints" withDefaultValue:0]; + self.charismaScore = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"chaPoints" withDefaultValue:0]; + self.shieldBonus = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"shieldBonus" withDefaultValue:0]; return self; } From b41b138f9312dabf41b68d279cc6bdd4b981f8e2 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 17 Sep 2020 13:04:28 -0700 Subject: [PATCH 068/195] Updates comment explaining the format of the monster meta string. --- MonsterCards/Models/Monster.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 1e49694..907567d 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -90,7 +90,7 @@ } -(NSString*)meta { - //"${size} ${type} (${subtype}) ${alignment}" + // "${size} ${type} (${subtype}) ${alignment}" NSMutableArray *parts = [NSMutableArray arrayWithCapacity:4]; if (![StringHelper isStringNilOrEmpty:self.size]) { From da6a03144a7233872ff62bb02fedcc5c9c2a5252 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Thu, 17 Sep 2020 20:24:12 -0700 Subject: [PATCH 069/195] Updates to Xcode 12. Drops the iOS version in both projects to 13 from 13.0 and 13.7. --- MonsterCards.xcodeproj/project.pbxproj | 8 +- .../xcschemes/MonsterCards.xcscheme | 2 +- Podfile | 2 +- Podfile.lock | 2 +- Pods/Manifest.lock | 2 +- Pods/Pods.xcodeproj/project.pbxproj | 734 +++++++++--------- 6 files changed, 376 insertions(+), 374 deletions(-) diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 7f48f93..a23971e 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -416,7 +416,7 @@ E2F7246825005E89007D87ED /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1170; + LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Tom Hicks"; TargetAttributes = { E2F7246F25005E89007D87ED = { @@ -699,6 +699,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -723,7 +724,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.7; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -757,6 +758,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -775,7 +777,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.7; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; diff --git a/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme b/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme index 105be0f..6c2492c 100644 --- a/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme +++ b/MonsterCards.xcodeproj/xcshareddata/xcschemes/MonsterCards.xcscheme @@ -1,6 +1,6 @@ Date: Thu, 17 Sep 2020 23:41:22 -0700 Subject: [PATCH 070/195] Renames old form field class and delegate. Adds new form field for integers. --- MonsterCards.xcodeproj/project.pbxproj | 28 +++-- MonsterCards/Base.lproj/Main.storyboard | 104 ++++++++++++++---- .../Views/EditMonsterViewController.h | 4 +- .../Views/EditMonsterViewController.m | 101 ++++++++++++----- .../EditableShortStringTableViewCell.m | 32 ------ .../Views/FormFields/MCFormFieldConstants.h | 15 +++ .../Views/FormFields/MCFormFieldConstants.m | 13 +++ ...mFieldDelegate.h => MCFormFieldDelegate.h} | 12 +- .../FormFields/MCIntegerFieldTableViewCell.h | 27 +++++ .../FormFields/MCIntegerFieldTableViewCell.m | 51 +++++++++ ...ll.h => MCShortStringFieldTableViewCell.h} | 13 +-- .../MCShortStringFieldTableViewCell.m | 27 +++++ 12 files changed, 320 insertions(+), 107 deletions(-) delete mode 100644 MonsterCards/Views/FormFields/EditableShortStringTableViewCell.m create mode 100644 MonsterCards/Views/FormFields/MCFormFieldConstants.h create mode 100644 MonsterCards/Views/FormFields/MCFormFieldConstants.m rename MonsterCards/Views/FormFields/{EditableFormFieldDelegate.h => MCFormFieldDelegate.h} (55%) create mode 100644 MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.h create mode 100644 MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m rename MonsterCards/Views/FormFields/{EditableShortStringTableViewCell.h => MCShortStringFieldTableViewCell.h} (53%) create mode 100644 MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index a23971e..1321278 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 1D2A61B332F293AB365B59E7 /* Pods_MonsterCards_MonsterCardsUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89F0D2EC2EC3C99EFD9A6949 /* Pods_MonsterCards_MonsterCardsUITests.framework */; }; 92967C3D4DFE1D9C66FF994F /* Pods_MonsterCards.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8D56491D6CAB92316D2C1B /* Pods_MonsterCards.framework */; }; CE281520762D69A9E98D19CF /* Pods_MonsterCardsTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9F017069E22ED575758F9E2 /* Pods_MonsterCardsTests.framework */; }; + E20C315425146708003AB1AA /* MCIntegerFieldTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E20C315325146708003AB1AA /* MCIntegerFieldTableViewCell.m */; }; E20D032425031B9D00FB6E43 /* SearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032325031B9D00FB6E43 /* SearchViewController.m */; }; E20D032825031BDA00FB6E43 /* MonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032725031BDA00FB6E43 /* MonsterViewController.m */; }; E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20D032A25031BE500FB6E43 /* LibraryViewController.m */; }; @@ -28,8 +29,9 @@ E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; }; E26A73572511BA1900C5677E /* HTMLHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E26A73562511BA1900C5677E /* HTMLHelper.m */; }; E278E21B250DFFCA00D3EC0E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E278E21A250DFFCA00D3EC0E /* Images.xcassets */; }; + E288744A25148BA0005CA948 /* MCFormFieldConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = E288744925148BA0005CA948 /* MCFormFieldConstants.m */; }; E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */; }; - E2D3E3B42508C3360052A8EC /* EditableShortStringTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */; }; + E2D3E3B42508C3360052A8EC /* MCShortStringFieldTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3B32508C3360052A8EC /* MCShortStringFieldTableViewCell.m */; }; E2E25805250CC3A7002E7308 /* MonsterCards.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E2F7248225005E89007D87ED /* MonsterCards.xcdatamodeld */; }; E2ECA8F32504AC3300C1FFA5 /* SkillTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */; }; E2ECA8F52504BAAD00C1FFA5 /* MonsterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2ECA8F42504BAAD00C1FFA5 /* MonsterTests.m */; }; @@ -74,6 +76,8 @@ A7E1FCC69D4538591C4D289B /* Pods-MonsterCards.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards/Pods-MonsterCards.debug.xcconfig"; sourceTree = ""; }; A9F017069E22ED575758F9E2 /* Pods_MonsterCardsTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MonsterCardsTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D079B8CF0ADA838AAA0A13EA /* Pods-MonsterCards.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards.release.xcconfig"; path = "Target Support Files/Pods-MonsterCards/Pods-MonsterCards.release.xcconfig"; sourceTree = ""; }; + E20C315225146708003AB1AA /* MCIntegerFieldTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCIntegerFieldTableViewCell.h; sourceTree = ""; }; + E20C315325146708003AB1AA /* MCIntegerFieldTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MCIntegerFieldTableViewCell.m; sourceTree = ""; }; E20D032225031B9D00FB6E43 /* SearchViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchViewController.h; sourceTree = ""; }; E20D032325031B9D00FB6E43 /* SearchViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SearchViewController.m; sourceTree = ""; }; E20D032625031BDA00FB6E43 /* MonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MonsterViewController.h; sourceTree = ""; }; @@ -89,7 +93,7 @@ E22F837E2511E8500072105C /* JSONHelperTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JSONHelperTests.m; sourceTree = ""; }; E2532E8725038DE100CA4CBA /* StringHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StringHelper.h; sourceTree = ""; }; E2532E8825038DE100CA4CBA /* StringHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StringHelper.m; sourceTree = ""; }; - E2591EB62509DD4900B396FD /* EditableFormFieldDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableFormFieldDelegate.h; sourceTree = ""; }; + E2591EB62509DD4900B396FD /* MCFormFieldDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCFormFieldDelegate.h; sourceTree = ""; }; E2592B8C250D6B8100906A40 /* EditMonsterViewControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditMonsterViewControllerTests.m; sourceTree = ""; }; E25BD5F3250352C4007B04EF /* Monster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Monster.h; sourceTree = ""; }; E25BD5F4250352C4007B04EF /* Monster.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Monster.m; sourceTree = ""; }; @@ -109,10 +113,12 @@ E26A73552511BA1900C5677E /* HTMLHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLHelper.h; sourceTree = ""; }; E26A73562511BA1900C5677E /* HTMLHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLHelper.m; sourceTree = ""; }; E278E21A250DFFCA00D3EC0E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + E288744925148BA0005CA948 /* MCFormFieldConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MCFormFieldConstants.m; sourceTree = ""; }; + E288744E25148BAD005CA948 /* MCFormFieldConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCFormFieldConstants.h; sourceTree = ""; }; E2D3E3AE250827110052A8EC /* EditMonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditMonsterViewController.h; sourceTree = ""; }; E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditMonsterViewController.m; sourceTree = ""; }; - E2D3E3B22508C3360052A8EC /* EditableShortStringTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableShortStringTableViewCell.h; sourceTree = ""; }; - E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditableShortStringTableViewCell.m; sourceTree = ""; }; + E2D3E3B22508C3360052A8EC /* MCShortStringFieldTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCShortStringFieldTableViewCell.h; sourceTree = ""; }; + E2D3E3B32508C3360052A8EC /* MCShortStringFieldTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MCShortStringFieldTableViewCell.m; sourceTree = ""; }; E2ECA8F22504AC3300C1FFA5 /* SkillTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SkillTests.m; sourceTree = ""; }; E2ECA8F42504BAAD00C1FFA5 /* MonsterTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonsterTests.m; sourceTree = ""; }; E2F7247025005E89007D87ED /* Monster Cards.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Monster Cards.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -264,9 +270,13 @@ E2D3E3B12508C2FE0052A8EC /* FormFields */ = { isa = PBXGroup; children = ( - E2D3E3B22508C3360052A8EC /* EditableShortStringTableViewCell.h */, - E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */, - E2591EB62509DD4900B396FD /* EditableFormFieldDelegate.h */, + E2591EB62509DD4900B396FD /* MCFormFieldDelegate.h */, + E288744E25148BAD005CA948 /* MCFormFieldConstants.h */, + E288744925148BA0005CA948 /* MCFormFieldConstants.m */, + E20C315225146708003AB1AA /* MCIntegerFieldTableViewCell.h */, + E20C315325146708003AB1AA /* MCIntegerFieldTableViewCell.m */, + E2D3E3B22508C3360052A8EC /* MCShortStringFieldTableViewCell.h */, + E2D3E3B32508C3360052A8EC /* MCShortStringFieldTableViewCell.m */, ); path = FormFields; sourceTree = ""; @@ -592,11 +602,13 @@ E20D032825031BDA00FB6E43 /* MonsterViewController.m in Sources */, E25BD60725036CFA007B04EF /* Action.m in Sources */, E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */, + E288744A25148BA0005CA948 /* MCFormFieldConstants.m in Sources */, E2F7247525005E89007D87ED /* AppDelegate.m in Sources */, - E2D3E3B42508C3360052A8EC /* EditableShortStringTableViewCell.m in Sources */, + E2D3E3B42508C3360052A8EC /* MCShortStringFieldTableViewCell.m in Sources */, E20D032B25031BE500FB6E43 /* LibraryViewController.m in Sources */, E20D033125031BFD00FB6E43 /* DashboardViewController.m in Sources */, E25BD5FE25036A76007B04EF /* DamageType.m in Sources */, + E20C315425146708003AB1AA /* MCIntegerFieldTableViewCell.m in Sources */, E2F7248425005E89007D87ED /* MonsterCards.xcdatamodeld in Sources */, E25BD60425036CF0007B04EF /* Ability.m in Sources */, E20D032E25031BEF00FB6E43 /* CollectionsViewController.m in Sources */, diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 5462e72..06280bb 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -1,9 +1,11 @@ - + - + + + @@ -34,8 +36,8 @@ - + @@ -50,8 +52,8 @@ - + @@ -66,7 +68,7 @@ - + @@ -149,7 +151,7 @@ - + @@ -194,7 +196,7 @@ @@ -210,7 +212,8 @@ - + + @@ -222,7 +225,6 @@ - @@ -250,43 +252,91 @@ - + - - + + - - + + - - + + + + + + + + + + + + + + + + + + - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - @@ -314,11 +364,17 @@ - + + + + + + + diff --git a/MonsterCards/Views/EditMonsterViewController.h b/MonsterCards/Views/EditMonsterViewController.h index cd799f9..2e2496a 100644 --- a/MonsterCards/Views/EditMonsterViewController.h +++ b/MonsterCards/Views/EditMonsterViewController.h @@ -8,11 +8,11 @@ #import #import "Monster.h" -#import "EditableShortStringTableViewCell.h" +#import "MCShortStringFieldTableViewCell.h" NS_ASSUME_NONNULL_BEGIN -@interface EditMonsterViewController : UIViewController +@interface EditMonsterViewController : UIViewController @property Monster* originalMonster; @property (weak, nonatomic) IBOutlet UITableView *monsterTableView; diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index ee58ef1..a4bd1eb 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -7,7 +7,8 @@ // #import "EditMonsterViewController.h" -#import "EditableShortStringTableViewCell.h" +#import "MCShortStringFieldTableViewCell.h" +#import "MCIntegerFieldTableViewCell.h" #import "AppDelegate.h" @interface EditMonsterViewController () @@ -16,6 +17,9 @@ @end +const int kSectionIndexBasicInfo = 0; +const int kSectionIndexAbilityScores = 1; + @implementation EditMonsterViewController { NSManagedObjectContext *_context; } @@ -34,6 +38,24 @@ self.editingMonster = [[Monster alloc] initWithMonster:self.originalMonster]; } +- (MCShortStringFieldTableViewCell*) makeShortStringCellFromCell:(UITableViewCell*)cell { + if (cell == nil || ![cell isKindOfClass:[MCShortStringFieldTableViewCell class]]) { + // TODO: Figure out how to make this cell generate child views. + return [[MCShortStringFieldTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"MCShortStringField"]; + } else { + return (MCShortStringFieldTableViewCell*)cell; + } +} + +- (MCIntegerFieldTableViewCell*) makeIntegerCellFromCell:(UITableViewCell*)cell { + if (cell == nil || ![cell isKindOfClass:[MCIntegerFieldTableViewCell class]]) { + // TODO: Figure out how to make this cell generate child views. + return [[MCIntegerFieldTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"MCIntegerField"]; + } else { + return (MCIntegerFieldTableViewCell*)cell; + } +} + #pragma mark - Navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { @@ -52,65 +74,80 @@ #pragma mark - UITableViewDataSource - (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { - // Section 0 is basic info - // * Name - // * Size - // * Type - // * Subtype - // * Alignment - - return 5; + switch(section) { + case kSectionIndexBasicInfo: + // Section 0 is basic info + // * Name + // * Size + // * Type + // * Subtype + // * Alignment + return 5; + case kSectionIndexAbilityScores: + return 0; + default: + return 0; + } } -- (EditableShortStringTableViewCell*) makeShortStringCellFromCell:(UITableViewCell*)cell { - if (cell == nil || ![cell isKindOfClass:[EditableShortStringTableViewCell class]]) { - // TODO: Figure out why this doesn't create a cell with a text field. - return [[EditableShortStringTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"EditableShortString"]; - } else { - return (EditableShortStringTableViewCell*)cell; +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 2; +} + +- (NSString *)tableView:(UITableView *)tableView +titleForHeaderInSection:(NSInteger)section { + switch(section) { + case kSectionIndexBasicInfo: + return NSLocalizedString(@"Basic Info", @"Section title"); + case kSectionIndexAbilityScores: + return NSLocalizedString(@"Ability Scores", @"Section title"); + default: + return nil; } } - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { - EditableShortStringTableViewCell *shortStringCell = nil; + MCShortStringFieldTableViewCell *shortStringCell = nil; + MCIntegerFieldTableViewCell *integerCell = nil; switch (indexPath.section) { - case 0: + case kSectionIndexBasicInfo: switch (indexPath.row) { case 0: - shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]]; + shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]]; shortStringCell.delegate = self; shortStringCell.identifier = @"monster.name"; - // TODO: make these use setters on EditableShortStringTableViewCell + // TODO: make these use setters on MCShortStringFieldTableViewCell shortStringCell.textField.text = self.editingMonster.name; shortStringCell.textField.placeholder = NSLocalizedString(@"Name", @"Placeholder text for the name of a monster or NPC."); return shortStringCell; case 1: - shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]]; + shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]]; shortStringCell.delegate = self; shortStringCell.identifier = @"monster.size"; - // TODO: make these use setters on EditableShortStringTableViewCell + // TODO: make these use setters on MCShortStringFieldTableViewCell shortStringCell.textField.text = self.editingMonster.size; shortStringCell.textField.placeholder = NSLocalizedString(@"Size", @"Placehodler text for the size of a monster or NPC."); return shortStringCell; case 2: - shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]]; + shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]]; shortStringCell.delegate = self; shortStringCell.identifier = @"monster.type"; - // TODO: make these use setters on EditableShortStringTableViewCell + // TODO: make these use setters on MCShortStringFieldTableViewCell shortStringCell.textField.text = self.editingMonster.type; shortStringCell.textField.placeholder = NSLocalizedString(@"Type", @"Placehodler text for the type of a monster or NPC."); return shortStringCell; case 3: - shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]]; + shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]]; shortStringCell.delegate = self; shortStringCell.identifier = @"monster.subtype"; shortStringCell.textField.text = self.editingMonster.subtype; shortStringCell.textField.placeholder = NSLocalizedString(@"Subtype", @"Placeholder text for the subtype of a monster or NPC."); return shortStringCell; case 4: - shortStringCell = [self makeShortStringCellFromCell: [self.monsterTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]]; + shortStringCell = [self makeShortStringCellFromCell: [self.monsterTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]]; shortStringCell.delegate = self; shortStringCell.identifier = @"monster.alignment"; shortStringCell.textField.text = self.editingMonster.alignment; @@ -120,13 +157,18 @@ break; } +#if DEBUG + NSLog(@"ERROR: Unable to build a cell for %@", indexPath); return nil; +#else + return [[UITableViewCell alloc] init]; +#endif } -#pragma mark - EditableShortStringDelegate +#pragma mark - MCShortStringFieldDelegate - (void)editableValueDidChange:(NSObject*)value forIdentifier:(NSString*)identifier andType:(NSString*)type { - if ([@"String" isEqualToString:type]) { + if ([kMCFieldValueTypeString isEqualToString:type]) { if ([@"monster.name" isEqualToString:identifier]) { self.editingMonster.name = (NSString*)value; } else if ([@"monster.size" isEqualToString:identifier]) { @@ -139,6 +181,11 @@ self.editingMonster.alignment = (NSString*)value; } } + if ([kMCFieldValueTypeInteger isEqualToString:type]) { + if ([@"monster.strengthScore" isEqualToString:identifier]) { + self.editingMonster.strengthScore = [(NSNumber*)value intValue]; + } + } } @end diff --git a/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.m b/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.m deleted file mode 100644 index df30060..0000000 --- a/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// EditableShortStringTableViewCell.m -// MonsterCards -// -// Created by Tom Hicks on 9/9/20. -// Copyright © 2020 Tom Hicks. All rights reserved. -// - -#import "EditableShortStringTableViewCell.h" - -@implementation EditableShortStringTableViewCell - -- (void)awakeFromNib { - [super awakeFromNib]; - // Initialization code - self.textField.delegate = self; -} - -#pragma mark - UITextFieldDelegate - -- (BOOL)textField:(UITextField *)textField -shouldChangeCharactersInRange:(NSRange)range -replacementString:(NSString *)string { - // TODO: See this link for a potentially better way to get this text https://stackoverflow.com/questions/19110617/uitextfieldtextdidchangenotification-ios7-not-fired - NSString *finalString = [textField.text stringByReplacingCharactersInRange:range withString:string]; - if (self.delegate != nil) { - [self.delegate editableValueDidChange:finalString forIdentifier:self.identifier andType:@"String"]; - } - return YES; -} - -@end diff --git a/MonsterCards/Views/FormFields/MCFormFieldConstants.h b/MonsterCards/Views/FormFields/MCFormFieldConstants.h new file mode 100644 index 0000000..d5dbd0f --- /dev/null +++ b/MonsterCards/Views/FormFields/MCFormFieldConstants.h @@ -0,0 +1,15 @@ +// +// MCFormFieldConstants.h +// MonsterCards +// +// Created by Tom Hicks on 9/17/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#ifndef MCFormFieldConstants_h +#define MCFormFieldConstants_h + +extern NSString* const kMCFieldValueTypeInteger; +extern NSString* const kMCFieldValueTypeString; + +#endif /* MCFormFieldConstants_h */ diff --git a/MonsterCards/Views/FormFields/MCFormFieldConstants.m b/MonsterCards/Views/FormFields/MCFormFieldConstants.m new file mode 100644 index 0000000..809a712 --- /dev/null +++ b/MonsterCards/Views/FormFields/MCFormFieldConstants.m @@ -0,0 +1,13 @@ +// +// MCFormFieldConstants.m +// MonsterCards +// +// Created by Tom Hicks on 9/17/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "MCFormFieldConstants.h" + +NSString* const kMCFieldValueTypeInteger = @"Integer"; +NSString* const kMCFieldValueTypeString = @"String"; diff --git a/MonsterCards/Views/FormFields/EditableFormFieldDelegate.h b/MonsterCards/Views/FormFields/MCFormFieldDelegate.h similarity index 55% rename from MonsterCards/Views/FormFields/EditableFormFieldDelegate.h rename to MonsterCards/Views/FormFields/MCFormFieldDelegate.h index 877a3a1..6fae47c 100644 --- a/MonsterCards/Views/FormFields/EditableFormFieldDelegate.h +++ b/MonsterCards/Views/FormFields/MCFormFieldDelegate.h @@ -1,15 +1,17 @@ // -// EditableFormFieldDelegate.h +// MCFormFieldDelegate.h // MonsterCards // // Created by Tom Hicks on 9/9/20. // Copyright © 2020 Tom Hicks. All rights reserved. // -#ifndef EditableFormFieldDelegate_h -#define EditableFormFieldDelegate_h +#ifndef MCFormFieldDelegate_h +#define MCFormFieldDelegate_h -@protocol EditableFormFieldDelegate +#import "MCFormFieldConstants.h" + +@protocol MCFormFieldDelegate @optional -(void)editableValueDidChange:(NSObject*)value forIdentifier:(NSString*)identifier andType:(NSString*)type; @@ -17,4 +19,4 @@ @end -#endif /* EditableFormFieldDelegate_h */ +#endif /* MCFormFieldDelegate_h */ diff --git a/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.h b/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.h new file mode 100644 index 0000000..a57ef3e --- /dev/null +++ b/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.h @@ -0,0 +1,27 @@ +// +// MCIntegerFieldTableViewCell.h +// MonsterCards +// +// Created by Tom Hicks on 9/17/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "MCFormFieldDelegate.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MCIntegerFieldTableViewCell : UITableViewCell + +@property NSString* identifier; +@property NSString* label; +@property int value; + +@property (weak, nonatomic) id delegate; +@property (weak, nonatomic) IBOutlet UITextField *textField; +@property (weak, nonatomic) IBOutlet UIStepper *stepper; +- (IBAction)stepperValueChanged:(id)sender; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m b/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m new file mode 100644 index 0000000..6e6c18e --- /dev/null +++ b/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m @@ -0,0 +1,51 @@ +// +// MCIntegerFieldTableViewCell.m +// MonsterCards +// +// Created by Tom Hicks on 9/17/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "MCIntegerFieldTableViewCell.h" + +@implementation MCIntegerFieldTableViewCell + +@synthesize value = _value; + +-(void) setValue:(int)number { + if (_value != number) { + NSNumber *newValue = [NSNumber numberWithInt:number]; + _value = number; + if (self.textField) { + self.textField.text = [newValue stringValue]; + } + if (self.stepper) { + self.stepper.value = number; + } + if (self.delegate) { + [self.delegate editableValueDidChange:newValue + forIdentifier:self.identifier + andType:kMCFieldValueTypeInteger]; + } + } +} + +- (int) value { + return _value; +} + +- (void)awakeFromNib { + [super awakeFromNib]; + [self.textField addTarget:self + action:@selector(textFieldValueChanged:) + forControlEvents:UIControlEventEditingChanged]; +} + +- (void)textFieldValueChanged:(UITextField*)textField { + self.value = [textField.text intValue]; +} + +- (IBAction)stepperValueChanged:(id)sender { + self.value = self.stepper.value; +} +@end diff --git a/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.h b/MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.h similarity index 53% rename from MonsterCards/Views/FormFields/EditableShortStringTableViewCell.h rename to MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.h index a607709..894bcd8 100644 --- a/MonsterCards/Views/FormFields/EditableShortStringTableViewCell.h +++ b/MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.h @@ -7,22 +7,17 @@ // #import +#import "MCFormFieldDelegate.h" NS_ASSUME_NONNULL_BEGIN -@protocol EditableShortStringDelegate - -@optional --(void)editableValueDidChange:(NSString*)value forIdentifier:(NSString*)identifier andType:(NSString*)type; - -@end - -@interface EditableShortStringTableViewCell : UITableViewCell +@interface MCShortStringFieldTableViewCell : UITableViewCell @property NSString* identifier; @property NSString* label; @property NSString* value; -@property (nonatomic, weak) id delegate; + +@property (weak, nonatomic) id delegate; @property (weak, nonatomic) IBOutlet UITextField *textField; @end diff --git a/MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.m b/MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.m new file mode 100644 index 0000000..c0adf26 --- /dev/null +++ b/MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.m @@ -0,0 +1,27 @@ +// +// EditableShortStringTableViewCell.m +// MonsterCards +// +// Created by Tom Hicks on 9/9/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "MCShortStringFieldTableViewCell.h" + +@implementation MCShortStringFieldTableViewCell + +- (void)awakeFromNib { + [super awakeFromNib]; + [self.textField addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventEditingChanged]; +} + +- (void)valueChanged:(UITextField*)textField { + NSString *newValue = textField.text; + if (self.delegate != nil) { + [self.delegate editableValueDidChange:newValue + forIdentifier:self.identifier + andType:kMCFieldValueTypeString]; + } +} + +@end From 84b0d246b55ab9b608d0b6e9fd76a7f418f4966c Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 18 Sep 2020 00:16:38 -0700 Subject: [PATCH 071/195] Refactors form field cell creation into separate reusable methods. --- .../Views/EditMonsterViewController.m | 147 +++++++++++------- 1 file changed, 92 insertions(+), 55 deletions(-) diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index a4bd1eb..c7bdec3 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -38,24 +38,51 @@ const int kSectionIndexAbilityScores = 1; self.editingMonster = [[Monster alloc] initWithMonster:self.originalMonster]; } -- (MCShortStringFieldTableViewCell*) makeShortStringCellFromCell:(UITableViewCell*)cell { - if (cell == nil || ![cell isKindOfClass:[MCShortStringFieldTableViewCell class]]) { - // TODO: Figure out how to make this cell generate child views. - return [[MCShortStringFieldTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"MCShortStringField"]; - } else { - return (MCShortStringFieldTableViewCell*)cell; - } +- (UITableViewCell*) makeSafeCell { +#if DEBUG + return nil; +#else + return [[UITableViewCell alloc] init]; +#endif } -- (MCIntegerFieldTableViewCell*) makeIntegerCellFromCell:(UITableViewCell*)cell { - if (cell == nil || ![cell isKindOfClass:[MCIntegerFieldTableViewCell class]]) { - // TODO: Figure out how to make this cell generate child views. - return [[MCIntegerFieldTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"MCIntegerField"]; - } else { - return (MCIntegerFieldTableViewCell*)cell; +- (MCShortStringFieldTableViewCell*) makeShortStringCellFromTableView:(UITableView*)tableView + withIdentifier:(NSString*)identifier + label:(NSString*)label + andInitialValue:(NSString*)initialValue { + MCShortStringFieldTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]; + if (!cell || ![cell isKindOfClass:[MCShortStringFieldTableViewCell class]]) { + return nil; } + cell.delegate = self; + cell.identifier = identifier; + cell.label = label; + cell.value = initialValue; + + // TODO: move these to better properties on MCShortStringFieldTableViewCell they should be stored via label and initialValue/value. + cell.textField.text = initialValue; + cell.textField.placeholder = label; + + return cell; } +- (MCIntegerFieldTableViewCell*) makeIntegerCellFromTableView:(UITableView*)tableView + withIdentifier:(NSString*)identifier + label:(NSString*)label + andInitialValue:(int)initialValue { + MCIntegerFieldTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MCIntegerField"]; + if (!cell || ![cell isKindOfClass:[MCIntegerFieldTableViewCell class]]) { + return nil; + } + cell.delegate = self; + cell.identifier = identifier; + cell.label = label; + cell.value = initialValue; + + return cell; +} + + #pragma mark - Navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { @@ -84,7 +111,7 @@ const int kSectionIndexAbilityScores = 1; // * Alignment return 5; case kSectionIndexAbilityScores: - return 0; + return 1; default: return 0; } @@ -109,60 +136,60 @@ titleForHeaderInSection:(NSInteger)section { - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { - MCShortStringFieldTableViewCell *shortStringCell = nil; - MCIntegerFieldTableViewCell *integerCell = nil; + UITableViewCell *newCell = nil; switch (indexPath.section) { case kSectionIndexBasicInfo: switch (indexPath.row) { case 0: - shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]]; - shortStringCell.delegate = self; - shortStringCell.identifier = @"monster.name"; - // TODO: make these use setters on MCShortStringFieldTableViewCell - shortStringCell.textField.text = self.editingMonster.name; - shortStringCell.textField.placeholder = NSLocalizedString(@"Name", @"Placeholder text for the name of a monster or NPC."); - return shortStringCell; + newCell = [self makeShortStringCellFromTableView:self.monsterTableView + withIdentifier:@"monster.name" + label:NSLocalizedString(@"Name", @"Placeholder text for the name of a monster or NPC.") + andInitialValue:self.editingMonster.name]; + break; case 1: - shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]]; - shortStringCell.delegate = self; - shortStringCell.identifier = @"monster.size"; - // TODO: make these use setters on MCShortStringFieldTableViewCell - shortStringCell.textField.text = self.editingMonster.size; - shortStringCell.textField.placeholder = NSLocalizedString(@"Size", @"Placehodler text for the size of a monster or NPC."); - return shortStringCell; + newCell = [self makeShortStringCellFromTableView:self.monsterTableView + withIdentifier:@"monster.size" + label:NSLocalizedString(@"Size", @"Placehodler text for the size of a monster or NPC.") + andInitialValue:self.editingMonster.size]; + break; case 2: - shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]]; - shortStringCell.delegate = self; - shortStringCell.identifier = @"monster.type"; - // TODO: make these use setters on MCShortStringFieldTableViewCell - shortStringCell.textField.text = self.editingMonster.type; - shortStringCell.textField.placeholder = NSLocalizedString(@"Type", @"Placehodler text for the type of a monster or NPC."); - return shortStringCell; + newCell = [self makeShortStringCellFromTableView:self.monsterTableView + withIdentifier:@"monster.type" + label:NSLocalizedString(@"Type", @"Placehodler text for the type of a monster or NPC.") + andInitialValue:self.editingMonster.type]; + break; case 3: - shortStringCell = [self makeShortStringCellFromCell:[self.monsterTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]]; - shortStringCell.delegate = self; - shortStringCell.identifier = @"monster.subtype"; - shortStringCell.textField.text = self.editingMonster.subtype; - shortStringCell.textField.placeholder = NSLocalizedString(@"Subtype", @"Placeholder text for the subtype of a monster or NPC."); - return shortStringCell; + newCell = [self makeShortStringCellFromTableView:self.monsterTableView + withIdentifier:@"monster.subtype" + label:NSLocalizedString(@"Subtype", @"Placeholder text for the subtype of a monster or NPC.") + andInitialValue:self.editingMonster.subtype]; + break; case 4: - shortStringCell = [self makeShortStringCellFromCell: [self.monsterTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]]; - shortStringCell.delegate = self; - shortStringCell.identifier = @"monster.alignment"; - shortStringCell.textField.text = self.editingMonster.alignment; - shortStringCell.textField.placeholder = NSLocalizedString(@"Alignment", @"Placeholder text for the alignment of a monster or NPC."); - return shortStringCell; + newCell = [self makeShortStringCellFromTableView:self.monsterTableView + withIdentifier:@"monster.alignment" + label: NSLocalizedString(@"Alignment", @"Placeholder text for the alignment of a monster or NPC.") + andInitialValue:self.editingMonster.alignment]; + break; + } + break; + case kSectionIndexAbilityScores: + switch (indexPath.row) { + case 0: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.strengthScore" + label:NSLocalizedString(@"STR", @"Placeholder abbreviation for the strength score of a monster or NPC.") + andInitialValue:self.editingMonster.strengthScore]; } break; } -#if DEBUG - NSLog(@"ERROR: Unable to build a cell for %@", indexPath); - return nil; -#else - return [[UITableViewCell alloc] init]; -#endif + if (!newCell) { + NSLog(@"ERROR: Unable to build a cell for %@", indexPath); + newCell = [self makeSafeCell]; + } + + return newCell; } #pragma mark - MCShortStringFieldDelegate @@ -184,6 +211,16 @@ titleForHeaderInSection:(NSInteger)section { if ([kMCFieldValueTypeInteger isEqualToString:type]) { if ([@"monster.strengthScore" isEqualToString:identifier]) { self.editingMonster.strengthScore = [(NSNumber*)value intValue]; + } else if ([@"monster.dexterityScore" isEqualToString:identifier]) { + self.editingMonster.dexterityScore = [(NSNumber*)value intValue]; + } else if ([@"monster.constitutionScore" isEqualToString:identifier]) { + self.editingMonster.constitutionScore = [(NSNumber*)value intValue]; + } else if ([@"monster.intelligenceScore" isEqualToString:identifier]) { + self.editingMonster.intelligenceScore = [(NSNumber*)value intValue]; + } else if ([@"monster.wisdomScore" isEqualToString:identifier]) { + self.editingMonster.wisdomScore = [(NSNumber*)value intValue]; + } else if ([@"monster.charismaScore" isEqualToString:identifier]) { + self.editingMonster.charismaScore = [(NSNumber*)value intValue]; } } } From 800e7ef6f1089bebfbd632d983a994a510bf5de5 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 18 Sep 2020 00:27:31 -0700 Subject: [PATCH 072/195] Partial fixes to tests to run with Xcode 12. --- .../Views/EditMonsterViewControllerTests.m | 13 +++++----- Pods/Pods.xcodeproj/project.pbxproj | 26 +++++++++---------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/MonsterCardsTests/Views/EditMonsterViewControllerTests.m b/MonsterCardsTests/Views/EditMonsterViewControllerTests.m index aa3ac76..3127cba 100644 --- a/MonsterCardsTests/Views/EditMonsterViewControllerTests.m +++ b/MonsterCardsTests/Views/EditMonsterViewControllerTests.m @@ -9,6 +9,7 @@ #import @import OCMockito; @import OCHamcrest; +#import "MCShortStringFieldTableViewCell.h" #import "EditMonsterViewController.h" #import "AppDelegate.h" @@ -40,7 +41,7 @@ - (void)testRendersSubtypeCell { UITableView *monstersTableView = mock([UITableView class]); NSIndexPath *path = [NSIndexPath indexPathForRow:3 inSection:0]; - EditableShortStringTableViewCell *shortStringCell = [[EditableShortStringTableViewCell alloc] init]; + MCShortStringFieldTableViewCell *shortStringCell = [[MCShortStringFieldTableViewCell alloc] init]; UITextField *textField = [[UITextField alloc] init]; shortStringCell.textField = textField; @@ -56,8 +57,8 @@ XCTAssertNotNil(cell); - XCTAssertTrue([cell isKindOfClass:[EditableShortStringTableViewCell class]]); - shortStringCell = (EditableShortStringTableViewCell*)cell; + XCTAssertTrue([cell isKindOfClass:[MCShortStringFieldTableViewCell class]]); + shortStringCell = (MCShortStringFieldTableViewCell*)cell; XCTAssertEqualObjects(@"monster.subtype", shortStringCell.identifier); XCTAssertEqualObjects(@"Subtype", shortStringCell.textField.placeholder); XCTAssertEqualObjects(@"", shortStringCell.textField.text); @@ -84,7 +85,7 @@ - (void)testRendersAlignmentCell { UITableView *monstersTableView = mock([UITableView class]); NSIndexPath *path = [NSIndexPath indexPathForRow:4 inSection:0]; - EditableShortStringTableViewCell *shortStringCell = [[EditableShortStringTableViewCell alloc] init]; + MCShortStringFieldTableViewCell *shortStringCell = [[MCShortStringFieldTableViewCell alloc] init]; UITextField *textField = [[UITextField alloc] init]; shortStringCell.textField = textField; @@ -100,8 +101,8 @@ XCTAssertNotNil(cell); - XCTAssertTrue([cell isKindOfClass:[EditableShortStringTableViewCell class]]); - shortStringCell = (EditableShortStringTableViewCell*)cell; + XCTAssertTrue([cell isKindOfClass:[MCShortStringFieldTableViewCell class]]); + shortStringCell = (MCShortStringFieldTableViewCell*)cell; XCTAssertEqualObjects(@"monster.alignment", shortStringCell.identifier); XCTAssertEqualObjects(@"Alignment", shortStringCell.textField.placeholder); XCTAssertEqualObjects(@"", shortStringCell.textField.text); diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 4d13f4b..b2d14c7 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -392,7 +392,7 @@ 08E0DFD1C1DA3EF7E7A1159BE7112B7E /* HCRunloopRunner.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCRunloopRunner.h; path = Source/Core/Helpers/HCRunloopRunner.h; sourceTree = ""; }; 0A1EBA997CF7C9388D26D1ACC66AE8B4 /* HCLongLongReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCLongLongReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.m; sourceTree = ""; }; 0A4260D5C243F2A8B09A94F2508498E0 /* HCIsIn.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsIn.h; path = Source/Library/Collection/HCIsIn.h; sourceTree = ""; }; - 0AEE95FDC2144C3DDC84BFFF0AD3286D /* Pods_MonsterCards_MonsterCardsUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MonsterCards_MonsterCardsUITests.framework; path = "Pods-MonsterCards-MonsterCardsUITests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0AEE95FDC2144C3DDC84BFFF0AD3286D /* Pods_MonsterCards_MonsterCardsUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MonsterCards_MonsterCardsUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 0B266C09019B3F63F1051024F37771FD /* MKTInvocationContainer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTInvocationContainer.h; path = Source/OCMockito/Stubbing/MKTInvocationContainer.h; sourceTree = ""; }; 0B63E72018F8DCD27388CB9C1F84CDFE /* MKTCharReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTCharReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.h; sourceTree = ""; }; 0BF590D47280FDF772591A9EA877F3D6 /* OCMockito-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OCMockito-umbrella.h"; sourceTree = ""; }; @@ -403,7 +403,7 @@ 0E8D99BCDD5034A685B1132ABEE31787 /* MKTUnsignedLongReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedLongReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTUnsignedLongReturnSetter.h; sourceTree = ""; }; 0FA62431AB0240FF502CA857D80416D6 /* MKTClassArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTClassArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.m; sourceTree = ""; }; 1041B75357FE4417A40F02B99718EA2A /* MKTArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.h; sourceTree = ""; }; - 11089B3864BDF5DACB86EBD5EEAB27AE /* Pods_MonsterCards.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MonsterCards.framework; path = "Pods-MonsterCards.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 11089B3864BDF5DACB86EBD5EEAB27AE /* Pods_MonsterCards.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MonsterCards.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 111C1B293FAE8443619252C488AFB789 /* HCIsEmptyCollection.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsEmptyCollection.m; path = Source/Library/Collection/HCIsEmptyCollection.m; sourceTree = ""; }; 115F66A544E70A0704D1EFE773B6F6A4 /* HCCharReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCCharReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.h; sourceTree = ""; }; 12EAED0BC67FA189C27C8F4E6173CC1C /* HCHasDescription.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCHasDescription.m; path = Source/Library/Object/HCHasDescription.m; sourceTree = ""; }; @@ -481,7 +481,7 @@ 460F39594C0CA1F9FED8D53D423CF004 /* MKTObjectAndProtocolMock.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTObjectAndProtocolMock.m; path = Source/OCMockito/Mocking/MKTObjectAndProtocolMock.m; sourceTree = ""; }; 462CC631461FF0F792689156760B4CFA /* HCReturnValueGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCReturnValueGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.m; sourceTree = ""; }; 466DCB25F4DFF1E46ECE1A8A1FACAFB8 /* HCIs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIs.m; path = Source/Library/Decorator/HCIs.m; sourceTree = ""; }; - 46E9DB656AB852B52134EA8B5DE55D5C /* OCHamcrest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OCHamcrest.framework; path = OCHamcrest.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 46E9DB656AB852B52134EA8B5DE55D5C /* OCHamcrest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OCHamcrest.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 47B5C2A311F8CD3FF35437ECDAF2A96F /* OCHamcrest-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OCHamcrest-prefix.pch"; sourceTree = ""; }; 484DD12B558ADD56C07E97EE1EF8F170 /* OCMockito.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OCMockito.release.xcconfig; sourceTree = ""; }; 4920D12A419167DF2D8531ABD0408C61 /* MKTAtLeastNumberOfInvocationsChecker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTAtLeastNumberOfInvocationsChecker.m; path = Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.m; sourceTree = ""; }; @@ -515,7 +515,7 @@ 6328E2DA677910CDDA3A692E28C41D00 /* NSInvocation+OCMockito.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSInvocation+OCMockito.h"; path = "Source/OCMockito/Invocation/NSInvocation+OCMockito.h"; sourceTree = ""; }; 6509B0466A9E8566693B27F3D720F896 /* HCDiagnosingMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCDiagnosingMatcher.h; path = Source/Core/HCDiagnosingMatcher.h; sourceTree = ""; }; 6765FE3E095A10CCA04B316EB3FD0E81 /* HCStringContains.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCStringContains.h; path = Source/Library/Text/HCStringContains.h; sourceTree = ""; }; - 688A32E81F833186D271C1DDEDF196A2 /* Pods_MonsterCardsTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MonsterCardsTests.framework; path = "Pods-MonsterCardsTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 688A32E81F833186D271C1DDEDF196A2 /* Pods_MonsterCardsTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MonsterCardsTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6900393B465D6921C292E903EEC32C1F /* HCDescribedAs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCDescribedAs.m; path = Source/Library/Decorator/HCDescribedAs.m; sourceTree = ""; }; 691AF08E70240ABA9D35D3D1E4E8FA24 /* MKTUnsignedCharArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedCharArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.h; sourceTree = ""; }; 6938763A1A07A12C15F7C1353D471391 /* MKTBoolArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTBoolArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.h; sourceTree = ""; }; @@ -545,7 +545,7 @@ 7BC1E67223D24F99FBEA4CEA7EEE41B1 /* HCIsCloseTo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsCloseTo.m; path = Source/Library/Number/HCIsCloseTo.m; sourceTree = ""; }; 7C360162E92AD2029386138F2644805C /* MKT_TPDWeakProxy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKT_TPDWeakProxy.m; path = "Source/ThirdParty/TPDWeakProxy-1.1.0/TPDWeakProxy/MKT_TPDWeakProxy.m"; sourceTree = ""; }; 7C437764409E8FE79D38459CB315D6E4 /* HCIsAnything.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsAnything.m; path = Source/Library/Logical/HCIsAnything.m; sourceTree = ""; }; - 7DDE13FAD087C4C94416C87926291DA9 /* OCMockito.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = OCMockito.framework; path = OCMockito.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7DDE13FAD087C4C94416C87926291DA9 /* OCMockito.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OCMockito.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7E8B6B3EC8CF9EF224F4012BA559561C /* HCStringEndsWith.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCStringEndsWith.m; path = Source/Library/Text/HCStringEndsWith.m; sourceTree = ""; }; 7FF893E6E27D0CBC633522E472808186 /* HCTestFailureReporterChain.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCTestFailureReporterChain.m; path = Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.m; sourceTree = ""; }; 801866461A95BB6BB06D7ACA13B0F7BF /* MKTLongArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTLongArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.h; sourceTree = ""; }; @@ -599,7 +599,7 @@ 9C5515B3CB3B2F502D3328E746F1B06A /* MKTObjectMock.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTObjectMock.m; path = Source/OCMockito/Mocking/MKTObjectMock.m; sourceTree = ""; }; 9C65C64152C04FD20CEF60176C490BB4 /* HCTestFailure.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCTestFailure.m; path = Source/Core/Helpers/TestFailureReporters/HCTestFailure.m; sourceTree = ""; }; 9C719025AA0018BF030D009382FF9C96 /* Pods-MonsterCardsTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MonsterCardsTests-umbrella.h"; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 9DEE98911D994708B4D35823CAF2F216 /* OCMockito.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = OCMockito.h; path = Source/OCMockito/Core/OCMockito.h; sourceTree = ""; }; 9E185F0EACC15858F21C65B72D636B78 /* MKTAtMostTimes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTAtMostTimes.h; path = Source/OCMockito/Verifying/MKTAtMostTimes.h; sourceTree = ""; }; 9EA4549FC719D29A4F6D8D37BECD26BF /* MKTThrowsException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTThrowsException.h; path = Source/OCMockito/Stubbing/MKTThrowsException.h; sourceTree = ""; }; @@ -991,7 +991,6 @@ 9850D8A995F2F35F0C35E8CA6FEF840F /* OCHamcrest.h */, E084CB31F4A8BF24F3AD78410A64310F /* Support Files */, ); - name = OCHamcrest; path = OCHamcrest; sourceTree = ""; }; @@ -1169,7 +1168,6 @@ C60E4F725E1CB2116B6E7C88D81FD288 /* OCMockito.m */, 4EEADDD04C7BD4B91787C198CC19D22C /* Support Files */, ); - name = OCMockito; path = OCMockito; sourceTree = ""; }; @@ -1543,7 +1541,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1100; + LastUpgradeCheck = 1200; }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 10.0"; @@ -1853,7 +1851,7 @@ GCC_PREFIX_HEADER = "Target Support Files/OCHamcrest/OCHamcrest-prefix.pch"; INFOPLIST_FILE = "Target Support Files/OCHamcrest/OCHamcrest-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1937,6 +1935,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -2029,7 +2028,7 @@ GCC_PREFIX_HEADER = "Target Support Files/OCMockito/OCMockito-prefix.pch"; INFOPLIST_FILE = "Target Support Files/OCMockito/OCMockito-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2101,7 +2100,7 @@ GCC_PREFIX_HEADER = "Target Support Files/OCHamcrest/OCHamcrest-prefix.pch"; INFOPLIST_FILE = "Target Support Files/OCHamcrest/OCHamcrest-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2213,7 +2212,7 @@ GCC_PREFIX_HEADER = "Target Support Files/OCMockito/OCMockito-prefix.pch"; INFOPLIST_FILE = "Target Support Files/OCMockito/OCMockito-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2296,6 +2295,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; From 1ecd4a43274bb468f918a8ba22a3aa6defa1e77b Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 18 Sep 2020 00:47:48 -0700 Subject: [PATCH 073/195] Adds a label to the integer form field. Makes the string value and both string and integer label update the underlying controls when set. --- MonsterCards/Base.lproj/Main.storyboard | 18 +++++++++-- .../FormFields/MCIntegerFieldTableViewCell.h | 1 + .../FormFields/MCIntegerFieldTableViewCell.m | 18 +++++++++++ .../MCShortStringFieldTableViewCell.m | 30 +++++++++++++++++++ 4 files changed, 64 insertions(+), 3 deletions(-) diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 06280bb..49df5d6 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -262,7 +262,7 @@ - + @@ -282,16 +282,28 @@ + - + + + + - + diff --git a/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.h b/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.h index a57ef3e..181e498 100644 --- a/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.h +++ b/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.h @@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN @property (weak, nonatomic) id delegate; @property (weak, nonatomic) IBOutlet UITextField *textField; @property (weak, nonatomic) IBOutlet UIStepper *stepper; +@property (weak, nonatomic) IBOutlet UILabel *labelView; - (IBAction)stepperValueChanged:(id)sender; @end diff --git a/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m b/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m index 6e6c18e..ae8a107 100644 --- a/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m +++ b/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m @@ -34,6 +34,24 @@ return _value; } +@synthesize label = _label; + +- (void)setLabel:(NSString*)label { + if (![_label isEqualToString:label]) { + _label = label; + if (self.textField) { + self.textField.placeholder = label; + } + if (self.labelView) { + self.labelView.text = label; + } + } +} + +- (NSString*)label { + return _label; +} + - (void)awakeFromNib { [super awakeFromNib]; [self.textField addTarget:self diff --git a/MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.m b/MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.m index c0adf26..4056f5b 100644 --- a/MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.m +++ b/MonsterCards/Views/FormFields/MCShortStringFieldTableViewCell.m @@ -10,6 +10,36 @@ @implementation MCShortStringFieldTableViewCell +@synthesize value = _value; + +- (void)setValue:(NSString*)value { + if (![_value isEqualToString:value]) { + _value = value; + if (self.textField) { + self.textField.text = value; + } + } +} + +- (NSString*)value { + return _value; +} + +@synthesize label = _label; + +- (void)setLabel:(NSString*)label { + if (![_label isEqualToString:label]) { + _label = label; + if (self.textField) { + self.textField.placeholder = label; + } + } +} + +- (NSString*)label { + return _label; +} + - (void)awakeFromNib { [super awakeFromNib]; [self.textField addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventEditingChanged]; From 93399a8bda570985ed999b0e5a0346a83b573f0b Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 18 Sep 2020 01:00:30 -0700 Subject: [PATCH 074/195] Adds ability scores (strength, dexterity, constitution, intelligence, wisdom, and charisma) to the edit monster form. --- .../Views/EditMonsterViewController.m | 53 ++++++++++++++++--- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index c7bdec3..7d1a2fe 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -20,6 +20,19 @@ const int kSectionIndexBasicInfo = 0; const int kSectionIndexAbilityScores = 1; +const int kBasicInfoSectionRowIndexName = 0; +const int kBasicInfoSectionRowIndexSize = 1; +const int kBasicInfoSectionRowIndexType = 2; +const int kBasicInfoSectionRowIndexSubtype = 3; +const int kBasicInfoSectionRowIndexAlignment = 4; + +const int kAbilityScoreSectionRowIndexStrength = 0; +const int kAbilityScoreSectionRowIndexDexterity = 1; +const int kAbilityScoreSectionRowIndexConstitution = 2; +const int kAbilityScoreSectionRowIndexIntelligence = 3; +const int kAbilityScoreSectionRowIndexWisdom = 4; +const int kAbilityScoreSectionRowIndexCharisma = 5; + @implementation EditMonsterViewController { NSManagedObjectContext *_context; } @@ -111,7 +124,7 @@ const int kSectionIndexAbilityScores = 1; // * Alignment return 5; case kSectionIndexAbilityScores: - return 1; + return 6; default: return 0; } @@ -141,31 +154,31 @@ titleForHeaderInSection:(NSInteger)section { switch (indexPath.section) { case kSectionIndexBasicInfo: switch (indexPath.row) { - case 0: + case kBasicInfoSectionRowIndexName: newCell = [self makeShortStringCellFromTableView:self.monsterTableView withIdentifier:@"monster.name" label:NSLocalizedString(@"Name", @"Placeholder text for the name of a monster or NPC.") andInitialValue:self.editingMonster.name]; break; - case 1: + case kBasicInfoSectionRowIndexSize: newCell = [self makeShortStringCellFromTableView:self.monsterTableView withIdentifier:@"monster.size" label:NSLocalizedString(@"Size", @"Placehodler text for the size of a monster or NPC.") andInitialValue:self.editingMonster.size]; break; - case 2: + case kBasicInfoSectionRowIndexType: newCell = [self makeShortStringCellFromTableView:self.monsterTableView withIdentifier:@"monster.type" label:NSLocalizedString(@"Type", @"Placehodler text for the type of a monster or NPC.") andInitialValue:self.editingMonster.type]; break; - case 3: + case kBasicInfoSectionRowIndexSubtype: newCell = [self makeShortStringCellFromTableView:self.monsterTableView withIdentifier:@"monster.subtype" label:NSLocalizedString(@"Subtype", @"Placeholder text for the subtype of a monster or NPC.") andInitialValue:self.editingMonster.subtype]; break; - case 4: + case kBasicInfoSectionRowIndexAlignment: newCell = [self makeShortStringCellFromTableView:self.monsterTableView withIdentifier:@"monster.alignment" label: NSLocalizedString(@"Alignment", @"Placeholder text for the alignment of a monster or NPC.") @@ -175,11 +188,37 @@ titleForHeaderInSection:(NSInteger)section { break; case kSectionIndexAbilityScores: switch (indexPath.row) { - case 0: + case kAbilityScoreSectionRowIndexStrength: return [self makeIntegerCellFromTableView:self.monsterTableView withIdentifier:@"monster.strengthScore" label:NSLocalizedString(@"STR", @"Placeholder abbreviation for the strength score of a monster or NPC.") andInitialValue:self.editingMonster.strengthScore]; + case kAbilityScoreSectionRowIndexDexterity: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.dexterityScore" + label:NSLocalizedString(@"DEX", @"Placeholder abbreviation for the dexterity score of a monster or NPC.") + andInitialValue:self.editingMonster.dexterityScore]; + case kAbilityScoreSectionRowIndexConstitution: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.constitutionScore" + label:NSLocalizedString(@"CON", @"Placeholder abbreviation for the constitution score of a monster or NPC.") + andInitialValue:self.editingMonster.constitutionScore]; + case kAbilityScoreSectionRowIndexIntelligence: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.intelligenceScore" + label:NSLocalizedString(@"INT", @"Placeholder abbreviation for the intelligence score of a monster or NPC.") + andInitialValue:self.editingMonster.intelligenceScore]; + case kAbilityScoreSectionRowIndexWisdom: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.wisdomScore" + label:NSLocalizedString(@"WIS", @"Placeholder abbreviation for the wisdom score of a monster or NPC.") + andInitialValue:self.editingMonster.wisdomScore]; + case kAbilityScoreSectionRowIndexCharisma: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.charismaScore" + label:NSLocalizedString(@"CHA", @"Placeholder abbreviation for the charisma score of a monster or NPC.") + andInitialValue:self.editingMonster.charismaScore]; + } break; } From f94c7863b773ca0694464f05b594c75e059014c5 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 20 Sep 2020 03:17:28 -0700 Subject: [PATCH 075/195] Fixes EditMonsterViewController tests to use the new cell reuse identifier. --- MonsterCardsTests/Views/EditMonsterViewControllerTests.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MonsterCardsTests/Views/EditMonsterViewControllerTests.m b/MonsterCardsTests/Views/EditMonsterViewControllerTests.m index 3127cba..747435d 100644 --- a/MonsterCardsTests/Views/EditMonsterViewControllerTests.m +++ b/MonsterCardsTests/Views/EditMonsterViewControllerTests.m @@ -45,7 +45,7 @@ UITextField *textField = [[UITextField alloc] init]; shortStringCell.textField = textField; - [given([monstersTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]) willReturn:shortStringCell]; + [given([monstersTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]) willReturn:shortStringCell]; _monster.subtype = @"elf"; _viewController.originalMonster = _monster; @@ -89,7 +89,7 @@ UITextField *textField = [[UITextField alloc] init]; shortStringCell.textField = textField; - [given([monstersTableView dequeueReusableCellWithIdentifier:@"EditableShortString"]) willReturn:shortStringCell]; + [given([monstersTableView dequeueReusableCellWithIdentifier:@"MCShortStringField"]) willReturn:shortStringCell]; _monster.alignment = @"chaotic good"; _viewController.originalMonster = _monster; From 44354f7c8f3a52972588431ab7003595c1c6316d Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 20 Sep 2020 03:19:24 -0700 Subject: [PATCH 076/195] Exposes constants used by Monster internally for values. --- MonsterCards/Models/Monster.h | 33 +++++++++++++++++++ MonsterCards/Models/Monster.m | 62 +++++++++++++++++------------------ 2 files changed, 64 insertions(+), 31 deletions(-) diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index 6b36c20..05d09aa 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -17,6 +17,39 @@ NS_ASSUME_NONNULL_BEGIN + +extern const int kArmorClassUnarmored; +extern const int kArmorClassMageArmor; +extern const int kArmorClassPadded; +extern const int kArmorClassLeather; +extern const int kArmorClassStudded; +extern const int kArmorClassHide; +extern const int kArmorClassChainShirt; +extern const int kArmorClassScaleMail; +extern const int kArmorClassBreastplate; +extern const int kArmorClassHalfPlate; +extern const int kArmorClassRingMail; +extern const int kArmorClassChainMail; +extern const int kArmorClassSplintMail; +extern const int kArmorClassPlate; + +extern NSString* const kArmorNameNone; +extern NSString* const kArmorNameNaturalArmor; +extern NSString* const kArmorNameMageArmor; +extern NSString* const kArmorNamePadded; +extern NSString* const kArmorNameLeather; +extern NSString* const kArmorNameStuddedLeather; +extern NSString* const kArmorNameHide; +extern NSString* const kArmorNameChainShirt; +extern NSString* const kArmorNameScaleMail; +extern NSString* const kArmorNameBreastplate; +extern NSString* const kArmorNameHalfPlate; +extern NSString* const kArmorNameRingMail; +extern NSString* const kArmorNameChainMail; +extern NSString* const kArmorNameSplintMail; +extern NSString* const kArmorNamePlateMail; +extern NSString* const kArmorNameOther; + @class Skill; @interface Monster : NSManagedObject diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 907567d..9dd35de 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -35,6 +35,37 @@ @synthesize truesightDistance; @synthesize understandsBut; +const int kArmorClassUnarmored = 10; +const int kArmorClassMageArmor = kArmorClassUnarmored + 3; +const int kArmorClassPadded = kArmorClassUnarmored + 1; +const int kArmorClassLeather = kArmorClassUnarmored + 1; +const int kArmorClassStudded = kArmorClassUnarmored + 2; +const int kArmorClassHide = kArmorClassUnarmored + 2; +const int kArmorClassChainShirt = kArmorClassUnarmored + 3; +const int kArmorClassScaleMail = kArmorClassUnarmored + 4; +const int kArmorClassBreastplate = kArmorClassUnarmored + 4; +const int kArmorClassHalfPlate = kArmorClassUnarmored + 5; +const int kArmorClassRingMail = kArmorClassUnarmored + 4; +const int kArmorClassChainMail = kArmorClassUnarmored + 6; +const int kArmorClassSplintMail = kArmorClassUnarmored + 7; +const int kArmorClassPlate = kArmorClassUnarmored + 8; + +NSString* const kArmorNameNone = @"none"; +NSString* const kArmorNameNaturalArmor = @"natural armor"; +NSString* const kArmorNameMageArmor = @"mage armor"; +NSString* const kArmorNamePadded = @"padded"; +NSString* const kArmorNameLeather = @"leather"; +NSString* const kArmorNameStuddedLeather = @"studded"; +NSString* const kArmorNameHide = @"hide"; +NSString* const kArmorNameChainShirt = @"chain shirt"; +NSString* const kArmorNameScaleMail = @"scale mail"; +NSString* const kArmorNameBreastplate = @"breastplate"; +NSString* const kArmorNameHalfPlate = @"half plate"; +NSString* const kArmorNameRingMail = @"ring mail"; +NSString* const kArmorNameChainMail = @"chain mail"; +NSString* const kArmorNameSplintMail = @"splint"; +NSString* const kArmorNamePlateMail = @"plate"; +NSString* const kArmorNameOther = @"other"; +(int)abilityModifierForScore: (int)score { return (int)floor((score - 10) / 2.0); } @@ -144,37 +175,6 @@ return [Monster abilityModifierForScore:self.charismaScore]; } -const int kArmorClassUnarmored = 10; -const int kArmorClassMageArmor = kArmorClassUnarmored + 3; -const int kArmorClassPadded = kArmorClassUnarmored + 1; -const int kArmorClassLeather = kArmorClassUnarmored + 1; -const int kArmorClassStudded = kArmorClassUnarmored + 2; -const int kArmorClassHide = kArmorClassUnarmored + 2; -const int kArmorClassChainShirt = kArmorClassUnarmored + 3; -const int kArmorClassScaleMail = kArmorClassUnarmored + 4; -const int kArmorClassBreastplate = kArmorClassUnarmored + 4; -const int kArmorClassHalfPlate = kArmorClassUnarmored + 5; -const int kArmorClassRingMail = kArmorClassUnarmored + 4; -const int kArmorClassChainMail = kArmorClassUnarmored + 6; -const int kArmorClassSplintMail = kArmorClassUnarmored + 7; -const int kArmorClassPlate = kArmorClassUnarmored + 8; - -NSString const *kArmorNameNone = @"none"; -NSString const *kArmorNameNaturalArmor = @"natural armor"; -NSString const *kArmorNameMageArmor = @"mage armor"; -NSString const *kArmorNamePadded = @"padded"; -NSString const *kArmorNameLeather = @"leather"; -NSString const *kArmorNameStuddedLeather = @"studded"; -NSString const *kArmorNameHide = @"hide"; -NSString const *kArmorNameChainShirt = @"chain shirt"; -NSString const *kArmorNameScaleMail = @"scale mail"; -NSString const *kArmorNameBreastplate = @"breastplate"; -NSString const *kArmorNameHalfPlate = @"half plate"; -NSString const *kArmorNameRingMail = @"ring mail"; -NSString const *kArmorNameChainMail = @"chain mail"; -NSString const *kArmorNameSplintMail = @"splint"; -NSString const *kArmorNamePlateMail = @"plate"; -NSString const *kArmorNameOther = @"other"; //getArmorClass -(NSString*)armorClassDescription { From 16aa24150e795a340fe38c41ec510396178abc7f Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sun, 20 Sep 2020 03:21:34 -0700 Subject: [PATCH 077/195] Adds HP related fields to core data. Implements hitDieForSize and hitPointsDescription in Monster. Adds tests. --- MonsterCards/Models/Monster.h | 9 ++- MonsterCards/Models/Monster.m | 45 ++++++++++++-- .../MonsterCards.xcdatamodel/contents | 7 ++- MonsterCardsTests/Models/MonsterTests.m | 58 ++++++++++++++++++- 4 files changed, 107 insertions(+), 12 deletions(-) diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index 05d09aa..e659fd3 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -17,6 +17,12 @@ NS_ASSUME_NONNULL_BEGIN +extern NSString* const kMonsterSizeTiny; +extern NSString* const kMonsterSizeSmall; +extern NSString* const kMonsterSizeMedium; +extern NSString* const kMonsterSizeLarge; +extern NSString* const kMonsterSizeHuge; +extern NSString* const kMonsterSizeGargantuan; extern const int kArmorClassUnarmored; extern const int kArmorClassMageArmor; @@ -54,7 +60,6 @@ extern NSString* const kArmorNameOther; @interface Monster : NSManagedObject -@property NSString *hpText; @property NSString *speed; @property NSString *burrowSpeed; @property NSString *climbSpeed; @@ -71,12 +76,10 @@ extern NSString* const kArmorNameOther; @property NSString *understandsBut; @property int naturalArmorBonus; -@property int hitDice; @property int customProficiencyBonus; // Shouldn't this be a BOOL? @property int telepathy; -@property BOOL customHP; @property BOOL hover; @property BOOL customSpeed; @property BOOL isBlind; diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 9dd35de..21897d1 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -17,15 +17,12 @@ @synthesize challengeRating; @synthesize climbSpeed; @synthesize customChallengeRating; -@synthesize customHP; @synthesize customProficiencyBonus; @synthesize customSpeed; @synthesize customSpeedDescription; @synthesize darkvisionDistance; @synthesize flySpeed; -@synthesize hitDice; @synthesize hover; -@synthesize hpText; @synthesize isBlind; @synthesize naturalArmorBonus; @synthesize speed; @@ -66,12 +63,34 @@ NSString* const kArmorNameChainMail = @"chain mail"; NSString* const kArmorNameSplintMail = @"splint"; NSString* const kArmorNamePlateMail = @"plate"; NSString* const kArmorNameOther = @"other"; + +NSString* const kMonsterSizeTiny = @"tiny"; +NSString* const kMonsterSizeSmall = @"small"; +NSString* const kMonsterSizeMedium = @"medium"; +NSString* const kMonsterSizeLarge = @"large"; +NSString* const kMonsterSizeHuge = @"huge"; +NSString* const kMonsterSizeGargantuan = @"gargantuan"; + +(int)abilityModifierForScore: (int)score { return (int)floor((score - 10) / 2.0); } +(int)hitDieForSize: (NSString*)size{ - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + if ([kMonsterSizeTiny isEqualToString:size]) { + return 4; + } else if ([kMonsterSizeSmall isEqualToString:size]) { + return 6; + } else if ([kMonsterSizeMedium isEqualToString:size]) { + return 8; + } else if ([kMonsterSizeLarge isEqualToString:size]) { + return 10; + } else if ([kMonsterSizeHuge isEqualToString:size]) { + return 12; + } else if ([kMonsterSizeGargantuan isEqualToString:size]) { + return 20; + } else { + return 8; + } } -(id)init { @@ -98,6 +117,8 @@ NSString* const kArmorNameOther = @"other"; self.size = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"size" withDefaultValue:@""]; self.type = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"type" withDefaultValue:@""]; self.subtype = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"tag" withDefaultValue:@""]; + self.hpText = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"hpText" withDefaultValue:@""]; + self.alignment = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"alignment" withDefaultValue:@""]; self.armorName = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"armorName" withDefaultValue:@""]; self.otherArmorDescription = [JSONHelper readStringFromDictionary:jsonRoot forKey:@"otherArmorDesc" withDefaultValue:@""]; @@ -108,6 +129,9 @@ NSString* const kArmorNameOther = @"other"; self.wisdomScore = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"wisPoints" withDefaultValue:0]; self.charismaScore = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"chaPoints" withDefaultValue:0]; self.shieldBonus = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"shieldBonus" withDefaultValue:0]; + self.hitDice = [JSONHelper readIntFromDictionary:jsonRoot forKey:@"hitDice" withDefaultValue:0]; + + self.customHP = [JSONHelper readBoolFromDictionary:jsonRoot forKey:@"customHP" withDefaultValue:NO]; return self; } @@ -251,7 +275,15 @@ NSString* const kArmorNameOther = @"other"; //getHitPoints -(NSString*)hitPointsDescription { - @throw [[NSException alloc] initWithName:@"unimplemented" reason:@"Method not implemented." userInfo:nil]; + if (self.customHP) { + return self.hpText; + } else { + int dieSize = [Monster hitDieForSize:self.size]; + int conMod = self.constitutionModifier; + int hpTotal = (int)MAX(1, ceil(dieSize + conMod + (self.hitDice - 1) * ((dieSize + 1) / 2.0 + conMod))); + int conBonus = conMod * self.hitDice; + return [NSString stringWithFormat:@"%d (%dd%d%+d)", hpTotal, self.hitDice, dieSize, conBonus]; + } } //getSpeedText @@ -450,6 +482,9 @@ NSString* const kArmorNameOther = @"other"; self.armorName = monster.armorName; self.otherArmorDescription = monster.otherArmorDescription; self.shieldBonus = monster.shieldBonus; + self.customHP = monster.customHP; + self.hitDice = monster.hitDice; + self.hpText = monster.hpText; } @end diff --git a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents index 3d90d75..a5c0a26 100644 --- a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents +++ b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents @@ -1,11 +1,14 @@ - + + + + @@ -17,6 +20,6 @@ - + \ No newline at end of file diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index 61285fc..eec86b9 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -25,7 +25,7 @@ - (void)setUp { _context = nil; _monster = [[Monster alloc] initWithContext:_context]; - _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14,\"wisPoints\":16,\"chaPoints\":18,\"armorName\":\"none\",\"otherArmorDesc\":\"10\",\"shieldBonus\":2}"; + _jsonString = @"{\"name\":\"Acolyte\",\"size\":\"medium\",\"type\":\"humanoid\",\"tag\":\"any race\",\"alignment\":\"any alignment\",\"strPoints\":8,\"dexPoints\":10,\"conPoints\":12,\"intPoints\":14,\"wisPoints\":16,\"chaPoints\":18,\"armorName\":\"none\",\"otherArmorDesc\":\"10\",\"shieldBonus\":2,\"hitDice\":3,\"customHP\":true,\"hpText\":\"1234 (1d1+magic)\"}"; _jsonData = [_jsonString dataUsingEncoding:NSUTF8StringEncoding]; } @@ -49,7 +49,9 @@ XCTAssertEqualObjects(@"", _monster.armorName); XCTAssertEqualObjects(@"", _monster.otherArmorDescription); XCTAssertEqual(0, _monster.shieldBonus); -} + XCTAssertEqual(NO, _monster.customHP); + XCTAssertEqual(0, _monster.hitDice); + XCTAssertEqualObjects(@"", _monster.hpText);} - (void)testInitWithJSONString { _monster = [[Monster alloc] initWithJSONString:_jsonString andContext:_context]; @@ -69,6 +71,9 @@ XCTAssertEqualObjects(@"none", _monster.armorName); XCTAssertEqualObjects(@"10", _monster.otherArmorDescription); XCTAssertEqual(2, _monster.shieldBonus); + XCTAssertEqual(YES, _monster.customHP); + XCTAssertEqual(3, _monster.hitDice); + XCTAssertEqualObjects(@"1234 (1d1+magic)", _monster.hpText); } - (void)testInitWithEmptyJSONString { @@ -89,7 +94,11 @@ XCTAssertEqualObjects(@"", _monster.armorName); XCTAssertEqualObjects(@"", _monster.otherArmorDescription); XCTAssertEqual(0, _monster.shieldBonus); + XCTAssertEqual(NO, _monster.customHP); + XCTAssertEqual(0, _monster.hitDice); + XCTAssertEqualObjects(@"", _monster.hpText); } + - (void)testInitWithJSONData { _monster = [[Monster alloc] initWithJSONData:_jsonData andContext:_context]; @@ -108,6 +117,9 @@ XCTAssertEqualObjects(@"none", _monster.armorName); XCTAssertEqualObjects(@"10", _monster.otherArmorDescription); XCTAssertEqual(2, _monster.shieldBonus); + XCTAssertEqual(YES, _monster.customHP); + XCTAssertEqual(3, _monster.hitDice); + XCTAssertEqualObjects(@"1234 (1d1+magic)", _monster.hpText); } - (void)testNameGetterAndSetter { @@ -382,4 +394,46 @@ XCTAssertEqualObjects(@"green", _monster.otherArmorDescription); } +- (void)testHitDieForSizeReturnsExpectedValuesForKnownSizes { + +} + +- (void)testHitDieForSizeReutnrsEightForUnknownSizes { + XCTAssertEqual(4, [Monster hitDieForSize:kMonsterSizeTiny]); + XCTAssertEqual(6, [Monster hitDieForSize:kMonsterSizeSmall]); + XCTAssertEqual(8, [Monster hitDieForSize:kMonsterSizeMedium]); + XCTAssertEqual(10, [Monster hitDieForSize:kMonsterSizeLarge]); + XCTAssertEqual(12, [Monster hitDieForSize:kMonsterSizeHuge]); + XCTAssertEqual(20, [Monster hitDieForSize:kMonsterSizeGargantuan]); +} + +- (void)testCustomHPGetterAndSetter { + XCTAssertEqual(8, [Monster hitDieForSize:nil]); + XCTAssertEqual(8, [Monster hitDieForSize:@""]); + XCTAssertEqual(8, [Monster hitDieForSize:@"unknown size"]); +} + +- (void)testHitDiceGetterAndSetter { + _monster.hitDice = 9; + XCTAssertEqual(9, _monster.hitDice); +} + +- (void)testHPTextGetterAndSetter { + _monster.hpText = @"This is my HP."; + XCTAssertEqualObjects(@"This is my HP.", _monster.hpText); +} + +- (void)testHitPointsDescriptionWithCustomHP { + _monster = [[Monster alloc] initWithJSONString:_jsonString andContext:_context]; + _monster.customHP = YES; + XCTAssertEqualObjects(@"1234 (1d1+magic)", _monster.hitPointsDescription); +} + +- (void)testHitPointsDescriptionWithCalculatedHP { + _monster = [[Monster alloc] initWithJSONString:_jsonString andContext:_context]; + _monster.customHP = NO; + XCTAssertEqualObjects(@"20 (3d8+3)", _monster.hitPointsDescription); +} + + @end From 5a2e98d35b0cfab42b942de808aa52a381bd0ed6 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 25 Sep 2020 03:52:44 -0700 Subject: [PATCH 078/195] Adds HP to monster card. --- MonsterCards/Base.lproj/Main.storyboard | 10 ++++++++++ MonsterCards/Views/MonsterViewController.h | 1 + MonsterCards/Views/MonsterViewController.m | 8 ++++++++ MonsterCardsTests/Models/MonsterTests.m | 1 - 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 49df5d6..83e1d55 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -211,16 +211,25 @@ + + + + @@ -235,6 +244,7 @@ + diff --git a/MonsterCards/Views/MonsterViewController.h b/MonsterCards/Views/MonsterViewController.h index c3d8e16..c04af53 100644 --- a/MonsterCards/Views/MonsterViewController.h +++ b/MonsterCards/Views/MonsterViewController.h @@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN @property (weak, nonatomic) IBOutlet UILabel *monsterName; @property (weak, nonatomic) IBOutlet UILabel *monsterMeta; @property (weak, nonatomic) IBOutlet UILabel *monsterArmorClass; +@property (weak, nonatomic) IBOutlet UILabel *monsterHitPoints; @property Monster* monster; diff --git a/MonsterCards/Views/MonsterViewController.m b/MonsterCards/Views/MonsterViewController.m index a7cacf3..e5e1583 100644 --- a/MonsterCards/Views/MonsterViewController.m +++ b/MonsterCards/Views/MonsterViewController.m @@ -52,6 +52,14 @@ self.monsterArmorClass.attributedText = [HTMLHelper attributedStringFromHTML:[NSString stringWithFormat:@"Armor Class %@", armorClassDescription]]; } } + if (self.monsterHitPoints != nil) { + NSString *hitPointsDescription = self.monster.hitPointsDescription; + if (hitPointsDescription == nil) { + self.monsterHitPoints.text = @""; + } else { + self.monsterHitPoints.attributedText = [HTMLHelper attributedStringFromHTML:[NSString stringWithFormat:@"Hit Points %@", hitPointsDescription]]; + } + } } - (IBAction)unwindWithSegue:(UIStoryboardSegue *)unwindSegue { diff --git a/MonsterCardsTests/Models/MonsterTests.m b/MonsterCardsTests/Models/MonsterTests.m index eec86b9..72dcbd5 100644 --- a/MonsterCardsTests/Models/MonsterTests.m +++ b/MonsterCardsTests/Models/MonsterTests.m @@ -435,5 +435,4 @@ XCTAssertEqualObjects(@"20 (3d8+3)", _monster.hitPointsDescription); } - @end From 6341081fde9c6c408dc2c9a59e51cfe14eb3cc5d Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 25 Sep 2020 04:46:50 -0700 Subject: [PATCH 079/195] Adds boolean field to MCFormFields. --- MonsterCards.xcodeproj/project.pbxproj | 6 ++ MonsterCards/Base.lproj/Main.storyboard | 36 ++++++++++++ .../FormFields/MCBooleanFieldTableViewCell.h | 26 +++++++++ .../FormFields/MCBooleanFieldTableViewCell.m | 58 +++++++++++++++++++ .../Views/FormFields/MCFormFieldConstants.h | 1 + .../Views/FormFields/MCFormFieldConstants.m | 1 + .../FormFields/MCIntegerFieldTableViewCell.m | 1 + 7 files changed, 129 insertions(+) create mode 100644 MonsterCards/Views/FormFields/MCBooleanFieldTableViewCell.h create mode 100644 MonsterCards/Views/FormFields/MCBooleanFieldTableViewCell.m diff --git a/MonsterCards.xcodeproj/project.pbxproj b/MonsterCards.xcodeproj/project.pbxproj index 1321278..3a2a671 100644 --- a/MonsterCards.xcodeproj/project.pbxproj +++ b/MonsterCards.xcodeproj/project.pbxproj @@ -29,6 +29,7 @@ E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; }; E26A73572511BA1900C5677E /* HTMLHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E26A73562511BA1900C5677E /* HTMLHelper.m */; }; E278E21B250DFFCA00D3EC0E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E278E21A250DFFCA00D3EC0E /* Images.xcassets */; }; + E2805514251E03BE00C87527 /* MCBooleanFieldTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2805513251E03BE00C87527 /* MCBooleanFieldTableViewCell.m */; }; E288744A25148BA0005CA948 /* MCFormFieldConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = E288744925148BA0005CA948 /* MCFormFieldConstants.m */; }; E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */; }; E2D3E3B42508C3360052A8EC /* MCShortStringFieldTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3B32508C3360052A8EC /* MCShortStringFieldTableViewCell.m */; }; @@ -113,6 +114,8 @@ E26A73552511BA1900C5677E /* HTMLHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLHelper.h; sourceTree = ""; }; E26A73562511BA1900C5677E /* HTMLHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLHelper.m; sourceTree = ""; }; E278E21A250DFFCA00D3EC0E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + E2805512251E03BE00C87527 /* MCBooleanFieldTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCBooleanFieldTableViewCell.h; sourceTree = ""; }; + E2805513251E03BE00C87527 /* MCBooleanFieldTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MCBooleanFieldTableViewCell.m; sourceTree = ""; }; E288744925148BA0005CA948 /* MCFormFieldConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MCFormFieldConstants.m; sourceTree = ""; }; E288744E25148BAD005CA948 /* MCFormFieldConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCFormFieldConstants.h; sourceTree = ""; }; E2D3E3AE250827110052A8EC /* EditMonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditMonsterViewController.h; sourceTree = ""; }; @@ -277,6 +280,8 @@ E20C315325146708003AB1AA /* MCIntegerFieldTableViewCell.m */, E2D3E3B22508C3360052A8EC /* MCShortStringFieldTableViewCell.h */, E2D3E3B32508C3360052A8EC /* MCShortStringFieldTableViewCell.m */, + E2805512251E03BE00C87527 /* MCBooleanFieldTableViewCell.h */, + E2805513251E03BE00C87527 /* MCBooleanFieldTableViewCell.m */, ); path = FormFields; sourceTree = ""; @@ -613,6 +618,7 @@ E25BD60425036CF0007B04EF /* Ability.m in Sources */, E20D032E25031BEF00FB6E43 /* CollectionsViewController.m in Sources */, E26A73572511BA1900C5677E /* HTMLHelper.m in Sources */, + E2805514251E03BE00C87527 /* MCBooleanFieldTableViewCell.m in Sources */, E25BD5F5250352C4007B04EF /* Monster.m in Sources */, E25BD5F8250368A8007B04EF /* SavingThrow.m in Sources */, E2F7248C25005E8A007D87ED /* main.m in Sources */, diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 83e1d55..6d306a4 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -348,6 +348,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MonsterCards/Views/FormFields/MCBooleanFieldTableViewCell.h b/MonsterCards/Views/FormFields/MCBooleanFieldTableViewCell.h new file mode 100644 index 0000000..4c8efcd --- /dev/null +++ b/MonsterCards/Views/FormFields/MCBooleanFieldTableViewCell.h @@ -0,0 +1,26 @@ +// +// MCBooleanFieldTableViewCell.h +// MonsterCards +// +// Created by Tom Hicks on 9/25/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "MCFormFieldDelegate.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MCBooleanFieldTableViewCell : UITableViewCell + +@property NSString* identifier; +@property NSString* label; +@property BOOL value; + +@property (weak, nonatomic) id delegate; +@property (weak, nonatomic) IBOutlet UILabel *labelView; +@property (weak, nonatomic) IBOutlet UISwitch *switchView; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/FormFields/MCBooleanFieldTableViewCell.m b/MonsterCards/Views/FormFields/MCBooleanFieldTableViewCell.m new file mode 100644 index 0000000..62bb9e3 --- /dev/null +++ b/MonsterCards/Views/FormFields/MCBooleanFieldTableViewCell.m @@ -0,0 +1,58 @@ +// +// MCBooleanFieldTableViewCell.m +// MonsterCards +// +// Created by Tom Hicks on 9/25/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "MCBooleanFieldTableViewCell.h" + +@implementation MCBooleanFieldTableViewCell + +@synthesize value = _value; + +- (void)setValue:(BOOL)value { + if (value != _value) { + _value = value; + if (self.switchView) { + self.switchView.on = _value; + } + } +} + +- (BOOL)value { + return _value; +} + +@synthesize label = _label; + +- (void)setLabel:(NSString*)label { + if (![_label isEqualToString:label]) { + _label = label; + if (self.labelView) { + self.labelView.text = label; + } + } +} + +- (NSString*)label { + return _label; +} + +- (void)awakeFromNib { + [super awakeFromNib]; + self.switchView.on = self.value; + self.labelView.text = self.label; +} + +- (IBAction)valueChanged:(id)sender { + self.value = self.switchView.on; + if (self.delegate != nil) { + [self.delegate editableValueDidChange:[NSNumber numberWithBool:self.value] + forIdentifier:self.identifier + andType:kMCFieldValueTypeBoolean]; + } +} + +@end diff --git a/MonsterCards/Views/FormFields/MCFormFieldConstants.h b/MonsterCards/Views/FormFields/MCFormFieldConstants.h index d5dbd0f..c8e9a9e 100644 --- a/MonsterCards/Views/FormFields/MCFormFieldConstants.h +++ b/MonsterCards/Views/FormFields/MCFormFieldConstants.h @@ -11,5 +11,6 @@ extern NSString* const kMCFieldValueTypeInteger; extern NSString* const kMCFieldValueTypeString; +extern NSString* const kMCFieldValueTypeBoolean; #endif /* MCFormFieldConstants_h */ diff --git a/MonsterCards/Views/FormFields/MCFormFieldConstants.m b/MonsterCards/Views/FormFields/MCFormFieldConstants.m index 809a712..f2baa11 100644 --- a/MonsterCards/Views/FormFields/MCFormFieldConstants.m +++ b/MonsterCards/Views/FormFields/MCFormFieldConstants.m @@ -11,3 +11,4 @@ NSString* const kMCFieldValueTypeInteger = @"Integer"; NSString* const kMCFieldValueTypeString = @"String"; +NSString* const kMCFieldValueTypeBoolean = @"Boolean"; diff --git a/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m b/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m index ae8a107..1ac7204 100644 --- a/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m +++ b/MonsterCards/Views/FormFields/MCIntegerFieldTableViewCell.m @@ -66,4 +66,5 @@ - (IBAction)stepperValueChanged:(id)sender { self.value = self.stepper.value; } + @end From f23fe12e7b3f83eee7ab72ad2f2798745beb1142 Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Fri, 25 Sep 2020 04:47:23 -0700 Subject: [PATCH 080/195] Adds Hit Dice and Custom HP to monster edit form. --- .../Views/EditMonsterViewController.m | 51 ++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index 7d1a2fe..4959ff0 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -9,6 +9,7 @@ #import "EditMonsterViewController.h" #import "MCShortStringFieldTableViewCell.h" #import "MCIntegerFieldTableViewCell.h" +#import "MCBooleanFieldTableViewCell.h" #import "AppDelegate.h" @interface EditMonsterViewController () @@ -18,7 +19,8 @@ @end const int kSectionIndexBasicInfo = 0; -const int kSectionIndexAbilityScores = 1; +const int kSectionIndexArmor = 1; +const int kSectionIndexAbilityScores = 2; const int kBasicInfoSectionRowIndexName = 0; const int kBasicInfoSectionRowIndexSize = 1; @@ -26,6 +28,10 @@ const int kBasicInfoSectionRowIndexType = 2; const int kBasicInfoSectionRowIndexSubtype = 3; const int kBasicInfoSectionRowIndexAlignment = 4; +const int kArmorSectionRowIndexHitDice = 0; +const int kArmorSectionRowIndexCustomHP = 1; +const int kArmorSectionRowIndexCustomHPText = 2; + const int kAbilityScoreSectionRowIndexStrength = 0; const int kAbilityScoreSectionRowIndexDexterity = 1; const int kAbilityScoreSectionRowIndexConstitution = 2; @@ -95,6 +101,22 @@ const int kAbilityScoreSectionRowIndexCharisma = 5; return cell; } +- (MCBooleanFieldTableViewCell*) makeBooleanCellFromTableView:(UITableView*)tableView + withIdentifier:(NSString*)identifier + label:(NSString*)label + andInitialValue:(BOOL)initialValue { + MCBooleanFieldTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MCBooleanField"]; + if (!cell || ![cell isKindOfClass:[MCBooleanFieldTableViewCell class]]) { + return nil; + } + cell.delegate = self; + cell.identifier = identifier; + cell.label = label; + cell.value = initialValue; + + return cell; +} + #pragma mark - Navigation @@ -123,6 +145,8 @@ const int kAbilityScoreSectionRowIndexCharisma = 5; // * Subtype // * Alignment return 5; + case kSectionIndexArmor: + return 3; case kSectionIndexAbilityScores: return 6; default: @@ -132,7 +156,7 @@ const int kAbilityScoreSectionRowIndexCharisma = 5; - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - return 2; + return 3; } - (NSString *)tableView:(UITableView *)tableView @@ -140,6 +164,8 @@ titleForHeaderInSection:(NSInteger)section { switch(section) { case kSectionIndexBasicInfo: return NSLocalizedString(@"Basic Info", @"Section title"); + case kSectionIndexArmor: + return NSLocalizedString(@"Armor, HP, and Speed", @"Section title"); case kSectionIndexAbilityScores: return NSLocalizedString(@"Ability Scores", @"Section title"); default: @@ -186,6 +212,18 @@ titleForHeaderInSection:(NSInteger)section { break; } break; + case kSectionIndexArmor: + switch (indexPath.row) { + case kArmorSectionRowIndexHitDice: + return [self makeIntegerCellFromTableView:self.monsterTableView withIdentifier:@"monster.hitDice" label:NSLocalizedString(@"Hit Dice", @"") andInitialValue:self.editingMonster.hitDice]; + case kArmorSectionRowIndexCustomHP: + return [self makeBooleanCellFromTableView:self.monsterTableView + withIdentifier:@"monster.customHP" label:NSLocalizedString(@"Custom HP", @"") andInitialValue:self.editingMonster.customHP]; + return nil; + case kArmorSectionRowIndexCustomHPText: + return [self makeShortStringCellFromTableView:self.monsterTableView withIdentifier:@"monster.customHPText" label:NSLocalizedString(@"Custom HP Text", @"") andInitialValue:self.editingMonster.hpText]; + } + break; case kSectionIndexAbilityScores: switch (indexPath.row) { case kAbilityScoreSectionRowIndexStrength: @@ -245,6 +283,8 @@ titleForHeaderInSection:(NSInteger)section { self.editingMonster.subtype = (NSString*)value; } else if ([@"monster.alignment" isEqualToString:identifier]) { self.editingMonster.alignment = (NSString*)value; + } else if ([@"monster.customHPText" isEqualToString:identifier]){ + self.editingMonster.hpText = (NSString*)value; } } if ([kMCFieldValueTypeInteger isEqualToString:type]) { @@ -260,6 +300,13 @@ titleForHeaderInSection:(NSInteger)section { self.editingMonster.wisdomScore = [(NSNumber*)value intValue]; } else if ([@"monster.charismaScore" isEqualToString:identifier]) { self.editingMonster.charismaScore = [(NSNumber*)value intValue]; + } else if ([@"monster.hitDice" isEqualToString:identifier]){ + self.editingMonster.hitDice = [(NSNumber*)value intValue]; + } + } + if ([kMCFieldValueTypeBoolean isEqualToString:type]) { + if ([@"monster.customHP" isEqualToString:identifier]) { + self.editingMonster.customHP = [(NSNumber*)value boolValue]; } } } From 7bbe86c901c5ed0931e828190ced7e180b23b22d Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 26 Sep 2020 01:22:11 -0700 Subject: [PATCH 081/195] Adds speed properties to Core Data and monster editor. --- MonsterCards/Models/Monster.h | 8 -- MonsterCards/Models/Monster.m | 16 +-- .../MonsterCards.xcdatamodel/contents | 10 +- .../Views/EditMonsterViewController.m | 97 +++++++++++++++++-- 4 files changed, 107 insertions(+), 24 deletions(-) diff --git a/MonsterCards/Models/Monster.h b/MonsterCards/Models/Monster.h index e659fd3..66ef24f 100644 --- a/MonsterCards/Models/Monster.h +++ b/MonsterCards/Models/Monster.h @@ -60,13 +60,7 @@ extern NSString* const kArmorNameOther; @interface Monster : NSManagedObject -@property NSString *speed; -@property NSString *burrowSpeed; -@property NSString *climbSpeed; -@property NSString *flySpeed; -@property NSString *swimSpeed; // speedDescription -@property NSString *customSpeedDescription; @property NSString *challengeRating; @property NSString *customChallengeRating; @property NSString *blindsightDistance; @@ -80,8 +74,6 @@ extern NSString* const kArmorNameOther; // Shouldn't this be a BOOL? @property int telepathy; -@property BOOL hover; -@property BOOL customSpeed; @property BOOL isBlind; +(int)abilityModifierForScore: (int)score; diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 21897d1..d74245f 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -13,20 +13,12 @@ @implementation Monster @synthesize blindsightDistance; -@synthesize burrowSpeed; @synthesize challengeRating; -@synthesize climbSpeed; @synthesize customChallengeRating; @synthesize customProficiencyBonus; -@synthesize customSpeed; -@synthesize customSpeedDescription; @synthesize darkvisionDistance; -@synthesize flySpeed; -@synthesize hover; @synthesize isBlind; @synthesize naturalArmorBonus; -@synthesize speed; -@synthesize swimSpeed; @synthesize telepathy; @synthesize tremorsenseDistance; @synthesize truesightDistance; @@ -485,6 +477,14 @@ NSString* const kMonsterSizeGargantuan = @"gargantuan"; self.customHP = monster.customHP; self.hitDice = monster.hitDice; self.hpText = monster.hpText; + self.baseSpeed = monster.baseSpeed; + self.burrowSpeed = monster.burrowSpeed; + self.climbSpeed = monster.climbSpeed; + self.flySpeed = monster.flySpeed; + self.canHover = monster.canHover; + self.swimSpeed = monster.swimSpeed; + self.hasCustomSpeed = monster.hasCustomSpeed; + self.customSpeed = monster.customSpeed; } @end diff --git a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents index a5c0a26..baf8099 100644 --- a/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents +++ b/MonsterCards/MonsterCards.xcdatamodeld/MonsterCards.xcdatamodel/contents @@ -3,10 +3,17 @@ + + + + + + + @@ -16,10 +23,11 @@ + - + \ No newline at end of file diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index 4959ff0..d7f99af 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -20,7 +20,8 @@ const int kSectionIndexBasicInfo = 0; const int kSectionIndexArmor = 1; -const int kSectionIndexAbilityScores = 2; +const int kSectionIndexSpeed = 2; +const int kSectionIndexAbilityScores = 3; const int kBasicInfoSectionRowIndexName = 0; const int kBasicInfoSectionRowIndexSize = 1; @@ -32,6 +33,15 @@ const int kArmorSectionRowIndexHitDice = 0; const int kArmorSectionRowIndexCustomHP = 1; const int kArmorSectionRowIndexCustomHPText = 2; +const int kSpeedSectionRowIndexBaseSpeed = 0; +const int kSpeedSectionRowIndexBurrowSpeed = 1; +const int kSpeedSectionRowIndexClimbSpeed = 2; +const int kSpeedSectionRowIndexFlySpeed = 3; +const int kSpeedSectionRowIndexCanHover = 4; +const int kSpeedSectionRowIndexSwimSpeed = 5; +const int kSpeedSectionRowIndexHasCustomSpeed = 6; +const int kSpeedSectionRowIndexCustomSpeed = 7; + const int kAbilityScoreSectionRowIndexStrength = 0; const int kAbilityScoreSectionRowIndexDexterity = 1; const int kAbilityScoreSectionRowIndexConstitution = 2; @@ -147,6 +157,8 @@ const int kAbilityScoreSectionRowIndexCharisma = 5; return 5; case kSectionIndexArmor: return 3; + case kSectionIndexSpeed: + return 8; case kSectionIndexAbilityScores: return 6; default: @@ -165,7 +177,9 @@ titleForHeaderInSection:(NSInteger)section { case kSectionIndexBasicInfo: return NSLocalizedString(@"Basic Info", @"Section title"); case kSectionIndexArmor: - return NSLocalizedString(@"Armor, HP, and Speed", @"Section title"); + return NSLocalizedString(@"Armor and HP", @"Section title"); + case kSectionIndexSpeed: + return NSLocalizedString(@"Speed", @"Section title"); case kSectionIndexAbilityScores: return NSLocalizedString(@"Ability Scores", @"Section title"); default: @@ -215,13 +229,66 @@ titleForHeaderInSection:(NSInteger)section { case kSectionIndexArmor: switch (indexPath.row) { case kArmorSectionRowIndexHitDice: - return [self makeIntegerCellFromTableView:self.monsterTableView withIdentifier:@"monster.hitDice" label:NSLocalizedString(@"Hit Dice", @"") andInitialValue:self.editingMonster.hitDice]; + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.hitDice" + label:NSLocalizedString(@"Hit Dice", @"") + andInitialValue:self.editingMonster.hitDice]; case kArmorSectionRowIndexCustomHP: return [self makeBooleanCellFromTableView:self.monsterTableView - withIdentifier:@"monster.customHP" label:NSLocalizedString(@"Custom HP", @"") andInitialValue:self.editingMonster.customHP]; + withIdentifier:@"monster.customHP" + label:NSLocalizedString(@"Custom HP", @"") + andInitialValue:self.editingMonster.customHP]; return nil; case kArmorSectionRowIndexCustomHPText: - return [self makeShortStringCellFromTableView:self.monsterTableView withIdentifier:@"monster.customHPText" label:NSLocalizedString(@"Custom HP Text", @"") andInitialValue:self.editingMonster.hpText]; + return [self makeShortStringCellFromTableView:self.monsterTableView + withIdentifier:@"monster.customHPText" + label:NSLocalizedString(@"Custom HP Text", @"") + andInitialValue:self.editingMonster.hpText]; + } + break; + case kSectionIndexSpeed: + switch (indexPath.row) { + case kSpeedSectionRowIndexBaseSpeed: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.baseSpeed" + label:NSLocalizedString(@"Base", @"") + andInitialValue:self.editingMonster.baseSpeed]; + case kSpeedSectionRowIndexBurrowSpeed: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.burrowSpeed" + label:NSLocalizedString(@"Burrow", @"") + andInitialValue:self.editingMonster.burrowSpeed]; + case kSpeedSectionRowIndexClimbSpeed: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.climbSpeed" + label:NSLocalizedString(@"Climb", @"") + andInitialValue:self.editingMonster.climbSpeed]; + case kSpeedSectionRowIndexFlySpeed: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.flySpeed" + label:NSLocalizedString(@"Fly", @"") + andInitialValue:self.editingMonster.flySpeed]; + case kSpeedSectionRowIndexCanHover: + return [self makeBooleanCellFromTableView:self.monsterTableView + withIdentifier:@"monster.canHover" + label:NSLocalizedString(@"Hover", @"") + andInitialValue:self.editingMonster.canHover]; + case kSpeedSectionRowIndexSwimSpeed: + return [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.swimSpeed" + label:NSLocalizedString(@"Swim", @"") + andInitialValue:self.editingMonster.swimSpeed]; + case kSpeedSectionRowIndexHasCustomSpeed: + return [self makeBooleanCellFromTableView:self.monsterTableView + withIdentifier:@"monster.hasCustomSpeed" + label:NSLocalizedString(@"Custom Speed", @"") + andInitialValue:self.editingMonster.hasCustomSpeed]; + case kSpeedSectionRowIndexCustomSpeed: + return [self makeShortStringCellFromTableView:self.monsterTableView + withIdentifier:@"monster.customSpeed" + label:NSLocalizedString(@"Custom Speed", @"") + andInitialValue:self.editingMonster.customSpeed]; + } break; case kSectionIndexAbilityScores: @@ -283,8 +350,10 @@ titleForHeaderInSection:(NSInteger)section { self.editingMonster.subtype = (NSString*)value; } else if ([@"monster.alignment" isEqualToString:identifier]) { self.editingMonster.alignment = (NSString*)value; - } else if ([@"monster.customHPText" isEqualToString:identifier]){ + } else if ([@"monster.customHPText" isEqualToString:identifier]) { self.editingMonster.hpText = (NSString*)value; + } else if ([@"monster.customSpeed" isEqualToString:identifier]) { + self.editingMonster.customSpeed = (NSString*)value; } } if ([kMCFieldValueTypeInteger isEqualToString:type]) { @@ -300,13 +369,27 @@ titleForHeaderInSection:(NSInteger)section { self.editingMonster.wisdomScore = [(NSNumber*)value intValue]; } else if ([@"monster.charismaScore" isEqualToString:identifier]) { self.editingMonster.charismaScore = [(NSNumber*)value intValue]; - } else if ([@"monster.hitDice" isEqualToString:identifier]){ + } else if ([@"monster.hitDice" isEqualToString:identifier]) { self.editingMonster.hitDice = [(NSNumber*)value intValue]; + } else if ([@"monster.baseSpeed" isEqualToString:identifier]) { + self.editingMonster.baseSpeed = [(NSNumber*)value intValue]; + } else if ([@"monster.burrowSpeed" isEqualToString:identifier]) { + self.editingMonster.burrowSpeed = [(NSNumber*)value intValue]; + } else if ([@"monster.climbSpeed" isEqualToString:identifier]) { + self.editingMonster.climbSpeed = [(NSNumber*)value intValue]; + } else if ([@"monster.flySpeed" isEqualToString:identifier]) { + self.editingMonster.flySpeed = [(NSNumber*)value intValue]; + } else if ([@"monster.swimSpeed" isEqualToString:identifier]) { + self.editingMonster.swimSpeed = [(NSNumber*)value intValue]; } } if ([kMCFieldValueTypeBoolean isEqualToString:type]) { if ([@"monster.customHP" isEqualToString:identifier]) { self.editingMonster.customHP = [(NSNumber*)value boolValue]; + } else if ([@"monster.canHover" isEqualToString:identifier]) { + self.editingMonster.canHover = [(NSNumber*)value boolValue]; + } else if ([@"monster.hasCustomSpeed" isEqualToString:identifier]) { + self.editingMonster.hasCustomSpeed = [(NSNumber*)value boolValue]; } } } From 533677baff950019655454261eafd356a04424ce Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 26 Sep 2020 15:09:46 -0700 Subject: [PATCH 082/195] Cleans up code that generates HTML labels. Adds Label for speed. Makes the Monster Card refresh the monster from CoreData when the view is shown. --- MonsterCards/Base.lproj/Main.storyboard | 18 +++++++--- MonsterCards/Helpers/HTMLHelper.m | 12 ++++--- MonsterCards/Models/Monster.m | 23 ++++++++++-- MonsterCards/Views/MonsterViewController.h | 1 + MonsterCards/Views/MonsterViewController.m | 41 ++++++++++++++++++---- 5 files changed, 77 insertions(+), 18 deletions(-) diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index 6d306a4..063036d 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -193,7 +193,7 @@ - diff --git a/MonsterCards/Models/Language.h b/MonsterCards/Models/Language.h index 2b5c5f4..fdc6939 100644 --- a/MonsterCards/Models/Language.h +++ b/MonsterCards/Models/Language.h @@ -15,7 +15,8 @@ NS_ASSUME_NONNULL_BEGIN @property NSString* name; @property BOOL speaks; --(id)initWithName: (NSString*)name andSpeaks: (BOOL)canSpeak; +-(id)initWithName:(NSString*)name + andSpeaks:(BOOL)canSpeak; @end diff --git a/MonsterCards/Models/Language.m b/MonsterCards/Models/Language.m index a903b99..fdda235 100644 --- a/MonsterCards/Models/Language.m +++ b/MonsterCards/Models/Language.m @@ -19,7 +19,8 @@ return self; } --(id)initWithName: (NSString*)name andSpeaks: (BOOL)canSpeak { +-(id)initWithName:(NSString*)name + andSpeaks:(BOOL)canSpeak { self = [super init]; self.name = name; diff --git a/MonsterCards/Models/Monster.m b/MonsterCards/Models/Monster.m index 3215174..64d47e7 100644 --- a/MonsterCards/Models/Monster.m +++ b/MonsterCards/Models/Monster.m @@ -504,6 +504,10 @@ NSString* const kMonsterSizeGargantuan = @"gargantuan"; self.swimSpeed = monster.swimSpeed; self.hasCustomSpeed = monster.hasCustomSpeed; self.customSpeed = monster.customSpeed; + self.armorType = monster.armorType; + self.naturalArmorBonus = monster.naturalArmorBonus; + self.hasShield = monster.hasShield; + self.customArmor = monster.customArmor; } @end diff --git a/MonsterCards/Views/EditMonsterViewController.m b/MonsterCards/Views/EditMonsterViewController.m index 2b9c0e5..a99d4ea 100644 --- a/MonsterCards/Views/EditMonsterViewController.m +++ b/MonsterCards/Views/EditMonsterViewController.m @@ -7,9 +7,10 @@ // #import "EditMonsterViewController.h" -#import "MCShortStringFieldTableViewCell.h" -#import "MCIntegerFieldTableViewCell.h" #import "MCBooleanFieldTableViewCell.h" +#import "MCIntegerFieldTableViewCell.h" +#import "MCSelectFieldTableViewCell.h" +#import "MCShortStringFieldTableViewCell.h" #import "AppDelegate.h" @interface EditMonsterViewController () @@ -55,12 +56,48 @@ const int kAbilityScoreSectionRowIndexCharisma = 5; @implementation EditMonsterViewController { NSManagedObjectContext *_context; + NSArray* _armorTypes; } - (void)viewDidLoad { [super viewDidLoad]; AppDelegate *appDelegate = (AppDelegate*)UIApplication.sharedApplication.delegate; _context = appDelegate.persistentContainer.viewContext; + + _armorTypes = [NSArray arrayWithObjects: + [MCChoice choiceWithLabel:NSLocalizedString(@"None", @"") + andValue:kArmorNameNone], + [MCChoice choiceWithLabel:NSLocalizedString(@"Natural Armor", @"") + andValue:kArmorNameNaturalArmor], + [MCChoice choiceWithLabel:NSLocalizedString(@"Mage Armor", @"") + andValue:kArmorNameMageArmor], + [MCChoice choiceWithLabel:NSLocalizedString(@"Padded", @"") + andValue:kArmorNamePadded], + [MCChoice choiceWithLabel:NSLocalizedString(@"Leather", @"") + andValue:kArmorNameLeather], + [MCChoice choiceWithLabel:NSLocalizedString(@"Studded", @"") + andValue:kArmorNameStuddedLeather], + [MCChoice choiceWithLabel:NSLocalizedString(@"Hide", @"") + andValue:kArmorNameHide], + [MCChoice choiceWithLabel:NSLocalizedString(@"Chain Shirt", @"") + andValue:kArmorNameChainShirt], + [MCChoice choiceWithLabel:NSLocalizedString(@"Scale Mail", @"") + andValue:kArmorNameScaleMail], + [MCChoice choiceWithLabel:NSLocalizedString(@"Breastplate", @"") + andValue:kArmorNameBreastplate], + [MCChoice choiceWithLabel:NSLocalizedString(@"Half Plate", @"") + andValue:kArmorNameHalfPlate], + [MCChoice choiceWithLabel:NSLocalizedString(@"Ring Mail", @"") + andValue:kArmorNameRingMail], + [MCChoice choiceWithLabel:NSLocalizedString(@"Chain Mail", @"") + andValue:kArmorNameChainMail], + [MCChoice choiceWithLabel:NSLocalizedString(@"Splint", @"") + andValue:kArmorNameSplintMail], + [MCChoice choiceWithLabel:NSLocalizedString(@"Plate", @"") + andValue:kArmorNamePlateMail], + [MCChoice choiceWithLabel:NSLocalizedString(@"Other", @"") + andValue:kArmorNameOther], + nil]; self.monsterTableView.dataSource = self; self.monsterTableView.delegate = self; @@ -131,6 +168,24 @@ const int kAbilityScoreSectionRowIndexCharisma = 5; return cell; } +- (MCSelectFieldTableViewCell*) makeSelectCellFromTableView:(UITableView*)tableView + withIdentifier:(NSString*)identifier + label:(NSString*)label + initialValue:(NSObject*)initialValue + andChoices:(NSArray*)choices { + MCSelectFieldTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MCSelectField"]; + if (!cell || ![cell isKindOfClass:[MCSelectFieldTableViewCell class]]) { + return nil; + } + cell.delegate = self; + cell.identifier = identifier; + cell.label = label; + cell.selectedValue = initialValue; + cell.choices = choices; + + return cell; +} + #pragma mark - Navigation @@ -160,7 +215,7 @@ const int kAbilityScoreSectionRowIndexCharisma = 5; // * Alignment return 8; case kSectionIndexArmor: - return 0; + return 4; case kSectionIndexSpeed: return 8; case kSectionIndexAbilityScores: @@ -181,7 +236,7 @@ titleForHeaderInSection:(NSInteger)section { case kSectionIndexBasicInfo: return NSLocalizedString(@"Basic Info", @"Section title"); case kSectionIndexArmor: - return NSLocalizedString(@"Armor and HP", @"Section title"); + return NSLocalizedString(@"Armor", @"Section title"); case kSectionIndexSpeed: return NSLocalizedString(@"Speed", @"Section title"); case kSectionIndexAbilityScores: @@ -250,6 +305,31 @@ titleForHeaderInSection:(NSInteger)section { break; case kSectionIndexArmor: switch (indexPath.row) { + case kArmorSectionRowIndexArmorType: + newCell = [self makeSelectCellFromTableView:self.monsterTableView + withIdentifier:@"monster.armorType" + label:NSLocalizedString(@"Type", @"") + initialValue:self.editingMonster.armorType + andChoices:_armorTypes]; + break; + case kArmorSectionRowIndexHasShield: + newCell = [self makeBooleanCellFromTableView:self.monsterTableView + withIdentifier:@"monster.hasShield" + label:NSLocalizedString(@"Shield", @"") + andInitialValue:self.editingMonster.hasShield]; + break; + case kArmorSectionRowIndexCustomArmor: + newCell = [self makeShortStringCellFromTableView:self.monsterTableView + withIdentifier:@"monster.customArmor" + label:NSLocalizedString(@"Custom Armor", @"") + andInitialValue:self.editingMonster.customArmor]; + break; + case kArmorSectionRowIndexNaturalArmorBonus: + newCell = [self makeIntegerCellFromTableView:self.monsterTableView + withIdentifier:@"monster.naturalArmorBonus" + label:NSLocalizedString(@"Natural Armor Bonus", @"") + andInitialValue:self.editingMonster.naturalArmorBonus]; + break; } break; case kSectionIndexSpeed: @@ -373,6 +453,8 @@ titleForHeaderInSection:(NSInteger)section { self.editingMonster.hpText = (NSString*)value; } else if ([@"monster.customSpeed" isEqualToString:identifier]) { self.editingMonster.customSpeed = (NSString*)value; + } else if ([@"monster.customArmor" isEqualToString:identifier]) { + self.editingMonster.customArmor = (NSString*)value; } } if ([kMCFieldValueTypeInteger isEqualToString:type]) { @@ -400,6 +482,8 @@ titleForHeaderInSection:(NSInteger)section { self.editingMonster.flySpeed = [(NSNumber*)value intValue]; } else if ([@"monster.swimSpeed" isEqualToString:identifier]) { self.editingMonster.swimSpeed = [(NSNumber*)value intValue]; + } else if ([@"monster.naturalArmorBonus" isEqualToString:identifier]) { + self.editingMonster.naturalArmorBonus = [(NSNumber*)value intValue]; } } if ([kMCFieldValueTypeBoolean isEqualToString:type]) { @@ -409,6 +493,13 @@ titleForHeaderInSection:(NSInteger)section { self.editingMonster.canHover = [(NSNumber*)value boolValue]; } else if ([@"monster.hasCustomSpeed" isEqualToString:identifier]) { self.editingMonster.hasCustomSpeed = [(NSNumber*)value boolValue]; + } else if ([@"monster.hasShield" isEqualToString:identifier]) { + self.editingMonster.hasShield = [(NSNumber*)value boolValue]; + } + } + if ([kMCFieldValueTypeChoice isEqualToString:type]) { + if ([@"monster.armorType" isEqualToString:identifier]) { + self.editingMonster.armorType = (NSString*)value; } } } diff --git a/MonsterCards/Views/FormFields/MCChoice.h b/MonsterCards/Views/FormFields/MCChoice.h new file mode 100644 index 0000000..14f3045 --- /dev/null +++ b/MonsterCards/Views/FormFields/MCChoice.h @@ -0,0 +1,28 @@ +// +// MCChoice.h +// MonsterCards +// +// Created by Tom Hicks on 9/26/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MCChoice : NSObject + +@property NSString* label; +@property NSObject* value; + ++(id)choiceWithLabel:(NSString*)label + andValue:(NSObject*)value; + +-(id)initWithLabel:(NSString*)label + andValue:(NSObject*)value; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/FormFields/MCChoice.m b/MonsterCards/Views/FormFields/MCChoice.m new file mode 100644 index 0000000..f8aea27 --- /dev/null +++ b/MonsterCards/Views/FormFields/MCChoice.m @@ -0,0 +1,29 @@ +// +// MCChoice.m +// MonsterCards +// +// Created by Tom Hicks on 9/26/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "MCChoice.h" + +@implementation MCChoice + ++(id)choiceWithLabel:(NSString*)label + andValue:(NSObject*)value { + return [[MCChoice alloc] initWithLabel:label + andValue:value]; +} + +-(id)initWithLabel:(NSString*)label + andValue:(NSObject*)value { + self = [super init]; + + self.label = label; + self.value = value; + + return self; +} + +@end diff --git a/MonsterCards/Views/FormFields/MCFormFieldConstants.h b/MonsterCards/Views/FormFields/MCFormFieldConstants.h index c8e9a9e..a2afed3 100644 --- a/MonsterCards/Views/FormFields/MCFormFieldConstants.h +++ b/MonsterCards/Views/FormFields/MCFormFieldConstants.h @@ -12,5 +12,6 @@ extern NSString* const kMCFieldValueTypeInteger; extern NSString* const kMCFieldValueTypeString; extern NSString* const kMCFieldValueTypeBoolean; +extern NSString* const kMCFieldValueTypeChoice; #endif /* MCFormFieldConstants_h */ diff --git a/MonsterCards/Views/FormFields/MCFormFieldConstants.m b/MonsterCards/Views/FormFields/MCFormFieldConstants.m index f2baa11..b7266cf 100644 --- a/MonsterCards/Views/FormFields/MCFormFieldConstants.m +++ b/MonsterCards/Views/FormFields/MCFormFieldConstants.m @@ -12,3 +12,4 @@ NSString* const kMCFieldValueTypeInteger = @"Integer"; NSString* const kMCFieldValueTypeString = @"String"; NSString* const kMCFieldValueTypeBoolean = @"Boolean"; +NSString* const kMCFieldValueTypeChoice = @"Choice"; diff --git a/MonsterCards/Views/FormFields/MCSelectFieldTableViewCell.h b/MonsterCards/Views/FormFields/MCSelectFieldTableViewCell.h new file mode 100644 index 0000000..8d89ef6 --- /dev/null +++ b/MonsterCards/Views/FormFields/MCSelectFieldTableViewCell.h @@ -0,0 +1,28 @@ +// +// MCSelectFieldTableViewCell.h +// MonsterCards +// +// Created by Tom Hicks on 9/26/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import +#import "MCFormFieldDelegate.h" +#import "MCChoice.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MCSelectFieldTableViewCell : UITableViewCell + +@property NSString* identifier; +@property NSString* label; +@property NSObject* selectedValue; +@property NSArray* choices; + +@property (weak, nonatomic) id delegate; +@property (weak, nonatomic) IBOutlet UITextField *textField; +@property (weak, nonatomic) IBOutlet UILabel *labelView; + +@end + +NS_ASSUME_NONNULL_END diff --git a/MonsterCards/Views/FormFields/MCSelectFieldTableViewCell.m b/MonsterCards/Views/FormFields/MCSelectFieldTableViewCell.m new file mode 100644 index 0000000..fe52804 --- /dev/null +++ b/MonsterCards/Views/FormFields/MCSelectFieldTableViewCell.m @@ -0,0 +1,157 @@ +// +// MCSelectFieldTableViewCell.m +// MonsterCards +// +// Created by Tom Hicks on 9/26/20. +// Copyright © 2020 Tom Hicks. All rights reserved. +// + +#import "MCSelectFieldTableViewCell.h" + +@implementation MCSelectFieldTableViewCell { + MCChoice* _selectedChoice; +} + +@synthesize choices = _choices; +-(void)setChoices:(NSArray*)choices { + // TODO: only do this if choices is different + // TODO: update selectedValue and selectedIndex + _choices = choices; + + if (![_choices isEqualToArray:choices]) { + self.selectedValue = _selectedValue; + } else if (choices) { + self.selectedValue = [choices firstObject].value; + } +} +-(NSArray*)choices { + return _choices; +} + +@synthesize identifier = _identifier; +-(void)setIdentifier:(NSString*)identifier { + if (![_identifier isEqualToString:identifier]) { + _identifier = identifier; + } +} +-(NSString*)identifier { + return _identifier; +} + +@synthesize label = _label; +-(void)setLabel:(NSString*)label { + if (![_label isEqualToString:label]) { + _label = label; + } + if (_labelView && ![_labelView.text isEqualToString:label]) { + _labelView.text = label; + } +} +-(NSString*)label { + return _label; +} + +-(MCChoice*)findChoiceWithValue:(NSObject*)value + inArray:(NSArray*)array { + NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(id element, NSDictionary *bindings) { + if (![element isKindOfClass:[MCChoice class]]) { + return NO; + } + MCChoice *choice = (MCChoice*)element; + return [choice.value isEqual:value]; + }]; + NSArray *matchingChoices = [_choices filteredArrayUsingPredicate:predicate]; + MCChoice *foundChoice = matchingChoices.count > 0 ? matchingChoices.firstObject : nil; + return foundChoice; +} + +@synthesize selectedValue = _selectedValue; +-(void)setSelectedValue:(NSObject*)value { + if (!_choices) { + // choices hasn't been initialized yet so just set our selected value until choices is set + _selectedValue = value; + } + MCChoice *foundChoice = [self findChoiceWithValue:value + inArray:_choices]; + if (![_selectedChoice isEqual:foundChoice] || ![_selectedValue isEqual:foundChoice.value]) { + _selectedChoice = foundChoice; + _selectedValue = foundChoice.value; + if (_delegate) { + [_delegate editableValueDidChange:_selectedValue + forIdentifier:_identifier + andType:kMCFieldValueTypeChoice]; + } + } + self.textField.text = _selectedChoice != nil + ? _selectedChoice.label != nil + ? _selectedChoice.label + : @"" + : @""; +} +-(NSObject*)selectedValue { + return _selectedValue; +} + +- (void)awakeFromNib { + [super awakeFromNib]; + UIPickerView *childPicker = [[UIPickerView alloc] init]; + childPicker.delegate = self; + childPicker.dataSource = self; + self.textField.inputView = childPicker; + + UIToolbar *toolbar = [[UIToolbar alloc] init]; + [toolbar sizeToFit]; + + UIBarButtonItem *button = + [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Done", @"Button label") + style:UIBarButtonItemStylePlain + target:self + action:@selector(choiceSelected)]; + [toolbar setItems:@[button] + animated:true]; + [toolbar setUserInteractionEnabled:YES]; + self.textField.inputAccessoryView = toolbar; + self.textField.hidden = NO; + self.textField.text = _selectedChoice.label; + self.textField.delegate = self; +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +- (void)choiceSelected { + [self endEditing:true]; +} + +#pragma mark - UIPickerViewDataSource + +- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { + return 1; +} + +- (NSInteger)pickerView:(UIPickerView *)pickerView +numberOfRowsInComponent:(NSInteger)component { + return [_choices count]; +} + +#pragma mark - UIPickerViewDelegate + +- (NSString *)pickerView:(UIPickerView *)pickerView + titleForRow:(NSInteger)row + forComponent:(NSInteger)component { + return [_choices objectAtIndex:row].label; +} + +- (void)pickerView:(UIPickerView *)pickerView + didSelectRow:(NSInteger)row + inComponent:(NSInteger)component { + + _selectedChoice = [_choices objectAtIndex:row]; + self.textField.text = _selectedChoice.label; + self.selectedValue = _selectedChoice.value; +} + +@end From 308cb755fe9fc4d9acc0d1cd8eb0cb55be17c16a Mon Sep 17 00:00:00 2001 From: Tom Hicks Date: Sat, 26 Sep 2020 23:06:03 -0700 Subject: [PATCH 086/195] Adds ability scores to monster cards. --- MonsterCards/Base.lproj/Main.storyboard | 174 ++++++++++++++++-- MonsterCards/Models/Monster.m | 13 +- .../MonsterCards.xcdatamodel/contents | 12 +- MonsterCards/Views/MonsterViewController.h | 6 + MonsterCards/Views/MonsterViewController.m | 18 ++ 5 files changed, 191 insertions(+), 32 deletions(-) diff --git a/MonsterCards/Base.lproj/Main.storyboard b/MonsterCards/Base.lproj/Main.storyboard index e23a09a..84fe5db 100644 --- a/MonsterCards/Base.lproj/Main.storyboard +++ b/MonsterCards/Base.lproj/Main.storyboard @@ -202,17 +202,17 @@ - + -