From 935f3ca7d749f96c7207236a39c57f32a02c05d3 Mon Sep 17 00:00:00 2001 From: Gil Date: Thu, 22 Feb 2018 08:12:54 -0800 Subject: Avoid wrapping and rewrapping NSStrings when constructing DatabaseId (#833) * Avoid wrapping and rewrapping NSStrings when constructing DatabaseId * Shorten DatabaseId::kDefaultDatabaseId --- Firestore/Example/Tests/Core/FSTQueryTests.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Firestore/Example/Tests/Core/FSTQueryTests.mm') diff --git a/Firestore/Example/Tests/Core/FSTQueryTests.mm b/Firestore/Example/Tests/Core/FSTQueryTests.mm index 8acefb5..c0b2cd9 100644 --- a/Firestore/Example/Tests/Core/FSTQueryTests.mm +++ b/Firestore/Example/Tests/Core/FSTQueryTests.mm @@ -309,7 +309,6 @@ NS_ASSUME_NONNULL_BEGIN [query queryByAddingSortOrder:[FSTSortOrder sortOrderWithFieldPath:FSTTestFieldPath(@"sort") ascending:YES]]; - NSString *defaultDatabaseID = util::WrapNSStringNoCopy(DatabaseId::kDefaultDatabaseId); // clang-format off NSArray *docs = @[ FSTTestDoc(@"collection/1", 0, @{@"sort": [NSNull null]}, NO), @@ -326,7 +325,7 @@ NS_ASSUME_NONNULL_BEGIN FSTTestDoc(@"collection/1", 0, @{@"sort": @"ab"}, NO), FSTTestDoc(@"collection/1", 0, @{@"sort": @"b"}, NO), FSTTestDoc(@"collection/1", 0, @{@"sort": - FSTTestRef(@"project", defaultDatabaseID, @"collection/id1")}, NO), + FSTTestRef("project", DatabaseId::kDefault, @"collection/id1")}, NO), ]; // clang-format on -- cgit v1.2.3