aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Example/Tests/Util
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2017-11-09 09:16:20 -0800
committerGravatar GitHub <noreply@github.com>2017-11-09 09:16:20 -0800
commit86f429b2f0061a9f16c42f83841d36813892232b (patch)
treecaad0321b83c1c0ca3979acb22529e73a2619e8a /Firestore/Example/Tests/Util
parent9044d2ce212d3fffe6bfb3793fdb5c58cb18f49b (diff)
Make FSTIntegrationTestCase Objective-C++ (#439)
* Make all FIRLogger functions extern "C" * Make FSTIntegrationTestCase Objective-C++ Keep external interface to FSTIntegrationTestCase Objective-C * Add explicit dependency on Firebase/Community/Core from Tests This fixes a linkage error on a missing _FIRSetLoggerLevel symbol
Diffstat (limited to 'Firestore/Example/Tests/Util')
-rw-r--r--Firestore/Example/Tests/Util/FSTIntegrationTestCase.h8
-rw-r--r--Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm (renamed from Firestore/Example/Tests/Util/FSTIntegrationTestCase.m)5
2 files changed, 11 insertions, 2 deletions
diff --git a/Firestore/Example/Tests/Util/FSTIntegrationTestCase.h b/Firestore/Example/Tests/Util/FSTIntegrationTestCase.h
index a2c08ec..1170080 100644
--- a/Firestore/Example/Tests/Util/FSTIntegrationTestCase.h
+++ b/Firestore/Example/Tests/Util/FSTIntegrationTestCase.h
@@ -30,6 +30,10 @@
NS_ASSUME_NONNULL_BEGIN
+#if __cplusplus
+extern "C" {
+#endif
+
@interface FSTIntegrationTestCase : XCTestCase
/** Returns the default Firestore project ID for testing. */
@@ -96,4 +100,8 @@ NSArray<NSDictionary<NSString *, id> *> *FIRQuerySnapshotGetData(FIRQuerySnapsho
/** Converts the FIRQuerySnapshot to an NSArray containing the document IDs in order. */
NSArray<NSString *> *FIRQuerySnapshotGetIDs(FIRQuerySnapshot *docs);
+#if __cplusplus
+} // extern "C"
+#endif
+
NS_ASSUME_NONNULL_END
diff --git a/Firestore/Example/Tests/Util/FSTIntegrationTestCase.m b/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm
index 2e1e0a9..92e4dc2 100644
--- a/Firestore/Example/Tests/Util/FSTIntegrationTestCase.m
+++ b/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm
@@ -14,10 +14,9 @@
* limitations under the License.
*/
-@import Firestore;
-
#import "FSTIntegrationTestCase.h"
+#import <Firestore/Firestore-umbrella.h>
#import <FirebaseCommunity/FIRLogger.h>
#import <GRPCClient/GRPCCall+ChannelArg.h>
#import <GRPCClient/GRPCCall+Tests.h>
@@ -298,6 +297,7 @@ NS_ASSUME_NONNULL_BEGIN
}
}
+extern "C"
NSArray<NSDictionary<NSString *, id> *> *FIRQuerySnapshotGetData(FIRQuerySnapshot *docs) {
NSMutableArray<NSDictionary<NSString *, id> *> *result = [NSMutableArray array];
for (FIRDocumentSnapshot *doc in docs.documents) {
@@ -306,6 +306,7 @@ NSArray<NSDictionary<NSString *, id> *> *FIRQuerySnapshotGetData(FIRQuerySnapsho
return result;
}
+extern "C"
NSArray<NSString *> *FIRQuerySnapshotGetIDs(FIRQuerySnapshot *docs) {
NSMutableArray<NSString *> *result = [NSMutableArray array];
for (FIRDocumentSnapshot *doc in docs.documents) {