summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Fit to coordinatesMinh Nguyễn2015-06-261-0/+21
| | | | Whoever determined the boundaries of the District of Columbia did not have fit-to-bounds implementations in mind. With this change, shapes that are not unrotated rectangles fit much, much better.
* currentState() ⇢ getState()John Firebaugh2015-06-261-1/+1
|
* Move Transform from MapData to MapJohn Firebaugh2015-06-263-17/+10
| | | | | Pass current state to MapContext where needed. Remove mutex from Transform.
* drive map rendering from main threadKonstantin Käfer2015-06-263-16/+6
|
* Test fit to bounds; added MGLCoordinateBounds functionsMinh Nguyễn2015-06-251-0/+35
| | | | Added a bunch of functions to work with MGLCoordinateBounds in a separate header analogous to MKGeometry.h. Added resolution-independent tests for common fit to bounds scenarios.
* Reversed direction to be clockwiseMinh Nguyễn2015-06-251-1/+1
| | | | | | For consistency with MapKit, the Google Maps SDK, and these methods’ own documentation. Fixes #1780.
* Be more strict on escaping at the test regexThiago Marcos P. Santos2015-06-251-4/+4
| | | | | | | | Apparently libc++ is more strict about escaping than libstdc++. Also, restrict the set of tiles we expect to the only possible tiles.
* Get rid of Environment et al.Thiago Marcos P. Santos2015-06-251-8/+2
| | | | | mbgl::Environment is not used anymore and can removed.
* Make the FileSource available from the ThreadContextThiago Marcos P. Santos2015-06-251-0/+1
| | | | | | For now we set the FileSource for the Worker context but in the future after fixing #1664 we can assert() that FileSource are set only for the Map thread context.
* Add unit tests for ThreadContextThiago Marcos P. Santos2015-06-251-0/+29
|
* Introduce the ThreadContextThiago Marcos P. Santos2015-06-254-4/+4
| | | | | | | | | mbgl::Thread will keep a ThreadContext for each running instance in a thread_local so we don't need to lookup a man in the Environment every time we need some info about the current thread. This patch is moving the ::currentlyOn check used on Debug build from the Environment class to the ThreadContext.
* Transform needs only a single TransformStateJohn Firebaugh2015-06-241-6/+4
|
* Fix result value from parseProperty when T = std::array<float, 2>Bruno de Oliveira Abinader2015-06-222-0/+25
|
* Fix resource loading flaky testThiago Marcos P. Santos2015-06-221-14/+15
| | | | | | | | | | When testing failed vector tiles requests, we check for error messages of a very specific tiles, but mbgl will requests 4 tiles. We might get the error callback before the tile we are checking for reports error, so the test fails. Now we use a regex to match the log message we are looking for.
* Use a pipe() to synchronize the server initializationThiago Marcos P. Santos2015-06-183-5/+29
| | | | As the signals are intercepted by debuggers.
* Remove cleanup call on the ResourceLoading test caseThiago Marcos P. Santos2015-06-181-1/+0
| | | | | We should not be able to create GL objects with a no-op view, so there is nothing to cleanup.
* Add tests for renderStill() misuseThiago Marcos P. Santos2015-06-162-1/+62
|
* Add location tests for iOSJason Wray2015-06-1511-3/+390
| | | | | | | | - Adds testDelegatesStartStopLocatingUser: Tests mapViewWillStartLocatingUser and mapViewDidStopLocatingUser delegate methods - Adds testUserTrackingModeFollow - Adds testUserTrackingModeFollowWithHeading (disabled because of library bug) Fakes user location via swizzled CLLocationManager and hard-coded mock coordinates and heading.
* update test suite to reenable symbol testsAnsis Brammanis2015-06-111-0/+0
|
* allow constructing LatLng/LatLngBounds objects from TileIDsKonstantin Käfer2015-06-082-0/+62
|
* Test Map object destruction with pending requestsThiago Marcos P. Santos2015-06-044-34/+188
| | | | | | | | | | | Test whenever destroying a Map object with requests pending works and is done quickly. The test injects artificial delays in selected requests and tries to destroy the Map object afterwards. Currently glyph requests are skipped because there is a bug being worked on in a different issue.
* Cleanup the MapContext before the util::Thread destructorThiago Marcos P. Santos2015-06-041-0/+1
| | | | | | | | | | The util::Thread will call the stop() method of the MapContext's RunLoop which will wait for the pending tasks tied to it to complete. If we have a request that is timeout'ing, this could mean a really long wait. Instead, we now send a cleanup message that will reset all the attributes first (canceling the pending requests) so the the MapContext gets destructed quickly.
* Merge remote-tracking branch 'origin/master' into HEADAnsis Brammanis2015-06-038-83/+55
|\ | | | | | | | | Conflicts: src/mbgl/renderer/painter_fill.cpp
| * Do not call update() asynchronously on the test caseThiago Marcos P. Santos2015-06-021-6/+2
| | | | | | | | | | | | We need to call it before checking if the tiles are loaded to give the Source a chance to request for more tiles if it is needed.
| * Rebase the resource loading testsThiago Marcos P. Santos2015-06-025-45/+26
| | | | | | | | | | Update the ResourceLoader tests to reflect the changes after we merged ResourceLoader with Style.
| * Merge ResourceLoader into Style and move atlas ownershipJohn Firebaugh2015-06-012-17/+12
| |
| * Adapt metrics tests to constant flush timerJason Wray2015-05-282-15/+15
| | | | | | | | | | | | | | | | Disables three tests: - testTimerFiresFlush: passes but takes 60 seconds (full MGLFlushInterval) - testFlushPostsEvents: fails - testPostEventsNetworkRequest: fails
* | update test suiteAnsis Brammanis2015-06-021-1/+0
| |
* | Merge remote-tracking branch 'origin/master' into new-labellingAnsis Brammanis2015-05-2828-31/+781
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mbgl/map/source.cpp src/mbgl/map/source.hpp src/mbgl/map/tile_data.cpp src/mbgl/map/tile_parser.cpp src/mbgl/map/vector_tile_data.cpp src/mbgl/renderer/painter.cpp src/mbgl/renderer/symbol_bucket.cpp src/mbgl/text/glyph.hpp src/mbgl/text/glyph_store.cpp src/mbgl/text/placement.cpp test/suite
| * Add tests for handling corrupted dataThiago Marcos P. Santos2015-05-283-32/+98
| | | | | | | | | | | | | | The MockFileSource will insert garbage on the reply and report as a request done successfully. The network stack cannot detect this kind of errors but the consumer should report it like we do for network problems.
| * Replace mbgl::util::make_unique<> with std::make_unique<>Konstantin Käfer2015-05-269-26/+24
| |
| * Merge pull request #1627 from mapbox/hide_logsThiago Marcos P. Santos2015-05-221-2/+29
| |\ | | | | | | Add check for log messages on ResourceLoader tests
| | * Add check for log messages on ResourceLoader testsThiago Marcos P. Santos2015-05-221-2/+29
| | | | | | | | | | | | | | | This will make the tests less verbose and at the same time make sure we are logging properly.
| * | Do not call abandon texture if there is no textureThiago Marcos P. Santos2015-05-221-2/+0
| |/ | | | | | | | | Check if the texture was created before abandoning on SpriteAtlas destructor. Linux driver was fine with that, but was crashing on Mac.
| * Add ResourceLoader unit testsThiago Marcos P. Santos2015-05-222-0/+155
| | | | | | | | | | | | This first test will simulate a request failure on every resource directly or indirectly loaded by the ResourceLoader. The idea is to verify whenever we are failing gracefully or not.
| * Add MockFileSource and MockView for testing the ResourceLoaderThiago Marcos P. Santos2015-05-2210-0/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - MockFileSource Will load pre-defined resources from the filesystem. It supports passing a string, that when it matches an URL, will simulate a failure. - MockView It is just a no-op to not get in the way when testing resource loading. Few more additions: - style.json Specially crafted style that will look always for the same tile, glyph range, etc at the "test/fixtures/resources/" path. No matter where you look (or at what zoom), you always get the same stuff. - vector.pbf This taken from a part of Taipei that will request several glyph ranges.
| * Add callback for error notifications on renderStill()Thiago Marcos P. Santos2015-05-222-3/+3
| | | | | | | | | | | | | | | | | | The callback will be called when any of the resources requested from the network failed to load. There is not recovery implemented yet, so the closest thing to reseting the Map object and reloading all the resources would be setting a new style.
| * Add Thread tests; get argument transfer working for all casesJohn Firebaugh2015-05-212-1/+104
| |
| * Change LaunchScreen text to © because unicode is awesomeJason Wray2015-05-211-1/+1
| |
| * Add iOS test project launch images for older devices, tooJason Wray2015-05-215-0/+219
| |
| * Add iOS tests support for iPhone 6/6+ screen sizesJason Wray2015-05-213-4/+55
| |
| * Update tests for access token changesJason Wray2015-05-214-10/+5
| |
| * Update test suiteJohn Firebaugh2015-05-191-0/+0
| |
| * bump test suiteKonstantin Käfer2015-05-191-0/+0
| |
* | Reparse tiles when zoom level > source maxzoomAnsis Brammanis2015-05-283-103/+104
| | | | | | | | | | | | | | | | | | | | so that layout property functions are applied correctly and so that label placement is redone js: https://github.com/mapbox/mapbox-gl-js/pull/1005 and https://github.com/mapbox/mapbox-gl-js/commit/440bc02505eb66f198a3d98708ddc3d9453f453f
* | Merge branch 'master' into new-labellingAnsis Brammanis2015-05-19269-344/+22122
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mbgl/map/tile_parser.cpp src/mbgl/map/tile_parser.hpp src/mbgl/renderer/painter.hpp src/mbgl/renderer/painter_symbol.cpp src/mbgl/renderer/symbol_bucket.cpp src/mbgl/renderer/symbol_bucket.hpp src/mbgl/text/collision.cpp src/mbgl/text/collision.hpp src/mbgl/text/placement.cpp
| * Privatized MGLMapboxEventsMinh Nguyễn2015-05-182-1/+2
| | | | | | | | `-pauseMetricsCollection` and `-resumeMetricsCollection` were originally introduced to mitigate concerns around battery usage, but `MGLMapboxEvents` has since evolved to tread much lighter on the battery. There’s no longer any need for the client to call these methods directly. The iOS test project now includes MGLMapboxEvents.h explicitly to avoid having to package a header that will go unused.
| * Render translucent background layers (fixes #1514)John Firebaugh2015-05-151-0/+0
| |
| * Removed unneeded unique_ptrThiago Marcos P. Santos2015-05-151-5/+3
| |
| * Make the MapContext object run on its own thread on the testsThiago Marcos P. Santos2015-05-151-5/+7
| | | | | | | | | | | | The MapContext can only run on its own thread because it is registering a EnvironmentScope and it is making many assertions on Debug mode if its methods are being called on the Map thread.