- 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.
22 lines
378 B
C++
22 lines
378 B
C++
#ifndef TEST_RESOURCES_MOCK_VIEW
|
|
#define TEST_RESOURCES_MOCK_VIEW
|
|
|
|
#include <mbgl/map/view.hpp>
|
|
|
|
namespace mbgl {
|
|
|
|
class MockView : public View {
|
|
public:
|
|
MockView() = default;
|
|
|
|
// View implementation.
|
|
void activate() override {};
|
|
void deactivate() override {};
|
|
void notify() override {};
|
|
void invalidate(std::function<void()>) override {};
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|