Commit dd41c581 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Fix instance method conflicts in Showcase.

Showcase's protocol_alerter.mm is conflicting with OCMock.  Prefixing with
crsc_ instead.

Bug: 988423
Change-Id: I542b7df1374a285b3a8ecf293b682fa922d10fde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1724654
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Auto-Submit: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681816}
parent a7ab2932
...@@ -155,7 +155,8 @@ char kAssociatedProtocolNameKey; ...@@ -155,7 +155,8 @@ char kAssociatedProtocolNameKey;
[description appendString:@" "]; [description appendString:@" "];
[description appendString:keyword]; [description appendString:keyword];
[description appendString:@":"]; [description appendString:@":"];
[description appendString:[self argumentDescriptionAtIndex:argumentIndex]]; [description
appendString:[self crsc_argumentDescriptionAtIndex:argumentIndex]];
argumentIndex++; argumentIndex++;
} }
...@@ -164,16 +165,16 @@ char kAssociatedProtocolNameKey; ...@@ -164,16 +165,16 @@ char kAssociatedProtocolNameKey;
// Return a string describing the argument value at |index|. // Return a string describing the argument value at |index|.
// (|index| is in NSInvocation's argument array). // (|index| is in NSInvocation's argument array).
- (NSString*)argumentDescriptionAtIndex:(NSInteger)index { - (NSString*)crsc_argumentDescriptionAtIndex:(NSInteger)index {
const char* type = [self.methodSignature getArgumentTypeAtIndex:index]; const char* type = [self.methodSignature getArgumentTypeAtIndex:index];
switch (*type) { switch (*type) {
case '@': case '@':
return [self objectDescriptionAtIndex:index]; return [self crsc_objectDescriptionAtIndex:index];
case 'q': case 'q':
return [self longLongDescriptionAtIndex:index]; return [self crsc_longLongDescriptionAtIndex:index];
case 'Q': case 'Q':
return [self unsignedLongLongDescriptionAtIndex:index]; return [self crsc_unsignedLongLongDescriptionAtIndex:index];
// Add cases as needed here. // Add cases as needed here.
default: default:
return [NSString stringWithFormat:@"<Unknown Type:%s>", type]; return [NSString stringWithFormat:@"<Unknown Type:%s>", type];
...@@ -182,7 +183,7 @@ char kAssociatedProtocolNameKey; ...@@ -182,7 +183,7 @@ char kAssociatedProtocolNameKey;
// Return a string describing an argument at |index| that's known to be an // Return a string describing an argument at |index| that's known to be an
// objective-C object. // objective-C object.
- (NSString*)objectDescriptionAtIndex:(NSInteger)index { - (NSString*)crsc_objectDescriptionAtIndex:(NSInteger)index {
__unsafe_unretained id object; __unsafe_unretained id object;
[self getArgument:&object atIndex:index]; [self getArgument:&object atIndex:index];
...@@ -216,7 +217,7 @@ char kAssociatedProtocolNameKey; ...@@ -216,7 +217,7 @@ char kAssociatedProtocolNameKey;
// Returns a string describing an argument at |index| that is known to be a long // Returns a string describing an argument at |index| that is known to be a long
// long. // long.
- (NSString*)longLongDescriptionAtIndex:(NSInteger)index { - (NSString*)crsc_longLongDescriptionAtIndex:(NSInteger)index {
long long value; long long value;
[self getArgument:&value atIndex:index]; [self getArgument:&value atIndex:index];
...@@ -225,7 +226,7 @@ char kAssociatedProtocolNameKey; ...@@ -225,7 +226,7 @@ char kAssociatedProtocolNameKey;
// Returns a string describing an argument at |index| that is known to be an // Returns a string describing an argument at |index| that is known to be an
// unsigned long long. // unsigned long long.
- (NSString*)unsignedLongLongDescriptionAtIndex:(NSInteger)index { - (NSString*)crsc_unsignedLongLongDescriptionAtIndex:(NSInteger)index {
unsigned long long value; unsigned long long value;
[self getArgument:&value atIndex:index]; [self getArgument:&value atIndex:index];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment