diff options
author | zxu <zxu@google.com> | 2018-04-04 12:40:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-04 12:40:46 -0400 |
commit | 5fa10a914334562564a26298f128bc852269077f (patch) | |
tree | d3529b649230fdf617e492544670ced1191ca5d3 /Firestore/Example/Tests/Local | |
parent | fbe9f9c30c025842a3657055f8dfabbc77f65bf2 (diff) |
port FieldMask to C++ (#998)
* port FieldMask to C++
* address changes
* address changes
* fix test
* address change
* fix lint
* address changes
* Revert "address changes"
This reverts commit c75bb42851b785ab0838bb23679f87dfad9df4bb.
Diffstat (limited to 'Firestore/Example/Tests/Local')
-rw-r--r-- | Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm b/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm index d94925d..d810aa6 100644 --- a/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm +++ b/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm @@ -41,11 +41,13 @@ #import "Firestore/Example/Tests/Util/FSTHelpers.h" #include "Firestore/core/src/firebase/firestore/model/database_id.h" +#include "Firestore/core/src/firebase/firestore/model/field_mask.h" #include "Firestore/core/src/firebase/firestore/util/string_apple.h" #include "Firestore/core/test/firebase/firestore/testutil/testutil.h" namespace testutil = firebase::firestore::testutil; using firebase::firestore::model::DatabaseId; +using firebase::firestore::model::FieldMask; NS_ASSUME_NONNULL_BEGIN @@ -76,13 +78,13 @@ NS_ASSUME_NONNULL_BEGIN - (void)testEncodesMutationBatch { FSTMutation *set = FSTTestSetMutation(@"foo/bar", @{ @"a" : @"b", @"num" : @1 }); - FSTMutation *patch = [[FSTPatchMutation alloc] - initWithKey:FSTTestDocKey(@"bar/baz") - fieldMask:[[FSTFieldMask alloc] initWithFields:{testutil::Field("a")}] - value:FSTTestObjectValue( - @{ @"a" : @"b", - @"num" : @1 }) - precondition:[FSTPrecondition preconditionWithExists:YES]]; + FSTMutation *patch = + [[FSTPatchMutation alloc] initWithKey:FSTTestDocKey(@"bar/baz") + fieldMask:FieldMask{testutil::Field("a")} + value:FSTTestObjectValue( + @{ @"a" : @"b", + @"num" : @1 }) + precondition:[FSTPrecondition preconditionWithExists:YES]]; FSTMutation *del = FSTTestDeleteMutation(@"baz/quux"); FIRTimestamp *writeTime = [FIRTimestamp timestamp]; FSTMutationBatch *model = [[FSTMutationBatch alloc] initWithBatchID:42 |