Commit Graph

80 Commits

Author SHA1 Message Date
Kevin Ring a59ffac3ef A few more test cases, and tweak the logic so they pass. 2023-07-27 22:00:58 +10:00
Brian L 8abe88353a Add support for cases where we only need Etag or Last-Modified to cache 2023-07-26 09:52:51 -06:00
Brian L 53689f1123 Modify shouldCacheRequest for additional no-cache cases. Add more unit tests 2023-07-25 12:21:13 -06:00
Brian L 018a7380b8 Refactor using std::optional. Fixup unit tests 2023-07-25 11:11:23 -06:00
Brian L 29f2625708 Add unit tests similar to Google 3D Tiles response headers 2023-07-22 10:06:35 -06:00
Brian L ce3bd6ff5a Fix for unit tests (function rename) 2023-07-21 15:45:49 -06:00
Kevin Ring 35db73e0cb Fix another warning. 2023-06-01 12:29:44 +10:00
Kevin Ring 4c0f85e897 Fix warning on VS2017 and VS2019. 2023-06-01 12:08:56 +10:00
Kevin Ring 224f392c31 Cleanup and tests. 2023-06-01 11:45:24 +10:00
Kevin Ring 77c7badf9e Add _CRT_SECURE_NO_WARNINGS to test file.
Previously tinyxml2 was doing this for all our source files.
2023-01-20 16:39:00 +11:00
Kevin Ring cc75a318d1 Fix GCC/Clang compiler error. 2022-10-16 00:34:00 +11:00
Kevin Ring f498c631de startRequest -> reqest. 2022-01-20 11:08:23 +11:00
Kevin Ring 518b7cbaf0 Rename IAssetAccessor methods, allow use of any verb. 2022-01-20 11:00:29 +11:00
Kevin Ring 0eaed9270f Fix mac segfault by putting repeated types in unnamed namespace. 2021-11-24 19:19:56 -05:00
Nithin Pranesh 664f08370f Move forward arbitrary future time to fix test 2021-10-21 13:39:40 -04:00
Marco Hutter 0e827f7afd Updated includes based on clang-format with Regroup
This MAINLY inserted some blank lines between
the blocks.
2021-09-26 17:46:27 +02:00
Kevin Ring c2aa1885cd Add `Future::isReady`. 2021-08-23 19:44:36 +10:00
Kevin Ring b64e7dc0d3 Revert "Add Future::isReady."
This reverts commit 168f2c21aa.
2021-08-23 19:43:43 +10:00
Kevin Ring 168f2c21aa Add Future::isReady. 2021-08-23 19:40:23 +10:00
Kevin Ring 883c40f4aa Enabling chaining to another Future in a catch. 2021-07-23 15:43:51 +10:00
Kevin Ring b7df34b49c Allow catching a shared future. 2021-07-23 13:41:35 +10:00
Kevin Ring f1ea6bd4ea Allow use of `all` with SharedFutures. 2021-07-16 15:27:58 +10:00
Kevin Ring 3f45992843 More tests for SharedFuture 2021-07-16 12:36:54 +10:00
Kevin Ring ae04eb1f8c Fix build. 2021-07-16 12:28:53 +10:00
Kevin Ring 858f7ef5eb WIP SharedFuture 2021-07-15 23:37:55 +10:00
Kevin Ring e89b5f01f6 Formatting. 2021-07-15 18:03:13 +10:00
Kevin Ring 2079b56624 Add catchImmediately, more tests. 2021-07-15 18:02:00 +10:00
Kevin Ring 7dff5a9fc9 Formatting. 2021-07-15 14:06:58 +10:00
Kevin Ring 7f6f1e3687 Add `all` method to AsyncSystem. 2021-07-15 14:06:29 +10:00
Kevin Ring d836b63b51 Rename dispatchZeroOrOneMainThreadTask to dispatchOneMainThreadTask.
And also improve its doc.
2021-07-14 17:01:51 +10:00
Kevin Ring ad11fffb42 Add specialization for Promise<void>. 2021-07-07 14:40:10 +10:00
Kevin Ring a1ebce1dcd Allow direct creation of a Promise.
Rather than the JavaScript-like create a future by providing a callback
that is given a promise. This can be less exception safe (allow
exceptions to escape from a Future-returning method instead of being
turned into Promise rejection) but also tends to be much easier to work
with.
2021-07-07 14:12:15 +10:00
Kevin Ring b2ac5a70f6 Fix a race condition in a test. 2021-07-07 00:53:54 +10:00
Kevin Ring 355c486683 Make Future::wait return T and throw on reject. 2021-07-06 23:29:59 +10:00
Kevin Ring 17a16a4dc7 AsyncSystem test improvements. 2021-07-06 22:12:42 +10:00
Kevin Ring 490114c648 Add some tests for AsyncSystem. 2021-07-06 19:01:46 +10:00
Kevin Ring 4e45bab460 Use angle brackets to #include catch2. 2021-07-04 22:57:11 +10:00
Kevin Ring e0865d075a Formatting. 2021-06-22 20:44:54 +10:00
Kevin Ring 43c5b3d474 Fix test failures. 2021-06-22 18:17:32 +10:00
Jordi Torres 6333b1cb0a First pass of clang tidy
Mainly caching else after return, not using empty() instead of size() == 0, missing const references to avoid copies and removing redundant initializations
2021-04-12 13:22:03 +02:00
Shehzan Mohammed 8a2957d32f Run clang format 2021-03-08 20:39:46 -05:00
Marco Hutter f1078aeb4c Use bytes for raw data 2021-03-04 17:22:38 +01:00
Kevin Ring 2e42fd45fb Adjust for recent changes in master. 2021-02-24 13:54:33 +11:00
Kevin Ring b14aa5e292 Make ResponseCacheControl private. 2021-02-23 15:11:08 +11:00
Kevin Ring e24f817b02 Add missing override. 2021-02-22 19:17:15 +11:00
Kevin Ring aa95beea21 CacheItem cleanup. 2021-02-22 17:58:36 +11:00
Kevin Ring 1b8bbabf8e Fix tests. 2021-02-22 17:33:24 +11:00
Kevin Ring 71df49a8d8 DiskCache class -> SqliteCache. 2021-02-22 13:37:58 +11:00
Kevin Ring c46dc68bfb DiskCache -> SqliteCache 2021-02-22 13:36:58 +11:00
Kevin Ring 711810a18f Fix test failures. 2021-02-22 13:23:27 +11:00