Commit Graph

11 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
ddc6bc330f [tests] Add memory tests
Simple tests that will render a raster and a vector map and
hopefully the valgrind bot will detect something wrong if any.

The other test will look for application lifetime leaks that cannot
be detected with valgrind. It can also detect GL leaks if they are
very expressive.  A threshold is needed because of memory will grow
anyway due to fragmentation.
2016-06-21 19:12:32 +02:00
Thiago Marcos P. Santos
178e0e9da9 [tests] Add resources for rendering offline
The StupFileSource of the memory test will do the rendering
completely offline with a vector tile that is densly populated
with features and a raster tile of the same region.

The styles are streets and satellite respectivelly.
2016-06-21 18:58:48 +02:00
John Firebaugh
716997b99e [tests] Refactor and make MockFileSource more general
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.
2016-02-01 15:29:42 -08: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
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
Tom MacWright
6df50dba45 Font stacks as arrays 2015-08-20 11:58:57 -07:00
John Firebaugh
e42cfa239f Update test-suite and test fixtures for v8 2015-08-20 11:58:57 -07:00
Thiago Marcos P. Santos
e4cc06b798 Add test fixtures for testing raster tiles
Add a raster source for the style we use for testing that will
force requests for raster tiles.
2015-07-02 23:21:42 +03:00
Thiago Marcos P. Santos
6ef6591a52 Add MockFileSource and MockView for testing the ResourceLoader
- 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.
2015-05-22 10:44:18 +03:00