@@ -108,7 +108,7 @@ @interface OCMockObjectMacroTests : XCTestCase
108108
109109@implementation OCMockObjectMacroTests
110110
111- #ifdef __IPHONE_14_0 // this is actually a test for Xcode 12; see issue #472
111+ #if defined( __IPHONE_14_0) && !defined(OCM_DISABLE_XCTEST_FEATURES) // this is actually a test for Xcode 12; see issue #472
112112
113113- (void )recordIssue : (XCTIssue *)issue
114114{
@@ -306,6 +306,8 @@ - (NSString *)stringValueForTesting
306306 return @" TEST_STRING_FROM_TESTCASE" ;
307307}
308308
309+ #ifndef OCM_DISABLE_XCTEST_FEATURES
310+
309311- (void )testFulfillsExpectation
310312{
311313 id mock = OCMStrictClassMock ([NSString class ]);
@@ -316,6 +318,8 @@ - (void)testFulfillsExpectation
316318 [self waitForExpectationsWithTimeout: 0 handler: nil ];
317319}
318320
321+ #endif
322+
319323- (void )testCanChainPropertyBasedActions
320324{
321325 id mock = OCMPartialMock ([[TestClassForMacroTesting alloc ] init ]);
@@ -576,7 +580,9 @@ - (void)testReturnsCorrectObjectFromInitMethodCalledOnRecorderInsideMacro
576580 OCMStub ([[mock andThrow: nil ] initWithString: OCMOCK_ANY]);
577581 OCMStub ([[mock andPost: nil ] initWithString: OCMOCK_ANY]);
578582 OCMStub ([[mock andCall: nil onObject: nil ] initWithString: OCMOCK_ANY]);
583+ #ifndef OCM_DISABLE_XCTEST_FEATURES
579584 OCMStub ([[mock andFulfill: nil ] initWithString: OCMOCK_ANY]);
585+ #endif
580586 OCMStub ([[mock andDo: nil ] initWithString: OCMOCK_ANY]);
581587 OCMStub ([[mock andForwardToRealObject ] initWithString: OCMOCK_ANY]);
582588 OCMExpect ([[mock never ] initWithString: OCMOCK_ANY]);
0 commit comments