aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/test/firebase/firestore/model/document_test.cc
diff options
context:
space:
mode:
authorGravatar rsgowman <rgowman@google.com>2018-03-27 17:04:10 -0400
committerGravatar GitHub <noreply@github.com>2018-03-27 17:04:10 -0400
commit0e86c06f60262c013c0b653470ac59a3c4d12b46 (patch)
treef47c6b2fbbf16f419ae4dc13d3869007e573b976 /Firestore/core/test/firebase/firestore/model/document_test.cc
parentcb8c4b6b1f1ad213a5b3272e2c2e94f755bbabf9 (diff)
Add ObjectValue::Map alias (#967)
Diffstat (limited to 'Firestore/core/test/firebase/firestore/model/document_test.cc')
-rw-r--r--Firestore/core/test/firebase/firestore/model/document_test.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/Firestore/core/test/firebase/firestore/model/document_test.cc b/Firestore/core/test/firebase/firestore/model/document_test.cc
index 6b72360..066c875 100644
--- a/Firestore/core/test/firebase/firestore/model/document_test.cc
+++ b/Firestore/core/test/firebase/firestore/model/document_test.cc
@@ -29,7 +29,7 @@ inline Document MakeDocument(const absl::string_view data,
const absl::string_view path,
const Timestamp& timestamp,
bool has_local_mutations) {
- return Document(FieldValue::ObjectValue(
+ return Document(FieldValue::ObjectValueFromMap(
{{"field", FieldValue::StringValue(data.data())}}),
DocumentKey::FromPathString(path.data()),
SnapshotVersion(timestamp), has_local_mutations);
@@ -41,9 +41,9 @@ TEST(Document, Getter) {
const Document& doc =
MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), true);
EXPECT_EQ(MaybeDocument::Type::Document, doc.type());
- EXPECT_EQ(
- FieldValue::ObjectValue({{"field", FieldValue::StringValue("foo")}}),
- doc.data());
+ EXPECT_EQ(FieldValue::ObjectValueFromMap(
+ {{"field", FieldValue::StringValue("foo")}}),
+ doc.data());
EXPECT_EQ(DocumentKey::FromPathString("i/am/a/path"), doc.key());
EXPECT_EQ(SnapshotVersion(Timestamp(123, 456)), doc.version());
EXPECT_TRUE(doc.has_local_mutations());
@@ -64,7 +64,7 @@ TEST(Document, Comparison) {
// Document and MaybeDocument will not equal. In particular, Document and
// NoDocument will not equal, which I won't test here.
- EXPECT_NE(Document(FieldValue::ObjectValue({}),
+ EXPECT_NE(Document(FieldValue::ObjectValueFromMap({}),
DocumentKey::FromPathString("same/path"),
SnapshotVersion(Timestamp()), false),
MaybeDocument(DocumentKey::FromPathString("same/path"),