diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-01 10:45:26 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-06 14:29:22 -0700 |
commit | 6d770cb40f1231e202b603fcc63d3b00efc3f551 (patch) | |
tree | 625c4e08551ca2539791c38cf80672faf98af304 /test | |
parent | 8e2170c8855456258de8ffd49d22a621b95e9fb2 (diff) | |
download | qtlocation-mapboxgl-6d770cb40f1231e202b603fcc63d3b00efc3f551.tar.gz |
[core] Initial state of Source::Impl::enabled must be true
Until Style::recalculate() is called to check that there are no visible layers using the source, we have to assume there are. Otherwise, Style::isLoaded() can return a false positive.
Diffstat (limited to 'test')
-rw-r--r-- | test/style/style.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/style/style.cpp b/test/style/style.cpp index b1c7d50baf..0d04fa5834 100644 --- a/test/style/style.cpp +++ b/test/style/style.cpp @@ -17,6 +17,10 @@ TEST(Style, UnusedSource) { auto now = Clock::now(); style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json")); + + // If we haven't calculated whether the source is used, we have to assume it is used. + EXPECT_FALSE(style.isLoaded()); + style.cascade(now, MapMode::Still); style.recalculate(0, now, MapMode::Still); |