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/Model/FSTDocumentTests.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/Model/FSTDocumentTests.mm')
-rw-r--r-- | Firestore/Example/Tests/Model/FSTDocumentTests.mm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Firestore/Example/Tests/Model/FSTDocumentTests.mm b/Firestore/Example/Tests/Model/FSTDocumentTests.mm index 24858c5..4e3517c 100644 --- a/Firestore/Example/Tests/Model/FSTDocumentTests.mm +++ b/Firestore/Example/Tests/Model/FSTDocumentTests.mm @@ -18,7 +18,6 @@ #import <XCTest/XCTest.h> -#import "Firestore/Source/Core/FSTSnapshotVersion.h" #import "Firestore/Source/Model/FSTFieldValue.h" #import "Firestore/Example/Tests/Util/FSTHelpers.h" @@ -28,6 +27,7 @@ namespace testutil = firebase::firestore::testutil; using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::SnapshotVersion; NS_ASSUME_NONNULL_BEGIN @@ -38,20 +38,20 @@ NS_ASSUME_NONNULL_BEGIN - (void)testConstructor { DocumentKey key = testutil::Key("messages/first"); - FSTSnapshotVersion *version = FSTTestVersion(1); + SnapshotVersion version = testutil::Version(1); FSTObjectValue *data = FSTTestObjectValue(@{ @"a" : @1 }); FSTDocument *doc = [FSTDocument documentWithData:data key:key version:version hasLocalMutations:NO]; XCTAssertEqualObjects(doc.key, FSTTestDocKey(@"messages/first")); - XCTAssertEqualObjects(doc.version, version); + XCTAssertEqual(doc.version, version); XCTAssertEqualObjects(doc.data, data); XCTAssertEqual(doc.hasLocalMutations, NO); } - (void)testExtractsFields { DocumentKey key = testutil::Key("rooms/eros"); - FSTSnapshotVersion *version = FSTTestVersion(1); + SnapshotVersion version = testutil::Version(1); FSTObjectValue *data = FSTTestObjectValue(@{ @"desc" : @"Discuss all the project related stuff", @"owner" : @{@"name" : @"Jonny", @"title" : @"scallywag"} |