diff options
author | zxu <zxu@google.com> | 2018-03-06 14:28:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-06 14:28:04 -0500 |
commit | 8311c6432ecff78bedd13e27f64d241659324786 (patch) | |
tree | 982484ba69cf17172ee4e1308254a0b76894b7d5 /Firestore/Example/Tests/Util/FSTHelpers.mm | |
parent | 34ebf10b0acc65f1924d723e82085d4104bc281d (diff) |
port paths to FSTDocumentKey (#877)
* replace path with C++ implementation in FSTDocumentKey.{h,mm} only
* address changes
* address changes
Diffstat (limited to 'Firestore/Example/Tests/Util/FSTHelpers.mm')
-rw-r--r-- | Firestore/Example/Tests/Util/FSTHelpers.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Firestore/Example/Tests/Util/FSTHelpers.mm b/Firestore/Example/Tests/Util/FSTHelpers.mm index 9b05604..00464bc 100644 --- a/Firestore/Example/Tests/Util/FSTHelpers.mm +++ b/Firestore/Example/Tests/Util/FSTHelpers.mm @@ -43,8 +43,10 @@ #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 util = firebase::firestore::util; +namespace testutil = firebase::firestore::testutil; using firebase::firestore::model::DatabaseId; NS_ASSUME_NONNULL_BEGIN @@ -266,7 +268,7 @@ FSTPatchMutation *FSTTestPatchMutation(NSString *path, } }]; - FSTDocumentKey *key = [FSTDocumentKey keyWithPath:FSTTestPath(path)]; + FSTDocumentKey *key = [FSTDocumentKey keyWithPath:testutil::Resource([path UTF8String])]; FSTFieldMask *mask = [[FSTFieldMask alloc] initWithFields:merge ? updateMask : fieldMaskPaths]; return [[FSTPatchMutation alloc] initWithKey:key fieldMask:mask @@ -277,7 +279,7 @@ FSTPatchMutation *FSTTestPatchMutation(NSString *path, // For now this only creates TransformMutations with server timestamps. FSTTransformMutation *FSTTestTransformMutation(NSString *path, NSArray<NSString *> *serverTimestampFields) { - FSTDocumentKey *key = [FSTDocumentKey keyWithPath:FSTTestPath(path)]; + FSTDocumentKey *key = [FSTDocumentKey keyWithPath:testutil::Resource([path UTF8String])]; NSMutableArray<FSTFieldTransform *> *fieldTransforms = [NSMutableArray array]; for (NSString *field in serverTimestampFields) { FSTFieldPath *fieldPath = FSTTestFieldPath(field); |