Skip to content

Commit aea2d32

Browse files
sigitotirodkar
authored andcommitted
Tag -selectElementWithMatcher: with NS_WARN_UNUSED_RESULT
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.
1 parent c3732d1 commit aea2d32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EarlGrey/Core/EarlGreyImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ typedef NS_ENUM(NSInteger, GREYKeyboardDismissalErrorCode) {
106106
*
107107
* @return A GREYElementInteraction instance, initialized with an appropriate matcher.
108108
*/
109-
- (GREYElementInteraction *)selectElementWithMatcher:(id<GREYMatcher>)elementMatcher;
109+
- (GREYElementInteraction *)selectElementWithMatcher:(id<GREYMatcher>)elementMatcher NS_WARN_UNUSED_RESULT;
110110

111111
/**
112112
* Sets the global failure handler for all framework related failures.

0 commit comments

Comments
 (0)