diff options
author | zxu <zxu@google.com> | 2018-03-14 08:57:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-14 08:57:31 -0400 |
commit | 9e815620e9f7f43b42e03db4e5118d7ad03ddee7 (patch) | |
tree | 86f362bad99281325fca7ee3ae116b6a0f36d511 /Firestore/Example/Tests/Core/FSTQueryListenerTests.mm | |
parent | d4d73ea53ecdf1e8ade3d00921419645dd5d66f7 (diff) |
grand PR to port the remaining paths (FieldPath and ResourcePath). (#865)
* naively remove FSTPath import and source/test files.
* port FieldPath, part I
* port FieldPath, part II
* port ResourcePath, part I
* port ResourcePath, part II
* the grand commit to fix build errors
* use testutil:: helper instead of those from FSTHelpers
* fix test and lint
* use c_str in errmsg directly
* fix
* fix
* make code clean
* fix integration test I missed
* fix to avoid naming collision in preprocessor
* address changes
* address changes
* address changes
* fix: fieldMask are actually shared with different context.
* address changes
* address changes
Diffstat (limited to 'Firestore/Example/Tests/Core/FSTQueryListenerTests.mm')
-rw-r--r-- | Firestore/Example/Tests/Core/FSTQueryListenerTests.mm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Firestore/Example/Tests/Core/FSTQueryListenerTests.mm b/Firestore/Example/Tests/Core/FSTQueryListenerTests.mm index 1b26360..55c4219 100644 --- a/Firestore/Example/Tests/Core/FSTQueryListenerTests.mm +++ b/Firestore/Example/Tests/Core/FSTQueryListenerTests.mm @@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN NSMutableArray<FSTViewSnapshot *> *accum = [NSMutableArray array]; NSMutableArray<FSTViewSnapshot *> *otherAccum = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms"); + FSTQuery *query = FSTTestQuery("rooms"); FSTDocument *doc1 = FSTTestDoc(@"rooms/Eros", 1, @{@"name" : @"Eros"}, NO); FSTDocument *doc2 = FSTTestDoc(@"rooms/Hades", 2, @{@"name" : @"Hades"}, NO); FSTDocument *doc2prime = @@ -88,7 +88,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)testRaisesErrorEvent { NSMutableArray<NSError *> *accum = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms/Eros"); + FSTQuery *query = FSTTestQuery("rooms/Eros"); FSTQueryListener *listener = [self listenToQuery:query handler:^(FSTViewSnapshot *snapshot, NSError *error) { @@ -104,7 +104,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)testRaisesEventForEmptyCollectionAfterSync { NSMutableArray<FSTViewSnapshot *> *accum = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms"); + FSTQuery *query = FSTTestQuery("rooms"); FSTQueryListener *listener = [self listenToQuery:query accumulatingSnapshots:accum]; @@ -126,7 +126,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)testMutingAsyncListenerPreventsAllSubsequentEvents { NSMutableArray<FSTViewSnapshot *> *accum = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms/Eros"); + FSTQuery *query = FSTTestQuery("rooms/Eros"); FSTDocument *doc1 = FSTTestDoc(@"rooms/Eros", 3, @{@"name" : @"Eros"}, NO); FSTDocument *doc2 = FSTTestDoc(@"rooms/Eros", 4, @{@"name" : @"Eros2"}, NO); @@ -166,7 +166,7 @@ NS_ASSUME_NONNULL_BEGIN NSMutableArray<FSTViewSnapshot *> *filteredAccum = [NSMutableArray array]; NSMutableArray<FSTViewSnapshot *> *fullAccum = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms"); + FSTQuery *query = FSTTestQuery("rooms"); FSTDocument *doc1 = FSTTestDoc(@"rooms/Eros", 1, @{@"name" : @"Eros"}, NO); FSTDocument *doc2 = FSTTestDoc(@"rooms/Hades", 2, @{@"name" : @"Hades"}, NO); @@ -204,7 +204,7 @@ NS_ASSUME_NONNULL_BEGIN NSMutableArray<FSTViewSnapshot *> *filteredAccum = [NSMutableArray array]; NSMutableArray<FSTViewSnapshot *> *fullAccum = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms"); + FSTQuery *query = FSTTestQuery("rooms"); FSTDocument *doc1 = FSTTestDoc(@"rooms/Eros", 1, @{@"name" : @"Eros"}, YES); FSTDocument *doc2 = FSTTestDoc(@"rooms/Hades", 2, @{@"name" : @"Hades"}, NO); FSTDocument *doc1Prime = FSTTestDoc(@"rooms/Eros", 1, @{@"name" : @"Eros"}, NO); @@ -253,7 +253,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)testRaisesQueryMetadataEventsOnlyWhenHasPendingWritesOnTheQueryChanges { NSMutableArray<FSTViewSnapshot *> *fullAccum = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms"); + FSTQuery *query = FSTTestQuery("rooms"); FSTDocument *doc1 = FSTTestDoc(@"rooms/Eros", 1, @{@"name" : @"Eros"}, YES); FSTDocument *doc2 = FSTTestDoc(@"rooms/Hades", 2, @{@"name" : @"Hades"}, YES); FSTDocument *doc1Prime = FSTTestDoc(@"rooms/Eros", 1, @{@"name" : @"Eros"}, NO); @@ -290,7 +290,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)testMetadataOnlyDocumentChangesAreFilteredOutWhenIncludeDocumentMetadataChangesIsFalse { NSMutableArray<FSTViewSnapshot *> *filteredAccum = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms"); + FSTQuery *query = FSTTestQuery("rooms"); FSTDocument *doc1 = FSTTestDoc(@"rooms/Eros", 1, @{@"name" : @"Eros"}, YES); FSTDocument *doc2 = FSTTestDoc(@"rooms/Hades", 2, @{@"name" : @"Hades"}, NO); FSTDocument *doc1Prime = FSTTestDoc(@"rooms/Eros", 1, @{@"name" : @"Eros"}, NO); @@ -322,7 +322,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)testWillWaitForSyncIfOnline { NSMutableArray<FSTViewSnapshot *> *events = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms"); + FSTQuery *query = FSTTestQuery("rooms"); FSTDocument *doc1 = FSTTestDoc(@"rooms/Eros", 1, @{@"name" : @"Eros"}, NO); FSTDocument *doc2 = FSTTestDoc(@"rooms/Hades", 2, @{@"name" : @"Hades"}, NO); FSTQueryListener *listener = @@ -365,7 +365,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)testWillRaiseInitialEventWhenGoingOffline { NSMutableArray<FSTViewSnapshot *> *events = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms"); + FSTQuery *query = FSTTestQuery("rooms"); FSTDocument *doc1 = FSTTestDoc(@"rooms/Eros", 1, @{@"name" : @"Eros"}, NO); FSTDocument *doc2 = FSTTestDoc(@"rooms/Hades", 2, @{@"name" : @"Hades"}, NO); FSTQueryListener *listener = @@ -411,7 +411,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)testWillRaiseInitialEventWhenGoingOfflineAndThereAreNoDocs { NSMutableArray<FSTViewSnapshot *> *events = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms"); + FSTQuery *query = FSTTestQuery("rooms"); FSTQueryListener *listener = [self listenToQuery:query options:[FSTListenOptions defaultOptions] accumulatingSnapshots:events]; @@ -437,7 +437,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)testWillRaiseInitialEventWhenStartingOfflineAndThereAreNoDocs { NSMutableArray<FSTViewSnapshot *> *events = [NSMutableArray array]; - FSTQuery *query = FSTTestQuery(@"rooms"); + FSTQuery *query = FSTTestQuery("rooms"); FSTQueryListener *listener = [self listenToQuery:query options:[FSTListenOptions defaultOptions] accumulatingSnapshots:events]; |