Replace casted uses of [OCMArg anyPointer] with [OCMArg anyObjectRef].

Bug: None
Change-Id: Ife427f57b1dea889e6bd7a0b8f2915d93d4a1571
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206643
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33212}
This commit is contained in:
Mirko Bonadei
2021-02-10 09:23:03 +01:00
committed by Commit Bot
parent 028d5be9c7
commit ad8a00d25c

View File

@ -253,9 +253,10 @@ OCMLocation *OCMMakeLocation(id testCase, const char *fileCString, int line){
}; };
id mockAVAudioSession = OCMPartialMock([AVAudioSession sharedInstance]); id mockAVAudioSession = OCMPartialMock([AVAudioSession sharedInstance]);
OCMStub([[mockAVAudioSession ignoringNonObjectArgs] OCMStub([[mockAVAudioSession ignoringNonObjectArgs] setActive:YES
setActive:YES withOptions:0 error:((NSError __autoreleasing **)[OCMArg anyPointer])]). withOptions:0
andDo(setActiveBlock); error:([OCMArg anyObjectRef])])
.andDo(setActiveBlock);
id mockAudioSession = OCMPartialMock([RTC_OBJC_TYPE(RTCAudioSession) sharedInstance]); id mockAudioSession = OCMPartialMock([RTC_OBJC_TYPE(RTCAudioSession) sharedInstance]);
OCMStub([mockAudioSession session]).andReturn(mockAVAudioSession); OCMStub([mockAudioSession session]).andReturn(mockAVAudioSession);
@ -266,9 +267,10 @@ OCMLocation *OCMMakeLocation(id testCase, const char *fileCString, int line){
EXPECT_TRUE([audioSession checkLock:nil]); EXPECT_TRUE([audioSession checkLock:nil]);
// configureWebRTCSession is forced to fail in the above mock interface, // configureWebRTCSession is forced to fail in the above mock interface,
// so activationCount should remain 0 // so activationCount should remain 0
OCMExpect([[mockAVAudioSession ignoringNonObjectArgs] OCMExpect([[mockAVAudioSession ignoringNonObjectArgs] setActive:YES
setActive:YES withOptions:0 error:((NSError __autoreleasing **)[OCMArg anyPointer])]). withOptions:0
andDo(setActiveBlock); error:([OCMArg anyObjectRef])])
.andDo(setActiveBlock);
OCMExpect([mockAudioSession session]).andReturn(mockAVAudioSession); OCMExpect([mockAudioSession session]).andReturn(mockAVAudioSession);
EXPECT_FALSE([audioSession configureWebRTCSession:&error]); EXPECT_FALSE([audioSession configureWebRTCSession:&error]);
EXPECT_EQ(0, audioSession.activationCount); EXPECT_EQ(0, audioSession.activationCount);