Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic descriptions for invocation actions. #436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Source/OCMock/OCMBlockCaller.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ - (void)handleInvocation:(NSInvocation *)anInvocation
}
}

- (NSString *)description
{
return [NSString stringWithFormat:@"[%@ - %p]: Calls `%@`", [self class], self, block];
}

@end
5 changes: 5 additions & 0 deletions Source/OCMock/OCMExceptionReturnValueProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ - (void)handleInvocation:(NSInvocation *)anInvocation
[[NSException exceptionWithName:OCMStubbedException reason:@"Exception stubbed in test." userInfo:@{ @"exception": returnValue }] raise];
}

- (NSString *)description
{
return [NSString stringWithFormat:@"[%@ - %p]: Throws `%@`", [self class], self, returnValue];
}

@end
5 changes: 5 additions & 0 deletions Source/OCMock/OCMIndirectReturnValueProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,9 @@ - (void)handleInvocation:(NSInvocation *)anInvocation
[anInvocation setSelector:originalSelector];
}

- (NSString *)description
{
return [NSString stringWithFormat:@"[%@ - %p]: Calls `%@` on `%@`", [self class], self, NSStringFromSelector(selector), provider];
}

@end
5 changes: 5 additions & 0 deletions Source/OCMock/OCMNonRetainingObjectReturnValueProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,10 @@ - (void)handleInvocation:(NSInvocation *)anInvocation
}
[anInvocation setReturnValue:&returnValue];
}

- (NSString *)description
{
return [NSString stringWithFormat:@"[%@ - %p]: Returns `%@`", [self class], self, returnValue];
}
@end

4 changes: 4 additions & 0 deletions Source/OCMock/OCMNotificationPoster.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,9 @@ - (void)handleInvocation:(NSInvocation *)anInvocation
[[NSNotificationCenter defaultCenter] postNotification:notification];
}

- (NSString *)description
{
return [NSString stringWithFormat:@"[%@ - %p]: Posts `%@`", [self class], self, notification];
}

@end
4 changes: 4 additions & 0 deletions Source/OCMock/OCMRealObjectForwarder.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,9 @@ - (void)handleInvocation:(NSInvocation *)anInvocation
}
}

- (NSString *)description
{
return [NSString stringWithFormat:@"[%@ - %p]", [self class], self];
}

@end