diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-03-17 11:10:46 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-03-21 17:36:56 +0200 |
commit | c1a410be8bb135883d73c5937f2c6b22b3d31ed7 (patch) | |
tree | 40401155593795feb9886a5eb75a1b3c08a33ed1 /test | |
parent | 24198ebca86cbe1329a1854f080e3f4638973142 (diff) | |
download | qtlocation-mapboxgl-c1a410be8bb135883d73c5937f2c6b22b3d31ed7.tar.gz |
[core] s/onSourceDidChange/onSourceChanged/ + source ref
Diffstat (limited to 'test')
-rw-r--r-- | test/src/mbgl/test/stub_style_observer.hpp | 6 | ||||
-rw-r--r-- | test/style/source.test.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/src/mbgl/test/stub_style_observer.hpp b/test/src/mbgl/test/stub_style_observer.hpp index 95280565ff..9312cfa550 100644 --- a/test/src/mbgl/test/stub_style_observer.hpp +++ b/test/src/mbgl/test/stub_style_observer.hpp @@ -30,8 +30,8 @@ public: if (sourceLoaded) sourceLoaded(source); } - void onSourceAttributionChanged(Source& source, const std::string& attribution) override { - if (sourceAttributionChanged) sourceAttributionChanged(source, attribution); + void onSourceChanged(Source& source) override { + if (sourceChanged) sourceChanged(source); } void onSourceError(Source& source, std::exception_ptr error) override { @@ -60,7 +60,7 @@ public: std::function<void ()> spriteLoaded; std::function<void (std::exception_ptr)> spriteError; std::function<void (Source&)> sourceLoaded; - std::function<void (Source&, std::string)> sourceAttributionChanged; + std::function<void (Source&)> sourceChanged; std::function<void (Source&, std::exception_ptr)> sourceError; std::function<void (Source&)> sourceDescriptionChanged; std::function<void (Source&, const OverscaledTileID&)> tileChanged; diff --git a/test/style/source.test.cpp b/test/style/source.test.cpp index feb7b6b05a..6bb18d188b 100644 --- a/test/style/source.test.cpp +++ b/test/style/source.test.cpp @@ -388,8 +388,8 @@ TEST(Source, RasterTileAttribution) { return response; }; - test.observer.sourceAttributionChanged = [&] (Source&, std::string attribution) { - EXPECT_EQ(mapboxOSM, attribution); + test.observer.sourceChanged = [&] (Source& source) { + EXPECT_EQ(mapboxOSM, source.getAttribution()); EXPECT_FALSE(mapboxOSM.find("©️ OpenStreetMap") == std::string::npos); test.end(); }; |