summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* [tests] Unit tests for clock skew retry timeoutThiago Marcos P. Santos2016-02-262-0/+40
|
* [tests] Add a test for the retry delay on expired responseThiago Marcos P. Santos2016-02-262-0/+36
|
* [core] Limit total number of offline Mapbox tilesJohn Firebaugh2016-02-243-0/+107
|
* [core] Enforce foreign key constraints in the offline databaseJohn Firebaugh2016-02-242-10/+33
|
* [core] Fix subtle bug in OfflineDatabase with updated resourcesJohn Firebaugh2016-02-241-13/+37
| | | | | | SQLite REPLACE is *not* UPSERT. If a conflict occurs, it first deletes the existing row, then inserts a new row. This means that AUTOINCREMENT primary keys change. This will break foreign keys to that value, which we use. Instead we must try an UPDATE, and fall back to an INSERT if the UPDATE changes zero rows.
* [core] status.requiredResourceCountIsIndeterminate ⇢ ↵John Firebaugh2016-02-241-7/+7
| | | | | | status.requiredResourceCountIsPrecise Change the name and reverse the sense. Naming things in the positive is better than naming them in the negative.
* [tests] Add utests for HTTP 200 with no dataThiago Marcos P. Santos2016-02-232-0/+29
| | | | The implementation should return a valid empty string.
* [tests] Timer is not needed to keep the main loop aliveThiago Marcos P. Santos2016-02-221-5/+0
| | | | The loop will be alive until `.stop()` is called.
* [gyp] Use variant compiler flags when neededBruno de Oliveira Abinader2016-02-211-0/+1
|
* [gyp] Coverage only if BUILDTYPE=Debug and ENABLE_COVERAGE=1Bruno de Oliveira Abinader2016-02-211-18/+15
| | | | | | | | Coverage compiler and linker flags are used only when (1) in debug build and (2) with ENABLE_COVERAGE set to 1. Besides, because OS X's libtool is unable to understand '--coverage', this linker flag is only used genrating executable targets. Also, using 'link_settings' to specify linker options and separate instructions for OSX and Linux.
* [tests] Use ENABLE_COVERAGE=1 envvar to enable coverageBruno de Oliveira Abinader2016-02-191-1/+5
| | | | This detaches coverage data collection from typical debug build.
* [core] Remove ThreadContext::getFileSource; instead thread FileSource throughJohn Firebaugh2016-02-184-21/+21
|
* Revert "[gl] Updated CustomLayer tests"John Firebaugh2016-02-181-24/+30
| | | | | | These tests are intended to reflect how someone using the custom layer feature might actually write their callbacks. Therefore the callbacks should not use mbgl-specific classes. This reverts commit 69112a2a09404cc0ee7089a9f1f81ff1feac586f.
* [osx] Enable coverage support for debug buildBruno de Oliveira Abinader2016-02-181-0/+7
|
* [gl] Updated CustomLayer testsBruno de Oliveira Abinader2016-02-181-26/+24
|
* [gl] Moved TexturePool to gl namespaceBruno de Oliveira Abinader2016-02-181-2/+2
|
* [tests] Fix compilation error in test/storage/headers.cppBruno de Oliveira Abinader2016-02-161-13/+13
| | | | | | error: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Werror=conversion-null]
* [core] Remove RunLoop::{ref,unref}John Firebaugh2016-02-161-44/+0
|
* [tests] Add test for Map::updatePointAnnotationJohn Firebaugh2016-02-123-3/+21
|
* [ios, osx] Consolidate remaining files in platform/{ios,osx}John Firebaugh2016-02-12312-26490/+0
|
* [tests] Fix buildJohn Firebaugh2016-02-114-4/+4
|
* Allow using tileSize: 512 as a switch to trade retina support for 512px ↵Young Hahn2016-02-112-18/+38
| | | | raster tiles
* [core] Always store tiles without ratio support with ratio = 1John Firebaugh2016-02-101-8/+18
|
* [core] Optimize offline database schemaJohn Firebaugh2016-02-101-5/+6
| | | | | * Under the hood, SQLite creates surrogate keys (ROWID) anyway. We may as well take advantage of this and use the surrogates for foreign keys as well, since they are simpler and more efficient than compound foreign keys. * Create indexes for efficient eviction queries
* [core] Retry errors encountered during offline downloadsJohn Firebaugh2016-02-103-13/+48
|
* [core] Eliminate maximumCacheEntrySizeJohn Firebaugh2016-02-101-26/+44
| | | | Instead, the eviction policy accounts for the actual size needed for an incoming put.
* [core] Implement an eviction policy for OfflineDatabaseJohn Firebaugh2016-02-101-0/+72
| | | | | | | | | | | | | When inserting an cached resource, or removing a region, remove least-recently used resources and tiles, not used by offline regions, until the used database size, as calculated by multiplying the number of in-use pages by the page size, is less than the maximum cache size minus 5 times the page size. In addition, OfflineDatabase may be configured to ignore cache puts of individual resources larger than a certain size. This policy is similar but not identical to the former SQLiteCache policy: * It accounts for offline, by exempting resources required by offline regions from eviction. * It must delete from two tables (resources and tiles), rather than one. Currently the strategy is naive: evict 50 rows at a time from each table. * It makes maximumCacheSize and maximumCacheEntrySize completely independent. The SQLiteCache implementation evicted when `usedSize > maximumCacheSize - 2 * maximumCacheEntrySize`. This evicts when `usedSize > maximumCacheSize - 5 * pageSize`. * It uses a non-unlimited default value for maximumCacheSize: 50 MB. We should have always had a limit in place; "a cache without an eviction policy is a resource leak".
* [core] Reset SQLite statements after use in order to release locksJohn Firebaugh2016-02-101-0/+32
|
* Add binary for smoke-testing offline downloadsJohn Firebaugh2016-02-101-17/+0
|
* [core] Interface and implementation for offlineJohn Firebaugh2016-02-108-0/+489
|
* [all] Don't interpret 404s on non-tile resources as "no content"John Firebaugh2016-02-104-7/+119
|
* [all] Do not set Response data for 404sJohn Firebaugh2016-02-102-6/+3
| | | | For AssetFileSource and the node FileSource this was already the case; this makes the other implementations consistent.
* [core] Reimplement existing caching within an offline-capable database schemaJohn Firebaugh2016-02-1026-1074/+486
|
* [core] Cache with mapbox:// tile URLsJohn Firebaugh2016-02-104-100/+68
|
* [core] Moving caching logic to DefaultFileSourceJohn Firebaugh2016-02-1017-63/+52
| | | | This results in OnlineFileSource containing precisely the logic we want for reuse by OfflineFileSource, and no more.
* [core] Add a method for statically evaluating font stacks used by a styleJohn Firebaugh2016-02-102-0/+48
|
* [core] Refactor tileCoverJohn Firebaugh2016-02-102-0/+119
|
* [core] compute the actual clipping masks that we have to draw with getStencils()Konstantin Käfer2016-02-101-20/+180
|
* [tests] Add test for AssetFileSource URL encodingJohn Firebaugh2016-02-081-0/+21
|
* [core] Remove Response::Error::Reason::CanceledJohn Firebaugh2016-02-041-1/+0
| | | | There is no such thing as a cancelled response, only cancelled requests. A request that is cancelled does not have its callback called with a Response.
* [tests] Don't call the callback for cancelled responsesJohn Firebaugh2016-02-045-15/+17
| | | | | | StubFileSource gets an optional Response return type. Returning null means "cancelled; don't call the callback". Fixes #3784
* [all] Make #include <mapbox/variant.hpp> universally accessibleJohn Firebaugh2016-02-041-1/+0
|
* [core] Make bool conversions explicitJohn Firebaugh2016-02-031-2/+1
| | | | Implicit bool conversions are bad; they'll be used e.g. for a == b and a != b if those operators are not defined. This was happening at https://github.com/mapbox/mapbox-gl-native/blob/032c8fba3c8e3c122dd399b5c9341d92ad9d286f/src/mbgl/map/transform.cpp#L132-L132, for example.
* [core] Improve LatLngBounds APIJohn Firebaugh2016-02-022-25/+101
| | | | | | | * Use "named constructors": empty, world, hull * Make the two-argument constructor lenient (i.e., it is a hull operation) * Add various accessors * Enforce a single empty representation
* [tests] Reorganize tests to match src structureJohn Firebaugh2016-02-0224-23/+24
|
* [core] Normalize only raster source tile URLsJohn Firebaugh2016-02-013-0/+44
|
* [tests] Refactor and make MockFileSource more generalJohn Firebaugh2016-02-0112-550/+592
| | | | | | Now it works more like StubStyleObserver: you can assign std::functions to specific slots based on resource type. Rewrite resource loading tests in that style, making them less like integration tests of Style and more like unit tests of Source, GlyphStore, and SpriteStore.
* [core] Rationalize Resource initializationJohn Firebaugh2016-01-292-0/+51
|
* [core] Move rapidjson document creation into StyleParserJohn Firebaugh2016-01-281-6/+1
|
* Cleanup std::chrono usageBruno de Oliveira Abinader2016-01-256-26/+25
| | | | Use mbgl::Duration and mbgl::{,Milli}Seconds whenever possible.