Skip to content

Commit

Permalink
Sum and average (#11108)
Browse files Browse the repository at this point in the history
This is implementation but not public release of sum and average. The sum/avg API is not made public. There are no API changes in this PR.
  • Loading branch information
MarkDuckworth authored May 12, 2023
1 parent 34932ce commit 52ebbbf
Show file tree
Hide file tree
Showing 45 changed files with 4,317 additions and 171 deletions.
56 changes: 36 additions & 20 deletions Firestore/Example/Firestore.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Firestore/Example/Tests/API/FSTAPIHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,12 @@ FIRQuerySnapshot *FSTTestQuerySnapshot(
} // extern "C"
#endif

@interface FSTNSExceptionUtil : NSObject

+ (BOOL)testForException:(void (^)(void))methodToTry
reasonContains:(nonnull NSString *)message
NS_SWIFT_NAME(testForException(_:reasonContains:));

@end

NS_ASSUME_NONNULL_END
14 changes: 14 additions & 0 deletions Firestore/Example/Tests/API/FSTAPIHelpers.mm
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,18 @@
metadata:std::move(metadata)];
}

@implementation FSTNSExceptionUtil

+ (BOOL)testForException:(nonnull void (^)())methodToTry
reasonContains:(nonnull NSString *)substring {
@try {
methodToTry();
return NO;
} @catch (NSException *exception) {
return [[exception reason] containsString:substring];
}
}

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit 52ebbbf

Please sign in to comment.