mirror of
https://github.com/wu736139669/Monkey-Test.git
synced 2026-08-05 05:55:46 +00:00
29 lines
981 B
Objective-C
Executable File
29 lines
981 B
Objective-C
Executable File
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import "FBPredicate.h"
|
|
|
|
@implementation FBPredicate
|
|
|
|
+ (NSPredicate *)predicateWithFormat:(NSString *)predicateFormat, ...
|
|
{
|
|
va_list args;
|
|
va_start(args, predicateFormat);
|
|
NSPredicate *predicate = [NSPredicate predicateWithFormat:predicateFormat arguments:args];
|
|
NSPredicate *hackPredicate = [NSPredicate predicateWithFormat:self.forceResolvePredicateString];
|
|
return [NSCompoundPredicate andPredicateWithSubpredicates:@[predicate, hackPredicate]];
|
|
}
|
|
|
|
+ (NSString *)forceResolvePredicateString
|
|
{
|
|
return @"1 == 1 or identifier == 0 or frame == 0 or value == 0 or title == 0 or label == 0 or elementType == 0 or enabled == 0 or placeholderValue == 0";
|
|
}
|
|
|
|
@end
|