diff options
author | zxu <zxu@google.com> | 2018-05-01 13:37:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-01 13:37:53 -0400 |
commit | 4e1ffe464900a45915a3a0a4f2a331b5824c24df (patch) | |
tree | c3586f3d840f4b21a4e4643a46fe94f2443d3959 /Firestore/Example/Tests/Local/FSTLocalStoreTests.mm | |
parent | 51be76700c3b71a0924e8eaf7bac4b02e0130e62 (diff) |
Port `SnapshotVersion` for the rest Firestore modulo (#1185)
* remove conversions in `Local` and `Remote`
* replace `FSTSnapshotVersion` in `Model`
* replace `FSTSnapshotVersion` in the rest
* let test check equal with C++ equal
* fix newly added code
* address changes
Diffstat (limited to 'Firestore/Example/Tests/Local/FSTLocalStoreTests.mm')
-rw-r--r-- | Firestore/Example/Tests/Local/FSTLocalStoreTests.mm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm b/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm index 3565e2e..6c7fb3d 100644 --- a/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm +++ b/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm @@ -41,8 +41,11 @@ #import "Firestore/third_party/Immutable/Tests/FSTImmutableSortedSet+Testing.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/test/firebase/firestore/testutil/testutil.h" +namespace testutil = firebase::firestore::testutil; using firebase::firestore::auth::User; +using firebase::firestore::model::SnapshotVersion; NS_ASSUME_NONNULL_BEGIN @@ -50,7 +53,7 @@ NS_ASSUME_NONNULL_BEGIN FSTDocumentVersionDictionary *FSTVersionDictionary(FSTMutation *mutation, FSTTestSnapshotVersion version) { FSTDocumentVersionDictionary *result = [FSTDocumentVersionDictionary documentVersionDictionary]; - result = [result dictionaryBySettingObject:FSTTestVersion(version) forKey:mutation.key]; + result = [result dictionaryBySettingObject:testutil::Version(version) forKey:mutation.key]; return result; } @@ -140,7 +143,7 @@ FSTDocumentVersionDictionary *FSTVersionDictionary(FSTMutation *mutation, FSTMutationBatch *batch = [self.batches firstObject]; [self.batches removeObjectAtIndex:0]; XCTAssertEqual(batch.mutations.count, 1, @"Acknowledging more than one mutation not supported."); - FSTSnapshotVersion *version = FSTTestVersion(documentVersion); + SnapshotVersion version = testutil::Version(documentVersion); FSTMutationResult *mutationResult = [[FSTMutationResult alloc] initWithVersion:version transformResults:nil]; FSTMutationBatchResult *result = [FSTMutationBatchResult resultWithBatch:batch @@ -818,7 +821,7 @@ FSTDocumentVersionDictionary *FSTVersionDictionary(FSTMutation *mutation, NSMutableDictionary<FSTBoxedTargetID *, NSNumber *> *pendingResponses = [NSMutableDictionary dictionary]; FSTWatchChangeAggregator *aggregator = - [[FSTWatchChangeAggregator alloc] initWithSnapshotVersion:FSTTestVersion(1000) + [[FSTWatchChangeAggregator alloc] initWithSnapshotVersion:testutil::Version(1000) listenTargets:listens pendingTargetResponses:pendingResponses]; [aggregator addWatchChanges:@[ watchChange ]]; |