Commit Graph

559 Commits

Author SHA1 Message Date
Minh Nguyễn
1a501d4ec4 Happy new year! 2016-01-05 14:01:58 -08:00
Thiago Marcos P. Santos
6af69e4e56 [tests] Added utests for cache versioning 2016-01-05 17:32:46 +02:00
Konstantin Käfer
0377e23c20 [test] terminate test server when stdin closes 2016-01-05 14:14:23 +01:00
John Firebaugh
79368a0ecf [test] Remove terminate-when-inactive behavior from the test server
It caused #3163.

Attempts at having the child exit automatically when the parent exits were stymied
by the fact that unix sucks: http://stackoverflow.com/q/284325/52207.
2016-01-04 17:27:01 -08:00
Thiago Marcos P. Santos
e6dc4fe49d [tests] Add unit tests for SQLiteCache size limit 2015-12-28 14:48:02 +02:00
John Firebaugh
845699e698 [tests] Simplify MockFileSource 2015-12-24 08:17:42 -08:00
John Firebaugh
338f94e7ed [tests] Rewrite {Sprite,Glyph}Store tests in the style of ResourceLoading 2015-12-24 08:17:42 -08:00
John Firebaugh
7a6076ea9d [tests] Test with OnlineFileSource
When we introduce OfflineFileSource, the behavior of existing tests should
not change.
2015-12-23 14:55:12 -08:00
John Firebaugh
16de579d7c [core] Rationalize error handling for resource loading
* Standardize on std::exception_ptr as the error representation
  (fixes #2854).
* Don't format textual strings at the error source; pass on the
  constituent data via observer method parameters instead.
* Use the null object pattern to simplify observer notification code.
* Further refactoring for ResourceLoading tests.
2015-12-23 12:50:42 -08:00
Bruno de Oliveira Abinader
2e69d95c6b [tests] Moved lazy source loading tests to ResourceLoading 2015-12-23 10:54:05 -04:00
John Firebaugh
7c22792bdf [tests] Rewrite resource loading test
Make it more readable and easier to debug.
2015-12-22 18:00:30 -08:00
John Firebaugh
b60b6c47c0 [core] Merge SQLiteCache into the platform library
OfflineFileSource will depend on SQLite too.
2015-12-22 12:09:14 -08:00
Thiago Marcos P. Santos
373916420a [tests] Create less threads on the AsyncTask tests
So we open less fds as new versions of OSX have
a smaller limit (256).
2015-12-21 22:22:11 +02:00
Bruno de Oliveira Abinader
3e00ab1582 [core] Add more tests to on-demand source load 2015-12-17 18:15:06 -08:00
Bruno de Oliveira Abinader
9d3fe01991 [core] Tests for style with unused sources 2015-12-17 16:53:37 -08:00
Bruno de Oliveira Abinader
93725e062a [core] Load sources only if there is at least one visible layer 2015-12-17 16:53:37 -08:00
Minh Nguyễn
e304033552 [core] Fixed annotation icon replacement
Another pass at #3146, including a unit test.
2015-12-15 21:04:15 -08:00
Konstantin Käfer
95cef66e22 [core] change RapidJSON usage to use CrtAllocator and bump GeoJSON VT 2015-12-14 16:43:35 -08:00
Konstantin Käfer
2f973d0a7e [core] parse GeoJSON source type 2015-12-11 16:23:42 -08:00
John Firebaugh
65b3220368 [core] Reduce custom layer API to lowest common denominator 2015-12-11 12:44:54 -08:00
Thiago Marcos P. Santos
37ca365469 [tests] Force classic locale on toString tests
Fix an issue where the test result can be affected
depending on the current locale settings of the
machine running the tests.
2015-12-10 18:25:51 -08:00
John Firebaugh
bde07c8f0e [core] Custom layers 2015-12-09 13:51:28 -08:00
John Firebaugh
e04c5f6506 [core] Replace StyleLayerType with RTTI 2015-12-07 18:22:33 -08:00
John Firebaugh
0a0007e0ac [core] More efficient layer cloning 2015-12-07 11:19:08 -08:00
Konstantin Käfer
478472e501 [core] add std::move to constructors 2015-12-03 15:38:36 +01:00
Konstantin Käfer
d5fb535058 [core] add namespace comment to closing brace 2015-12-03 15:38:36 +01:00
Konstantin Käfer
6feb89cbbc [core] fix various errors reported by clang-tidy 2015-12-03 15:38:36 +01:00
Konstantin Käfer
dc620f48de [core] Fix std::move() misuse that disables copy elision 2015-12-03 15:38:36 +01:00
John Firebaugh
e5181e2668 [core] Use optional where SpriteAtlas return values might not exist
Fixes #3162
2015-12-01 18:05:54 -08:00
John Firebaugh
8afa14fa78 [core] Map::setSprite ⇢ Map::addAnnotationIcon
Fixes #3084
2015-12-01 15:10:28 -08:00
Adam Hunter
e1091db45e [core] Use a separate atlas and store for annotation sprites
Fixes #1488
2015-12-01 09:15:05 -08:00
John Firebaugh
58886842bc [core] Move MapData storage to MapContext
This allows MapData members to hold GL resources which must be released
on the MapContext thread -- necessary for the following commit.
2015-12-01 09:15:05 -08:00
John Firebaugh
f27c28b6c4 Partially revert "[core] Source should receive a ref to MapData just once"
This partially reverts commit d55aa7929c.
2015-12-01 09:07:03 -08:00
Thiago Marcos P. Santos
3d07aaf95d [core] Don't link with libuv on components not using it directly 2015-12-01 11:49:02 +02:00
Thiago Marcos P. Santos
7caaebb162 [tests] Fix/improve Asset utests
ASSET=zip make test-* was broken and now works.

Also added a test stressing concurrent file access.
2015-12-01 11:49:02 +02:00
Thiago Marcos P. Santos
c117b7e3f4 [core] Removed libuv dependency from AssetFSContext 2015-12-01 11:49:02 +02:00
Thiago Marcos P. Santos
8d3fd199b2 [tests] Add utests for ThreadLocal 2015-12-01 11:49:02 +02:00
Thiago Marcos P. Santos
cb06526b10 [tests] Remove libuv dependency from the tests 2015-12-01 11:49:02 +02:00
Thiago Marcos P. Santos
ff47838474 [tests] Add utests for Timer 2015-12-01 11:49:01 +02:00
Thiago Marcos P. Santos
6762cd0ca9 [tests] Add utests for AsyncTask 2015-12-01 00:00:09 +02:00
John Firebaugh
12fc949006 [tests] Don't use icons from the style for annotations 2015-11-30 12:40:09 -08:00
Bruno de Oliveira Abinader
d55aa7929c [core] Source should receive a ref to MapData just once 2015-11-27 17:47:02 +02:00
Bruno de Oliveira Abinader
31fd2822f5 [core] Replace time_t with std::chrono::seconds
Added aliases for std::chrono typedefs (eg. 'Seconds' for
std::chrono::seconds). These aliases are used together with templated
helper functions to replace time_t with std::chrono::seconds for most
cases, in particular for 'modified' and 'expires' values in Response.
2015-11-27 17:47:02 +02:00
John Firebaugh
1d33790dc0 [core] Fix image type of Map::renderStill
It's a premultiplied image. This implies that we were misusing encodePNG
in most cases, as we were passing premultiplied pixels which were then
interpreted as unmultiplied. I changed encodePNG to accept premultipled
pixels, and unpremultiply in the implementations.
2015-11-25 15:57:37 -08:00
John Firebaugh
ed5eb9edc1 [test] Add pixelmatch; use in annotation tests 2015-11-25 15:57:37 -08:00
John Firebaugh
54eff4b4c1 [core] Add image tests 2015-11-25 15:57:36 -08:00
John Firebaugh
0c1e378bc9 [core] Rewrite image handling
* Consolidate Image and StillImage
* Typecheck unassociated vs premultiplied images
* Rewrite default platform image decoding implementation
2015-11-25 15:57:36 -08:00
Minh Nguyễn
e3992c41c3 [iOS] Wait for didChange notifications instead of timer 2015-11-25 14:39:32 -08:00
John Firebaugh
36081f6486 [core] For binary image data use uint8_t, not char 2015-11-23 17:28:44 -08:00
Konstantin Käfer
b5f7cafab4 [core] more robust max-age parsing 2015-11-20 14:39:44 +01:00