drofwarcs
04/09/2019, 3:30 PM_Nullable id verify(id mock) {
return MKTVerifyWithLocation(mock, self, __FILE__, __LINE__);
}
cinterops throws error: use of undeclared identifier 'self'
. Is cinterops not able to handle the self
keyword yet or is there another way I should be handling this?olonho
04/09/2019, 4:41 PMdrofwarcs
04/09/2019, 5:08 PMdrofwarcs
04/09/2019, 5:09 PMlanguage = Objective-C
headers = OCMockitoIOS.h
compilerOpts = -framework OCMockitoIOS
linkerOpts = -framework OCMockitoIOS
---
#import "MKTOngoingStubbing.h"
#import "NSInvocation+OCMockito.h"
#import "MKTMockitoCore.h"
MKTOngoingStubbing* given2(id testCase, id methodCall) {
return [[MKTMockitoCore sharedCore] stubAtLocation:MKTTestLocationMake(testCase, __FILE__, __LINE__)];
}
_Nullable id verify2(id mock) {
return MKTVerifyWithLocation(mock, self, __FILE__, __LINE__);
}
olonho
04/09/2019, 7:25 PMdrofwarcs
04/09/2019, 8:02 PM#define
to kotlin
https://github.com/jonreid/OCMockito/blob/master/Source/OCMockito/Core/OCMockito.h#L216drofwarcs
04/09/2019, 8:03 PMself
.olonho
04/09/2019, 9:39 PMdrofwarcs
04/09/2019, 11:18 PMsvyatoslav.scherbina
04/10/2019, 8:39 AMself
available not in an Objective-C method?drofwarcs
04/10/2019, 1:19 PMself
is not available at the time cinterops does its conversion.svyatoslav.scherbina
04/10/2019, 1:20 PMself
is not available in simple top level functions in Objective-C. It is available only in Objective-C methods.drofwarcs
04/10/2019, 2:59 PM