diff options
author | Konstantin Varlamov <var-const@users.noreply.github.com> | 2018-02-06 19:15:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 19:15:54 -0500 |
commit | b31fe35eb7a1301e1e6c5d3381b9f3d8054734dd (patch) | |
tree | b21132267305b44c619a2ba1e30f03e4fad626be /Firestore/Example/Tests/Model | |
parent | aa0dba767e5757017057abc299fec0a87f313bfa (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/Model')
-rw-r--r-- | Firestore/Example/Tests/Model/FSTPathTests.mm | 4 |
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 |