From 80033485be537acaf29924f6b717c777b550a418 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Fri, 9 Feb 2018 19:42:28 -0500 Subject: C++ port: add C++ equivalent of FSTDocumentKey. (#762) Also move kDocumentKeyPath to the only point of usage - make it a static member variable of FieldPath. --- .../core/test/firebase/firestore/model/resource_path_test.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Firestore/core/test/firebase/firestore/model/resource_path_test.cc') diff --git a/Firestore/core/test/firebase/firestore/model/resource_path_test.cc b/Firestore/core/test/firebase/firestore/model/resource_path_test.cc index 378a5e3..637e78e 100644 --- a/Firestore/core/test/firebase/firestore/model/resource_path_test.cc +++ b/Firestore/core/test/firebase/firestore/model/resource_path_test.cc @@ -74,7 +74,7 @@ TEST(ResourcePath, Comparison) { TEST(ResourcePath, Parsing) { const auto parse = [](const std::pair expected) { - const auto path = ResourcePath::Parse(expected.first); + const auto path = ResourcePath::FromString(expected.first); return std::make_pair(path.CanonicalString(), path.size()); }; const auto make_expected = [](const std::string& str, const size_t size) { @@ -92,12 +92,12 @@ TEST(ResourcePath, Parsing) { expected = make_expected(R"(foo/__!?#@..`..\`/baz)", 3); EXPECT_EQ(expected, parse(expected)); - EXPECT_EQ(ResourcePath::Parse("/foo/").CanonicalString(), "foo"); + EXPECT_EQ(ResourcePath::FromString("/foo/").CanonicalString(), "foo"); } TEST(ResourcePath, ParseFailures) { - ASSERT_ANY_THROW(ResourcePath::Parse("//")); - ASSERT_ANY_THROW(ResourcePath::Parse("foo//bar")); + ASSERT_ANY_THROW(ResourcePath::FromString("//")); + ASSERT_ANY_THROW(ResourcePath::FromString("foo//bar")); } } // namespace model -- cgit v1.2.3