diff options
author | zxu <zxu@google.com> | 2018-02-06 13:51:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 13:51:11 -0500 |
commit | a441190635d494f128cf02e07566ae2003af4e08 (patch) | |
tree | 618e6b0ecdb5d243f6e97f319f98f09dc9ca0a7e /Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm | |
parent | 7cac9dc47a8c6b7321ebf5fc13fa7140e784c8ca (diff) |
Implement Firestore DatabaseInfo and port both Database{Id,Info} C++ to the iOS code (#738)
* implement Firestore DatabaseInfo in C++
* temporary stash changes; blocking on the massive renaming of .m to .mm
* add database_info_test to project
* finish port DatabaseId and fix style, modular fixing DatabaseInfo
* port DatabaseInfo
* remove FSTDatabase{ID,Info} and their tests from project
* fix unit test
* use namespace alias
* use namespace alias, leftover
* address more changes
* refactoring to use raw pointer instead of value for property
* address changes
* remove self->
* fix style
* remove the name suffix Alloc
* fix a bug
Diffstat (limited to 'Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm')
-rw-r--r-- | Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm b/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm index ef15056..df591b0 100644 --- a/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm +++ b/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm @@ -27,12 +27,16 @@ #import "Firestore/Source/Auth/FSTEmptyCredentialsProvider.h" #import "Firestore/Source/Core/FSTFirestoreClient.h" #import "Firestore/Source/Local/FSTLevelDB.h" -#import "Firestore/Source/Model/FSTDatabaseID.h" #import "Firestore/Source/Util/FSTDispatchQueue.h" #import "Firestore/Example/Tests/Util/FSTEventAccumulator.h" #import "Firestore/Example/Tests/Util/FSTTestDispatchQueue.h" +#include "Firestore/core/src/firebase/firestore/model/database_id.h" +#include "Firestore/core/src/firebase/firestore/util/string_apple.h" + +namespace util = firebase::firestore::util; +using firebase::firestore::model::DatabaseId; using firebase::firestore::util::CreateAutoId; NS_ASSUME_NONNULL_BEGIN @@ -137,12 +141,13 @@ NS_ASSUME_NONNULL_BEGIN FIRSetLoggerLevel(FIRLoggerLevelDebug); // HACK: FIRFirestore expects a non-nil app, but for tests we cheat. FIRApp *app = nil; - FIRFirestore *firestore = [[FIRFirestore alloc] initWithProjectID:projectID - database:kDefaultDatabaseID - persistenceKey:persistenceKey - credentialsProvider:credentialsProvider - workerDispatchQueue:workerDispatchQueue - firebaseApp:app]; + FIRFirestore *firestore = [[FIRFirestore alloc] + initWithProjectID:projectID + database:util::WrapNSStringNoCopy(DatabaseId::kDefaultDatabaseId) + persistenceKey:persistenceKey + credentialsProvider:credentialsProvider + workerDispatchQueue:workerDispatchQueue + firebaseApp:app]; firestore.settings = [FSTIntegrationTestCase settings]; |