summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* [core] Stop download when tile limit is reachedJesse Bounds2016-03-171-4/+60
| | | | | | | | The tile limit guard (when used) stops a download from continuing when the tile limit is reached. This wraps the guard in a method and employs it in both places currently necessary to ensure the guard has a chance to function. Tests have been updated to ensure the fix works for a less trivial tile limit scenario.
* [core] Implement a vacuum strategy for the offline databaseJohn Firebaugh2016-03-172-0/+28
| | | | Enable `PRAGMA auto_vacuum = INCREMENTAL`, and perform a `PRAGMA incremental_vacuum` when deleting an offline region.
* [core] Deactivate offline region upon completionMinh Nguyễn2016-03-111-6/+15
|
* [core] Fix non-anchored Transform::setAngleBruno de Oliveira Abinader2016-03-111-12/+17
| | | | | This reverts a line change from b33b2f15, because we explicitely want the anchor to be invalid.
* [core] Fix screen coordinates when crossing the antimeridian (#2)Bruno de Oliveira Abinader2016-03-111-0/+16
| | | | Added missing case. Really fixes #4155 this time.
* [core] Make vec{2,3,4} operator bool explicitBruno de Oliveira Abinader2016-03-111-3/+3
|
* [core] Fix screen coordinates when crossing the antimeridianBruno de Oliveira Abinader2016-03-101-0/+22
| | | | | | | | | If the center and point coordinates are not in the same side of the antimeridian, we need to unwrap the point longitude to make sure it can still be seen from the visible side of the antimeridian that is opposite to the center side. Fixes #4155.
* [core] Check for NaNs in EdgeInsetsBruno de Oliveira Abinader2016-03-101-2/+36
|
* [core] Coordinate wrapping fixesBruno de Oliveira Abinader2016-03-102-6/+38
| | | | | | | | | | | | | | | - Make returning LatLngs unwrapped by default. - PointAnnotation and ShapeAnnotation are always wrapped so they can be selected via intersection from the visible tile boundaries. - Fixes LatLng::wrap() calculation. - Fixes LatLng::unwrapForShortestPath() calculation. The new unwrapForShortestPath algorithm unwraps the start coordinate either forwards or backwards depending on the end coordinate value, so we can always cross the antimeridian when needed and still obtain a wrapped end coordinate in the end. Fixes #4214.
* [core] Deactivate OfflineDownload when the tile count limit is hitJohn Firebaugh2016-03-091-1/+13
| | | | This is a better behavior than sending hundreds or thousands of tileCountLimitExceeded notifications.
* [core] Fix offline status reporting regressionsJohn Firebaugh2016-03-081-12/+38
| | | | | | The core of the change is ensuring that ensureResource doesn't release Zalgo: it should be consistently async, rather than async in the case that the resource doesn't exist in the database, but sync if it does. This ensures that status is reported in a more consistent sequence, regardless of the database state.
* [core] Fix RunLoop::run() behavior when called a second timeJohn Firebaugh2016-03-081-0/+21
|
* [tests] Add utest for NetworkStatus::Online/OfflineThiago Marcos P. Santos2016-03-081-0/+33
|
* [core] Remove goOffline() from DefaultFileSourceThiago Marcos P. Santos2016-03-081-1/+4
| | | | Use the newly added NetworkStatus::Set().
* [core] Ensure OfflineRegionStatus::downloadState is accurately reportedJohn Firebaugh2016-03-071-0/+31
|
* [core] explicitly initialize a few fields to nullKonstantin Käfer2016-03-041-2/+2
|
* [core] Fix offline status reporting with pre-existing tiles (#4147)John Firebaugh2016-03-041-0/+75
|
* [core] Moved TileCoordinate to tile cover scopeBruno de Oliveira Abinader2016-03-011-6/+10
|
* [core] Moved wrapping to LatLng scopeBruno de Oliveira Abinader2016-03-011-0/+23
| | | | Fixes a precision loss when converting unwrapped LatLngs.
* [core] PrecisionPoint is now ScreenCoordinateBruno de Oliveira Abinader2016-03-011-7/+7
|
* [core] Enforce constants usageBruno de Oliveira Abinader2016-03-012-31/+33
| | | | | Use 'LATITUDE_MAX', 'LONGITUDE_MAX', 'DEG2RAD' and 'RAD2DEG' whenever possible.
* [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
|