Commit Graph
57 Commits
Author SHA1 Message Date
zxu 9ddf3637ac Firestore isEqual() on Public Types (#569)
* add bone code for new isEqual and unit test for old isEqual

*   add bone code for `FIRCollectionReference`, `FIRDocumentSnapshot`, `FIRFieldValue`, `FIRQuerySnapshot`, `FIRSnapshotMetadata`;
*   change inconsistenciness of `FIRFieldPath.isEqual` implementation;
*   add unit test (and file) for `FIRDocumentReferenceTest.m`, `FIRFieldPathTest.m`, `FIRQueryTests.testEquals`; `FIRGeoPoint` already has test and Blob is internal type.

* Implement isEqual for FIRCollectionReference

adding the working code and unit test.

* implement isEqual for FIRSnapshotMetadata

* Implement isEqual for FIRDocumentSnapshot

* Implement isEqual for FIRQuerySnapshot

* (un)implement `isEqual` for `FIRFieldValue`

Since `FIRFieldValue` both types are singleton, we do not need override `isEqual`. Add test to test the default `NSObject` `isEqual` works just fine.

* fix style with `scripts/style.sh`

* Implement hash for those with overridden isEqual without hash yet.

* refactor to use test helper functions -- FSTTestFirestore, FSTTestPath, FSTTestDocKey

* refactor using test helper `FSTTestDocSnapshot`, `FSTTestFieldPath`, `FSTTestQuery`, `FSTTestDoc`

* refactoring to use test helper method `FSTTestQuerySnapshot`,

* remove unneccessary nil-check, check isKindOfClass instead of isEqual

* refactoring: adding `FSTAPIHelpers.{h,m}`, `FSTTest{Collection,Document}Ref`,  better naming and style fix

* a file forgot in last commit

* mainly clean up import and some minor refactoring

* fix style via style.sh

* minor style fix

* add pragma ignored -Wnonnull
2017-12-19 13:47:04 -05:00
Gil 52cdf0b25a Clean up warnings (#578)
* Clean up warnings
* Remove optional parens around ifs
2017-12-18 21:05:07 -08:00
Sebastian Schmidt e23236bd38 Running scripts/style.sh 2017-12-10 23:07:53 -08:00
zxu 5da88e4b9b Implement NSPredicate-based query (#531)
*   implement queryFilteredUsingPredicate in FIRQuery;
*   add unit test and integration test for queryFilteredUsingPredicate;
*   project change of adding the FIRQueryTests.m file;
*   refactoring queryFilteredUsingPredicate to split logic into two helpers;
2017-12-07 15:36:15 -05:00
Paul Beusterien 3e592526ec Buildable and interoperable source pods (#444) 2017-11-21 17:02:22 -08:00
Gil 4fbc96904f Use fully qualified imports in Firestore (#467)
This simplifies the import process back into google3 and allows us to add additional directories to the project without needing to update the project files for each directory we add. This shows up most clearly in the change to Firestore/Example/Firestore.xcodeproj/project.pbxproj: this no longer needs to list essentially every directory in the project as a header search path.

* Clang-format configuration for C++ files
* Add support C++-only sources to the podspec
* Podspec support for fully qualified imports
* xcodeproj changes for fully-qualified imports
* Use fully-qualified imports in Firestore sources
2017-11-16 20:52:01 -08:00
Gil bde743ed25 Release 4.3.0 (#327)
Initial release of Firestore at 0.8.0
Bump FirebaseCommunity to 0.1.3
2017-10-03 08:55:22 -07:00