aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Example/Tests
diff options
context:
space:
mode:
authorGravatar Konstantin Varlamov <var-const@users.noreply.github.com>2018-02-06 19:15:54 -0500
committerGravatar GitHub <noreply@github.com>2018-02-06 19:15:54 -0500
commitb31fe35eb7a1301e1e6c5d3381b9f3d8054734dd (patch)
treeb21132267305b44c619a2ba1e30f03e4fad626be /Firestore/Example/Tests
parentaa0dba767e5757017057abc299fec0a87f313bfa (diff)
C++ port: port FSTFieldPath and FSTResourcePath to C++ (#749)
Similar to Objective-C, FieldPath and ResourcePath share most of their interface (and implementation) by deriving from BasePath (using CRTP, so that factory methods in BasePath can return an instance of the derived class).
Diffstat (limited to 'Firestore/Example/Tests')
-rw-r--r--Firestore/Example/Tests/Model/FSTPathTests.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/Firestore/Example/Tests/Model/FSTPathTests.mm b/Firestore/Example/Tests/Model/FSTPathTests.mm
index b8529e5..68bcc44 100644
--- a/Firestore/Example/Tests/Model/FSTPathTests.mm
+++ b/Firestore/Example/Tests/Model/FSTPathTests.mm
@@ -173,6 +173,10 @@ NS_ASSUME_NONNULL_BEGIN
ASSERT_ROUND_TRIP(@"`.foo\\\\`", 1);
ASSERT_ROUND_TRIP(@"`.foo\\\\`.`.foo`", 2);
ASSERT_ROUND_TRIP(@"foo.`\\``.bar", 3);
+
+ FSTFieldPath *path = [FSTFieldPath pathWithServerFormat:@"foo\\.bar"];
+ XCTAssertEqualObjects([path canonicalString], @"`foo.bar`");
+ XCTAssertEqual(path.length, 1);
}
#undef ASSERT_ROUND_TRIP