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/Local/FSTLocalSerializerTests.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/Local/FSTLocalSerializerTests.mm')
-rw-r--r-- | Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm b/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm index 1793b23..87242fa 100644 --- a/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm +++ b/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm @@ -36,14 +36,15 @@ #import "Firestore/Source/Model/FSTFieldValue.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Model/FSTMutationBatch.h" -#import "Firestore/Source/Model/FSTPath.h" #import "Firestore/Source/Remote/FSTSerializerBeta.h" #import "Firestore/Example/Tests/Util/FSTHelpers.h" #include "Firestore/core/src/firebase/firestore/model/database_id.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; NS_ASSUME_NONNULL_BEGIN @@ -77,7 +78,7 @@ NS_ASSUME_NONNULL_BEGIN FSTMutation *set = FSTTestSetMutation(@"foo/bar", @{ @"a" : @"b", @"num" : @1 }); FSTMutation *patch = [[FSTPatchMutation alloc] initWithKey:FSTTestDocKey(@"bar/baz") - fieldMask:[[FSTFieldMask alloc] initWithFields:@[ FSTTestFieldPath(@"a") ]] + fieldMask:[[FSTFieldMask alloc] initWithFields:{testutil::Field("a")}] value:FSTTestObjectValue( @{ @"a" : @"b", @"num" : @1 }) @@ -156,7 +157,7 @@ NS_ASSUME_NONNULL_BEGIN } - (void)testEncodesQueryData { - FSTQuery *query = FSTTestQuery(@"room"); + FSTQuery *query = FSTTestQuery("room"); FSTTargetID targetID = 42; FSTSnapshotVersion *version = FSTTestVersion(1039); NSData *resumeToken = FSTTestResumeTokenFromSnapshotVersion(1039); |