aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/test
diff options
context:
space:
mode:
authorGravatar zxu <zxu@google.com>2018-03-05 11:30:59 -0500
committerGravatar GitHub <noreply@github.com>2018-03-05 11:30:59 -0500
commit1c40e7aada6b32bbc621f06fb5f380149606a58d (patch)
tree6dee81f74f8a33d1beae915d9227caf28b8e2598 /Firestore/core/test
parent9b5b4d876eb77e65b3246614855088be101eebf3 (diff)
add converters and port paths to FSTQuery (#869)
* add converters and fix FSTQuery.{h,m} only * address changes * a change forget to address * add a dummy function to make inline-only-library buildable
Diffstat (limited to 'Firestore/core/test')
-rw-r--r--Firestore/core/test/firebase/firestore/testutil/CMakeLists.txt14
-rw-r--r--Firestore/core/test/firebase/firestore/testutil/testutil.cc28
-rw-r--r--Firestore/core/test/firebase/firestore/testutil/testutil.h41
3 files changed, 77 insertions, 6 deletions
diff --git a/Firestore/core/test/firebase/firestore/testutil/CMakeLists.txt b/Firestore/core/test/firebase/firestore/testutil/CMakeLists.txt
index 14308a5..636acb0 100644
--- a/Firestore/core/test/firebase/firestore/testutil/CMakeLists.txt
+++ b/Firestore/core/test/firebase/firestore/testutil/CMakeLists.txt
@@ -27,10 +27,12 @@ if(APPLE)
list(APPEND TESTUTIL_DEPENDS firebase_firestore_testutil_apple)
endif()
-add_library(
- firebase_firestore_testutil INTERFACE
-)
-target_link_libraries(
- firebase_firestore_testutil INTERFACE
- ${TESTUTIL_DEPENDS}
+cc_library(
+ firebase_firestore_testutil
+ SOURCES
+ testutil.cc
+ testutil.h
+ DEPENDS
+ ${TESTUTIL_DEPENDS}
+ firebase_firestore_model
)
diff --git a/Firestore/core/test/firebase/firestore/testutil/testutil.cc b/Firestore/core/test/firebase/firestore/testutil/testutil.cc
new file mode 100644
index 0000000..9b9228d
--- /dev/null
+++ b/Firestore/core/test/firebase/firestore/testutil/testutil.cc
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2018 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "Firestore/core/test/firebase/firestore/testutil/testutil.h"
+
+namespace firebase {
+namespace firestore {
+namespace testutil {
+
+void dummy() {
+}
+
+} // namespace testutil
+} // namespace firestore
+} // namespace firebase
diff --git a/Firestore/core/test/firebase/firestore/testutil/testutil.h b/Firestore/core/test/firebase/firestore/testutil/testutil.h
new file mode 100644
index 0000000..7e4f313
--- /dev/null
+++ b/Firestore/core/test/firebase/firestore/testutil/testutil.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2018 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_TESTUTIL_TESTUTIL_H_
+#define FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_TESTUTIL_TESTUTIL_H_
+
+#include "Firestore/core/src/firebase/firestore/model/field_path.h"
+#include "absl/strings/string_view.h"
+
+namespace firebase {
+namespace firestore {
+namespace testutil {
+
+// Below are convenience methods for creating instances for tests.
+
+inline model::FieldPath Field(absl::string_view field) {
+ return model::FieldPath::FromServerFormat(field);
+}
+
+// Add a non-inline function to make this library buildable.
+// TODO(zxu123): remove once there is non-inline function.
+void dummy();
+
+} // namespace testutil
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_TEST_FIREBASE_FIRESTORE_TESTUTIL_TESTUTIL_H_