Skip to content

Commit

Permalink
Tag -selectElementWithMatcher: with NS_WARN_UNUSED_RESULT
Browse files Browse the repository at this point in the history
We often run into a human error, when an element is selected by not asserted on or acted upon. With the unused result attribute, the person writing a test would get a nag that no action was performed on the element.
  • Loading branch information
sigito authored and tirodkar committed Sep 9, 2023
1 parent c3732d1 commit aea2d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EarlGrey/Core/EarlGreyImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ typedef NS_ENUM(NSInteger, GREYKeyboardDismissalErrorCode) {
*
* @return A GREYElementInteraction instance, initialized with an appropriate matcher.
*/
- (GREYElementInteraction *)selectElementWithMatcher:(id<GREYMatcher>)elementMatcher;
- (GREYElementInteraction *)selectElementWithMatcher:(id<GREYMatcher>)elementMatcher NS_WARN_UNUSED_RESULT;

/**
* Sets the global failure handler for all framework related failures.
Expand Down

0 comments on commit aea2d32

Please sign in to comment.