aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/test
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 Firestore source errors under VS2017 (#1515)Gravatar Gil2018-07-11
| | | | | | | | | | | | | | | | * Project file updates from sync_project.rb * Fix misc compile errors under VS2017 * Fix util/hashing under VS2017 std::hash<int> is not just a pass through in Microsoft's STL. * Disable unsafe code warnings in VS2017 ... where comparing against a reference implementation that has no easy safe equivalent. * Handle drive letters in paths on Windows
* 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.
* Split GoogleUtilities from FirebaseCore (#1370)Gravatar Paul Beusterien2018-07-06
|
* Add support for NoDocument in the local serializer (#1484)Gravatar rsgowman2018-07-03
|
* Initial (incomplete) implementation of f:f::core::Query (#1471)Gravatar rsgowman2018-06-29
|
* Install googletest (#1461)Gravatar Gil2018-06-26
| | | Also add FindGMock to Find gmock after installation
* Fix a few implicit converstion warnings (#1439)Gravatar rsgowman2018-06-22
| | | Were showing up in xcode build (but not cmake build)
* Initial creation of the local serializer. (#1415)Gravatar rsgowman2018-06-21
| | | Added a single, basic test as a motivator.
* Hookup serializer_test.cc to the xcode based test suite (#1343)Gravatar rsgowman2018-06-18
|\
* | Create Status objects from errno (#1374)Gravatar Gil2018-06-12
| | | | | | | | | | | | | | | | | | | | | | * Add a portable interface to strerror * Add Status::FromErrno * Add strerror_test.cc to the Xcode project * Use glibc feature selection macros instead of return-type overloads * Fix tensorflow references
| * Merge remote-tracking branch 'origin/master' into rsgowman/protobuf_cppGravatar Rich Gowman2018-06-12
| |\ | |/ |/|
| * 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.
* | | Force refresh token if RPC fails with "Unauthenticated" error (#1373)Gravatar Konstantin Varlamov2018-06-07
| | | | | | | | | "Unauthenticated" is presumed to mean that token is expired (which might happen if local clock is wrong) and retried, subject to the usual backoff logic.
* | | Fix support scripts on Linux (#1385)Gravatar Gil2018-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make it possible to run style.sh on Linux Needs clang-format in a nonstandard location, but can be made to work. * Fix lint.sh on Linux * Fix multiline comment error
* | | Fix undefined behaviour in test. (#1381)Gravatar rsgowman2018-06-05
| | | | | | | | | | | | | | | PB_LAST_FIELD is required by nanopb, but was missed in the test. Without this, undefined behaviour results. (Either manifesting itself as fine (i.e. if there's zeros following) or segfaults.)
* | | Add pathname manipulation utilities (#1376)Gravatar Gil2018-06-05
| |/ |/|
* | Skip unknown fields while decoding BatchGetDocumentsResponse proto objects ↵Gravatar rsgowman2018-06-05
| | | | | | | | (#1377)
* | Build cleanup (#1375)Gravatar Gil2018-06-04
| | | | | | | | | | | | * Remove extraneous firebase_firestore_util_async_queue target * Remove unimplemented declaration in string_util.h
* | Skip unknown fields while decoding FieldValue proto objects. (#1354)Gravatar rsgowman2018-06-04
| |
* | Fix Firestore compilation under Xcode < 9.2 (#1367)Gravatar Gil2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't rely on specialization failure to determine when std::hash is unavailable. Instead manually declare the conditions under which std::hash should be defined. * Fix detection of Objective-C classes in Xcode < 9.2 std::is_base_of<NSObject, NSString>{} is false there so the overloads defined for Objective-C types weren't getting enabled. * Add explicit tests for StringFormat using Objective-C objects * Add explicit tests for HasStdHash
* | 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
|/
* Replace Objective-C assertions with C++ assertions (#1327)Gravatar Gil2018-05-24
| | | | | | | | * Migrate FSTFail to HARD_FAIL * FSTCFail -> HARD_FAIL * FSTCAssert -> HARD_ASSERT * FSTAssert -> HARD_ASSERT * Replace FSTAssert with NSAssert in dead Objective-C code * Remove FSTAssert.h
* Deserialize NoDocument instances (#1311)Gravatar rsgowman2018-05-23
| | | | | | Note that it isn't possible to *serialize* NoDocuments. Still TODO: - Error handling
* Reimplement C++ logging (#1313)Gravatar Gil2018-05-23
| | | | | | | * Add direct support for formatting Objective-C objects * Rewrite log.h * Convert FSTWarn to LOG_WARN * Convert FSTLog to LOG_DEBUG * Remove FSTLogger
* Add a HARD_ASSERT C++ assertion macro (#1304)Gravatar Gil2018-05-22
| | | | | | * Add HARD_ASSERT * Use HARD_ASSERT * Remove FIREBASE_ASSERT * Remove StringPrintf
* Add namespace alias for v1beta1 (#1310)Gravatar rsgowman2018-05-22
| | | Roughly s/google::firebase::v1beta1/v1beta1/g
* Firestore project fixes (#1301)Gravatar Gil2018-05-22
| | | | | | * Move GoogleTest.podspec out of the Tests tree * Rename GoogleTests to CoreTests * Move CoreTests to the top-level * Move FSTGoogleTestTests.mm into core/test
* [De]serialize non-empty Document instances (#1284)Gravatar rsgowman2018-05-22
| | | | | | | * [De]serialize non-empty Document instances Still TODO: - NoDocument - ErrorHandling
* Add a C++ native StringFormat (#1289)Gravatar Gil2018-05-21
| | | | * Add StringFormat * Use StringFormat
* [De]serialize empty Document instances (#1262)Gravatar rsgowman2018-05-15
| | | | | | | | | * [De]serialize empty Document instances Still TODO: - non-empty - NoDocument - ErrorHandling
* Firestore C++: make FSTDispatchQueue delegate to C++ implementation (#1240)Gravatar Konstantin Varlamov2018-05-11
| | | | | FSTDispatchQueue now doesn't contain any logic of its own and instead just passes through all method calls to AsyncQueue (backed by an ExecutorLibdispatch).
* Firestore C++: quick fix for flaky tests in AsyncQueue and Executor (#1245)Gravatar Konstantin Varlamov2018-05-10
|
* Firestore C++: add missing tests for Executor (#1247)Gravatar Konstantin Varlamov2018-05-10
|
* Add missing tests to the Firestore project (#1254)Gravatar Gil2018-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix order of project elements * Add immutable container tests to the Firestore project * Fix style problems in TransformOperations * Method names should have an initial upper case character (except getters/setters) * Pointers bind to the type not the name in C++ * Fix unsigned/signed comparison warning * Make transform_operations.h Objective-C++ only It turns out that you can't conditionally define virtual methods. This causes multiple versions of the vtable to be emitted and when the linker resolves all the vtable definitions for a class it picks one arbitrarily causing failures for callers that expect some of the conditional methods to be present. * Add precondition_test and field_mask_test to the project * Add field_transform_test and transform_operations_test to the project * Clean up missing newline/excess comments * Use braced initialization to avoid linter false positive on std::transform
* [De]serialize Timestamps via the remote Serializer (#1233)Gravatar rsgowman2018-05-09
|
* Firestore C++: in AsyncQueue, use steady_clock instead of system_clock. (#1246)Gravatar Konstantin Varlamov2018-05-09
| | | | | This should prevent weird bugs due to system time readjustments. Because operations are scheduled relative to now, the fact that the resulting timepoint isn't in Unix epoch shouldn't matter.
* Firestore C++: compile ExecutorLibdispatch in Objective-C++ mode (#1237)Gravatar Konstantin Varlamov2018-05-08
| | | | | | | | dispatch_queue_t is defined differently in libdispatch depending on whether the library header is being include from Objective-C (or Objective-C++) code, or else from C or C++ code. Make sure that all source files in Firestore that include executor_libdispatch.h are compiled in the same mode (Objective-C++) to avoid linker errors.
* C++ migration: add AsyncQueue, the C++ version of FSTDispatchQueue (#1176)Gravatar Konstantin Varlamov2018-05-07
| | | | | | | | | | | | AsyncQueue is a queue that executes given operations asynchronously, enforcing that only a single operation is executing at any given time, and that in-progress operations don't spawn more operations. The actual execution is delegated to a platform-specific executor. Executor is an interface for a FIFO queue that executes given operations serially. Two implementations of Executor, one using libdispatch and the other using C++11 standard library, are provided. AsyncQueue is not used anywhere in the code base at this point.
* Port FSTDocumentKeySet to C++ DocumentKeySet (#1229)Gravatar Gil2018-05-05
| | | | | | | | | * Define a Comparator for DocumentKey * Automated migration from FSTDocumentKeySet to DocumentKeySet * Manual fixups for DocumentKeySet * Delete FSTDocumentKeySet
* [De]serialize DocumentKeys via the remote Serializer (#1212)Gravatar rsgowman2018-05-04
|
* Add Immutable SortedSet in C++ (#1206)Gravatar Gil2018-05-02
| | | | | | | * Add SortedSet * Add document_key_set.h * Add equality to SortedSet
* 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.
* Define a general hashing utility in C++ (#1195)Gravatar Gil2018-05-01
| | | | | This is good enough to make it possible for the new C++ code to interoperate with existing Objective-C code where `-hash` is required if you override `-isEqual:`.
* Add key-only projections to immutable C++ maps (#1166)Gravatar Gil2018-04-24
| | | | | | * Add a simple range adapter. * Add SortedMap::keys * Add SortedMap::keys_from * Add SortedMap::keys_in
* Implement erase in C++ immutable maps (#1158)Gravatar Gil2018-04-24
| | | | * Add SortedMap::min * Add SortedMap::erase
* 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