Skip to content

Commit

Permalink
More test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mwilsnd committed May 17, 2024
1 parent cf61ca0 commit 0003545
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/style/source.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class SourceTest {
AnnotationManager annotationManager{style};
std::shared_ptr<ImageManager> imageManager = std::make_shared<ImageManager>();
std::shared_ptr<GlyphManager> glyphManager = std::make_shared<GlyphManager>();
std::shared_ptr<Scheduler> threadPool = Scheduler::GetBackground();
TaggedScheduler threadPool;

TileParameters tileParameters(MapMode mapMode = MapMode::Continuous) {
return {1.0,
Expand All @@ -78,7 +78,7 @@ class SourceTest {
0};
};

SourceTest() {
SourceTest() : threadPool(Scheduler::GetBackground(), this) {
// Squelch logging.
Log::setObserver(std::make_unique<Log::NullObserver>());

Expand All @@ -88,7 +88,7 @@ class SourceTest {
transformState = transform.getState();
}

~SourceTest() { threadPool->waitForEmpty(); }
~SourceTest() { threadPool.waitForEmpty(); }

void run() { loop.run(); }

Expand Down Expand Up @@ -781,8 +781,8 @@ class FakeTileSource : public RenderTileSetSource {
MOCK_METHOD1(tileSetNecessity, void(TileNecessity));
MOCK_METHOD1(tileSetMinimumUpdateInterval, void(Duration));

explicit FakeTileSource(Immutable<style::Source::Impl> impl_, std::shared_ptr<Scheduler> threadPool_)
: RenderTileSetSource(std::move(impl_), std::move(threadPool_)) {}
explicit FakeTileSource(Immutable<style::Source::Impl> impl_, const TaggedScheduler& threadPool_)
: RenderTileSetSource(std::move(impl_), threadPool_) {}
void updateInternal(const Tileset& tileset,
const std::vector<Immutable<style::LayerProperties>>& layers,
const bool needsRendering,
Expand Down Expand Up @@ -885,8 +885,8 @@ TEST(Source, RenderTileSetSourceUpdate) {

class FakeRenderTileSetSource : public RenderTileSetSource {
public:
explicit FakeRenderTileSetSource(Immutable<style::Source::Impl> impl_, std::shared_ptr<Scheduler> threadPool_)
: RenderTileSetSource(std::move(impl_), std::move(threadPool_)) {}
explicit FakeRenderTileSetSource(Immutable<style::Source::Impl> impl_, TaggedScheduler threadPool_)
: RenderTileSetSource(std::move(impl_), threadPool_) {}

MOCK_METHOD0(mockedUpdateInternal, void());

Expand Down

0 comments on commit 0003545

Please sign in to comment.