aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/test/firebase/firestore/remote
Commit message (Collapse)AuthorAge
* Fix Firestore when compiled with Xcode 8.3 (#1519)Gravatar Gil2018-07-11
| | | | | | | | | | | | | * Add a travis stage that tests building Firestore with Xcode 8.3. * Simulate on a device available in Xcode 8 * Fix compile errors under Xcode 8.3.3 * Remove Firestore_SwiftTests_iOS from the Firestore_Tests_iOS Scheme I'll create a new target for this but in another PR. * Add an entry to CHANGELOG.md
* C++ migration: add a C++ implementation of `FSTExponentialBackoff` (#1465)Gravatar Konstantin Varlamov2018-07-10
| | | | | | | | | | | This is a pretty close port of `FSTExponentialBackoff`. The changes are pretty minor: * delay is calculated using <chrono> duration types, not plain numbers, which should be a little more type-safe; * split a piece of code into a ClampDelay function, because it's reasonably close to std::clamp; * rephrased the class-level comment to make it clearer that the first attempt always has delay = 0; * added simple tests (other platforms don't have tests for this). Also make sure that canceling a DelayedOperation is always valid.
* Fix a few implicit converstion warnings (#1439)Gravatar rsgowman2018-06-22
| | | Were showing up in xcode build (but not cmake build)
* Merge remote-tracking branch 'origin/master' into rsgowman/protobuf_cppGravatar Rich Gowman2018-06-12
|\ | | | | | | | | | | | | | | | | | | | | Also "fixed" BadFieldValueTagWithOtherValidTagsPresent test by changing 'false' to 'true'. Details: Depending on the version of nanopb, nanopb would explicitly encode 'false', which shouldn't be done in proto3. When it's explicitly encoded, the test worked properly. But when it was (properly) dropped, the invalid tag is the only field that's actually encoded, thus violating the assumptions of the test, leading to a test failure. s/false/true fixes it, as now the boolean_value field is (properly) encoded regardless of version.
| * Skip unknown fields while decoding BatchGetDocumentsResponse proto objects ↵Gravatar rsgowman2018-06-05
| | | | | | | | (#1377)
| * Skip unknown fields while decoding FieldValue proto objects. (#1354)Gravatar rsgowman2018-06-04
| |
| * Allow repeated entries in Value proto. (#1346)Gravatar rsgowman2018-05-30
| | | | | | | | | | | | | | Normally, this would be unexpected, as only a single entry in the Value proto *should* be present. However, the proto docs state that parsers should be able to handle repeated fields. (In the case of repeated fields, the last one "wins".)
| * Handle deserializing BatchGetDocumentsResponse error case... (#1344)Gravatar rsgowman2018-05-29
| | | | | | | | ... where neither 'found' nor 'missing' fields set.
| * "Handle" BatchGetDocumentsResponse.transaction (by ignoring it) (#1318)Gravatar rsgowman2018-05-28
|/
* Deserialize NoDocument instances (#1311)Gravatar rsgowman2018-05-23
| | | | | | Note that it isn't possible to *serialize* NoDocuments. Still TODO: - Error handling
* Add namespace alias for v1beta1 (#1310)Gravatar rsgowman2018-05-22
| | | Roughly s/google::firebase::v1beta1/v1beta1/g
* [De]serialize non-empty Document instances (#1284)Gravatar rsgowman2018-05-22
| | | | | | | * [De]serialize non-empty Document instances Still TODO: - NoDocument - ErrorHandling
* [De]serialize empty Document instances (#1262)Gravatar rsgowman2018-05-15
| | | | | | | | | * [De]serialize empty Document instances Still TODO: - non-empty - NoDocument - ErrorHandling
* [De]serialize Timestamps via the remote Serializer (#1233)Gravatar rsgowman2018-05-09
|
* [De]serialize DocumentKeys via the remote Serializer (#1212)Gravatar rsgowman2018-05-04
|
* Minor test naming fixup (#1209)Gravatar rsgowman2018-05-02
|
* Add error handler for serializer (for deserializing cases) (#1181)Gravatar rsgowman2018-05-01
| | | | | This is more interesting than the serializing case, as we should expect to see occasional corruption of our input byte vector.
* Adjust serializer test to verify via libprotobuf. (#1039)Gravatar rsgowman2018-04-24
| | | | | | Previously, the tests would compare serialization results against a precomputed (via protoc) array of bytes. Now they serialize via our nanopb based class and deserialize via libprotobuf (and vice versa) and then ensure the result is the same as the input
* Add clang-tidy checks for Firestore (#1078)Gravatar Gil2018-04-12
| | | | | | | | | | | | | | | | | | | | * Add a .clang-tidy configuration for Firestore C++ * Fix clang-tidy warnings * typedef -> using * const ref + rvalue ref -> pass by value * NULL -> nullptr * remove useless default initializations * remove useless const value-type parameter declarations (definitions can still use them) * use auto instead of repeating types in a cast * Fix typos * Address use of static method through instance warnings * Address use after move warnings
* Add lint checking for Objective-C++ sources (#1048)Gravatar Gil2018-04-09
| | | | | | | | | | | | | | | | * lint.sh now lints Objective-C++ too * cpplint checks system-style includes that should be user-style This prevents it from recognizing project sources as if they were C system headers and then complaining that they're in the wrong place. * cpplint checks #imports and #includes * cpplint checks that C++ system headers aren't #imported * cpplint checks for C system headers that could be C++ system headers * cpplint checks that Objective-C sources include their headers
* Add error handling for serializer (for serializing case only) (#991)Gravatar rsgowman2018-04-05
| | | | | | | | Deserializing not handled yet. Note that the serializing case is fairly uninteresting, as assuming valid input is passed in, there's no real reason why it should fail (and if it does fail, it indicates a gross violation of our understanding of the system.)
* Add ObjectValue::Map alias (#967)Gravatar rsgowman2018-03-27
|
* Renames in serializer to reflect recent changes (#957)Gravatar rsgowman2018-03-23
| | | | | | | * Rename Writer::Encode* methods to Writer::Write* * Rename: s/stream/writer/ (approximately) but only where it applies to Writer (rather than pb_ostream_t).
* [De]Serialize FieldValue map_values ("Objects") (#878)Gravatar rsgowman2018-03-08
| | | These can (recursively) contain other FieldValues.
* Serialize (and deserialize) string values (#864)Gravatar rsgowman2018-02-28
|
* Eliminate TypedValue and serialize direct from FieldValue to bytes. (#860)Gravatar rsgowman2018-02-27
| | | | | | | | This will likely only apply for proto messages that use 'oneof's. (Because we need to serialize these manually.) The problem was that as we were adding additional types, TypeValue was evolving into a parallel implementation of the FieldValue union. When serializing/deserializing oneofs we need to supply a custom value to serialize and a custom function to do the work. There's no value in translating from FieldValue to TypeValue just to store as this custom object. We might as well just store the FieldValue model directly and write the custom serializer/deserializer to use the model directly.
* Serialize (and deserialize) int64 values (#818) (#829)Gravatar rsgowman2018-02-22
|
* Fix trivial mem leak in the test suite (#828)Gravatar rsgowman2018-02-21
| | | | Reduces noise while running valgrind so that I can see the leaks that I'm introducing. :/
* Serialize (and deserialize) bool values (#791)Gravatar rsgowman2018-02-16
|
* Serialize and deserialize null (#783)Gravatar rsgowman2018-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | * Build (grpc's) nanopb with -DPB_FIELD_16BIT We require (at least) 16 bit fields. (By default, nanopb uses 8 bit fields, ie allowing up to 256 field tags.) Also note that this patch adds this to grpc's nanopb, rather than to our nanopb. We'll need to eventually either: a) we instruct grpc to use our nanopb b) we rely on grpc's nanopb instead of using our own. (^ marked as a TODO for now.) * Add some dependant protos Imported from protobuf. Nanopb requires these to be present (though anything using libprotobuf does not, as these are already built into that.) * Add generated nanopb protos based off of newly added proto definitions * Build the nanopb protos * Serialize and deserialize null
* ./style.shGravatar Rich Gowman2018-02-06
|
* Hook up nanopb to firestorep projectGravatar Rich Gowman2018-02-06
| | | | | Use remote/serializer placeholder class as a hook for the test to ensure nanopb headers can be found, and test can be linked.
* Add a cc_library to the CMake build (#670)Gravatar Gil2018-01-17
| | | | | | | | | | | | | | | | | | | | | | * Rewrite cc_test to take named arguments Cut down on build file verbosity by having cc_test take SOURCES and DEPENDS. The separate invocation of target_link_libraries is no longer necessary. * Add a cc_library rule to parallel cc_test This cuts down on build file verbosity. * Automatically add OBJC_FLAGS to cc_libraries if applicable * Exclude platform-specific libraries from 'all' This is makes it possible to declare this kind of library unconditionally. Usage within a test or as a dependency will actually trigger building. * Restore secure_random_test.cc; clean-up comments
* Build gRPC for Firestore C++ (#652)Gravatar Gil2018-01-13
* Clean up quoting and other minor issues * Reorganize CMake build output Make it clearer which parts of the output pertain to external projects. * Use a consistent ordering of ExternalProject arguments * Prevent the top-level build from running in parallel This prevents spurious failures when running make -j. * Actually parse arguments in the xcodebuild function * Use ExternalProject features when available * submodule limits from CMake 3.0 * shallow clones from CMake 3.6 * git progress output from CMake 3.8 * Only build the parts of leveldb we need Skip building the tools and other libraries * Avoid installing ExternalProjects Consume build output directly so that we can build just the targets we need. Installing causes all targets to be built. This doesn't matter as much for these targets but the gRPC build includes a ton of stuff we don't need so it's worth adopting this as a general strategy. * Define an external build for grpc * Test that grpc can link successfully. * Add a FindGRPC CMake module * Actually comment ExternalProjext_GitSource