Partial fixes to tests to run with Xcode 12.

This commit is contained in:
2020-09-18 00:27:31 -07:00
parent f973a618c6
commit 71cd2572a2
2 changed files with 20 additions and 19 deletions

View File

@@ -9,6 +9,7 @@
#import <XCTest/XCTest.h>
@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);

View File

@@ -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 = "<group>"; };
0A1EBA997CF7C9388D26D1ACC66AE8B4 /* HCLongLongReturnGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCLongLongReturnGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.m; sourceTree = "<group>"; };
0A4260D5C243F2A8B09A94F2508498E0 /* HCIsIn.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCIsIn.h; path = Source/Library/Collection/HCIsIn.h; sourceTree = "<group>"; };
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 = "<group>"; };
0B63E72018F8DCD27388CB9C1F84CDFE /* MKTCharReturnSetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTCharReturnSetter.h; path = Source/OCMockito/Helpers/ReturnValueSetters/MKTCharReturnSetter.h; sourceTree = "<group>"; };
0BF590D47280FDF772591A9EA877F3D6 /* OCMockito-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "OCMockito-umbrella.h"; sourceTree = "<group>"; };
@@ -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 = "<group>"; };
0FA62431AB0240FF502CA857D80416D6 /* MKTClassArgumentGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTClassArgumentGetter.m; path = Source/OCMockito/Helpers/ArgumentGetters/MKTClassArgumentGetter.m; sourceTree = "<group>"; };
1041B75357FE4417A40F02B99718EA2A /* MKTArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTArgumentGetter.h; sourceTree = "<group>"; };
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 = "<group>"; };
115F66A544E70A0704D1EFE773B6F6A4 /* HCCharReturnGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCCharReturnGetter.h; path = Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.h; sourceTree = "<group>"; };
12EAED0BC67FA189C27C8F4E6173CC1C /* HCHasDescription.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCHasDescription.m; path = Source/Library/Object/HCHasDescription.m; sourceTree = "<group>"; };
@@ -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 = "<group>"; };
462CC631461FF0F792689156760B4CFA /* HCReturnValueGetter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCReturnValueGetter.m; path = Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.m; sourceTree = "<group>"; };
466DCB25F4DFF1E46ECE1A8A1FACAFB8 /* HCIs.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIs.m; path = Source/Library/Decorator/HCIs.m; sourceTree = "<group>"; };
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 = "<group>"; };
484DD12B558ADD56C07E97EE1EF8F170 /* OCMockito.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = OCMockito.release.xcconfig; sourceTree = "<group>"; };
4920D12A419167DF2D8531ABD0408C61 /* MKTAtLeastNumberOfInvocationsChecker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MKTAtLeastNumberOfInvocationsChecker.m; path = Source/OCMockito/Verifying/MKTAtLeastNumberOfInvocationsChecker.m; sourceTree = "<group>"; };
@@ -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 = "<group>"; };
6509B0466A9E8566693B27F3D720F896 /* HCDiagnosingMatcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCDiagnosingMatcher.h; path = Source/Core/HCDiagnosingMatcher.h; sourceTree = "<group>"; };
6765FE3E095A10CCA04B316EB3FD0E81 /* HCStringContains.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HCStringContains.h; path = Source/Library/Text/HCStringContains.h; sourceTree = "<group>"; };
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 = "<group>"; };
691AF08E70240ABA9D35D3D1E4E8FA24 /* MKTUnsignedCharArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTUnsignedCharArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTUnsignedCharArgumentGetter.h; sourceTree = "<group>"; };
6938763A1A07A12C15F7C1353D471391 /* MKTBoolArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTBoolArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTBoolArgumentGetter.h; sourceTree = "<group>"; };
@@ -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 = "<group>"; };
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 = "<group>"; };
7C437764409E8FE79D38459CB315D6E4 /* HCIsAnything.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCIsAnything.m; path = Source/Library/Logical/HCIsAnything.m; sourceTree = "<group>"; };
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 = "<group>"; };
7FF893E6E27D0CBC633522E472808186 /* HCTestFailureReporterChain.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCTestFailureReporterChain.m; path = Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.m; sourceTree = "<group>"; };
801866461A95BB6BB06D7ACA13B0F7BF /* MKTLongArgumentGetter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTLongArgumentGetter.h; path = Source/OCMockito/Helpers/ArgumentGetters/MKTLongArgumentGetter.h; sourceTree = "<group>"; };
@@ -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 = "<group>"; };
9C65C64152C04FD20CEF60176C490BB4 /* HCTestFailure.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HCTestFailure.m; path = Source/Core/Helpers/TestFailureReporters/HCTestFailure.m; sourceTree = "<group>"; };
9C719025AA0018BF030D009382FF9C96 /* Pods-MonsterCardsTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MonsterCardsTests-umbrella.h"; sourceTree = "<group>"; };
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 = "<group>"; };
9E185F0EACC15858F21C65B72D636B78 /* MKTAtMostTimes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTAtMostTimes.h; path = Source/OCMockito/Verifying/MKTAtMostTimes.h; sourceTree = "<group>"; };
9EA4549FC719D29A4F6D8D37BECD26BF /* MKTThrowsException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MKTThrowsException.h; path = Source/OCMockito/Stubbing/MKTThrowsException.h; sourceTree = "<group>"; };
@@ -991,7 +991,6 @@
9850D8A995F2F35F0C35E8CA6FEF840F /* OCHamcrest.h */,
E084CB31F4A8BF24F3AD78410A64310F /* Support Files */,
);
name = OCHamcrest;
path = OCHamcrest;
sourceTree = "<group>";
};
@@ -1169,7 +1168,6 @@
C60E4F725E1CB2116B6E7C88D81FD288 /* OCMockito.m */,
4EEADDD04C7BD4B91787C198CC19D22C /* Support Files */,
);
name = OCMockito;
path = OCMockito;
sourceTree = "<group>";
};
@@ -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;