aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/test/firebase/firestore/remote/serializer_test.cc
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
* 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 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
|
* 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.