core: rename mbgl namespace to mln (#4487)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -4,5 +4,5 @@
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
[[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]];
|
||||
return mbgl::runTests(argc, argv);
|
||||
return mln::runTests(argc, argv);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
|
||||
/*
|
||||
FakeFileSource is similar to StubFileSource, but it follows a post hoc,
|
||||
@@ -102,4 +102,4 @@ public:
|
||||
ClientOptions());
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <mbgl/test/util.hpp>
|
||||
#include <mbgl/util/enum.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
|
||||
FixtureLog::Message::Message(EventSeverity severity_, Event event_, int64_t code_, std::string msg_)
|
||||
: severity(severity_),
|
||||
@@ -123,4 +123,4 @@ size_t FixtureLogObserver::uncheckedCount() const {
|
||||
return os << "]" << std::endl;
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <mutex>
|
||||
#include <iostream>
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
|
||||
class FixtureLog {
|
||||
public:
|
||||
@@ -64,4 +64,4 @@ private:
|
||||
|
||||
using FixtureLogObserver = FixtureLog::Observer;
|
||||
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* http://creativecommons.org/licenses/by/3.0/deed.en_US
|
||||
*/
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
namespace test {
|
||||
|
||||
/**
|
||||
@@ -92,4 +92,4 @@ size_t getCurrentRSS() {
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#error "Cannot define getPeakRSS( ) or getCurrentRSS( ) for an unknown OS."
|
||||
#endif
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
namespace test {
|
||||
|
||||
/**
|
||||
@@ -42,4 +42,4 @@ size_t getPeakRSS();
|
||||
size_t getCurrentRSS();
|
||||
|
||||
} // namespace test
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
using namespace std::literals::string_literals;
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
namespace test {
|
||||
|
||||
void runServer(std::unique_ptr<httplib::Server>& server) {
|
||||
@@ -218,4 +218,4 @@ HttpServer::~HttpServer() {
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
#include <mbgl/map/map.hpp>
|
||||
#include <mbgl/map/map_impl.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
|
||||
class FileSource;
|
||||
|
||||
// Non-public version of mbgl::Map that accepts a file source as parameter.
|
||||
// Non-public version of mln::Map that accepts a file source as parameter.
|
||||
class MapAdapter : public Map {
|
||||
public:
|
||||
explicit MapAdapter(RendererFrontend& frontend,
|
||||
@@ -17,4 +17,4 @@ public:
|
||||
: Map(std::make_unique<Map::Impl>(frontend, observer, std::move(fileSource), options)) {}
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -12,18 +12,18 @@
|
||||
struct MockTileData;
|
||||
|
||||
struct MockSource {
|
||||
mbgl::Range<uint8_t> zoomRange{0, 16};
|
||||
std::map<mbgl::OverscaledTileID, std::unique_ptr<MockTileData>> dataTiles;
|
||||
std::set<mbgl::OverscaledTileID> idealTiles;
|
||||
mln::Range<uint8_t> zoomRange{0, 16};
|
||||
std::map<mln::OverscaledTileID, std::unique_ptr<MockTileData>> dataTiles;
|
||||
std::set<mln::OverscaledTileID> idealTiles;
|
||||
|
||||
// Test API
|
||||
inline MockTileData* createTileData(const mbgl::OverscaledTileID& tileID);
|
||||
inline MockTileData* createTileData(const mln::OverscaledTileID& tileID);
|
||||
};
|
||||
|
||||
struct MockBucket {};
|
||||
|
||||
struct MockTileData {
|
||||
MockTileData(const mbgl::OverscaledTileID& tileID_)
|
||||
MockTileData(const mln::OverscaledTileID& tileID_)
|
||||
: tileID(tileID_) {}
|
||||
|
||||
bool hasTriedCache() const { return triedOptional; }
|
||||
@@ -35,10 +35,10 @@ struct MockTileData {
|
||||
bool renderable = false;
|
||||
bool triedOptional = false;
|
||||
bool loaded = false;
|
||||
const mbgl::OverscaledTileID tileID;
|
||||
const mln::OverscaledTileID tileID;
|
||||
};
|
||||
|
||||
MockTileData* MockSource::createTileData(const mbgl::OverscaledTileID& tileID) {
|
||||
MockTileData* MockSource::createTileData(const mln::OverscaledTileID& tileID) {
|
||||
// Replace the existing MockTileData object, if any.
|
||||
return (dataTiles[tileID] = std::make_unique<MockTileData>(tileID)).get();
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ static int sqlite3_test_fs_access(sqlite3_vfs* vfs, const char* zPath, int flags
|
||||
return os_fs->xAccess(os_fs, zPath, flags, pResOut);
|
||||
}
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
namespace test {
|
||||
|
||||
SQLite3TestFS::SQLite3TestFS() {
|
||||
@@ -317,6 +317,6 @@ void SQLite3TestFS::reset() {
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
#endif // __QT__
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
namespace test {
|
||||
|
||||
class SQLite3TestFS {
|
||||
@@ -37,4 +37,4 @@ public:
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <mbgl/util/async_request.hpp>
|
||||
#include <mbgl/util/client_options.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
@@ -147,4 +147,4 @@ ClientOptions StubFileSource::getClientOptions() {
|
||||
return clientOptions.clone();
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
|
||||
class StubFileSource : public FileSource {
|
||||
public:
|
||||
@@ -69,4 +69,4 @@ private:
|
||||
ClientOptions clientOptions;
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <mbgl/tile/geometry_tile_data.hpp>
|
||||
#include <mbgl/util/feature.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
|
||||
class StubGeometryTileFeature : public GeometryTileFeature {
|
||||
public:
|
||||
@@ -37,4 +37,4 @@ public:
|
||||
const GeometryCollection& getGeometries() const override { return geometry; }
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include <mbgl/style/layer_observer.hpp>
|
||||
|
||||
using namespace mbgl;
|
||||
using namespace mbgl::style;
|
||||
using namespace mln;
|
||||
using namespace mln::style;
|
||||
|
||||
/**
|
||||
* An implementation of style::LayerObserver that forwards all methods to
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
|
||||
class StubMapObserver : public MapObserver {
|
||||
public:
|
||||
@@ -110,4 +110,4 @@ public:
|
||||
std::function<void(TileOperation, const OverscaledTileID&, const std::string&)> onTileActionCallback;
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <mbgl/renderer/render_source_observer.hpp>
|
||||
|
||||
using namespace mbgl;
|
||||
using namespace mln;
|
||||
|
||||
/**
|
||||
* An implementation of style::Observer that forwards all methods to
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include <mbgl/style/observer.hpp>
|
||||
|
||||
using namespace mbgl;
|
||||
using namespace mbgl::style;
|
||||
using namespace mln;
|
||||
using namespace mln::style;
|
||||
|
||||
/**
|
||||
* An implementation of style::Observer that forwards all methods to
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <mbgl/tile/tile_observer.hpp>
|
||||
|
||||
using namespace mbgl;
|
||||
using namespace mln;
|
||||
|
||||
/**
|
||||
* An implementation of TileObserver that forwards all methods to
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
|
||||
int runTests(int argc, char *argv[]) {
|
||||
#if (TEST_HAS_SERVER && defined(__QT__)) || USE_CPP_TEST_SERVER
|
||||
@@ -20,4 +20,4 @@ int runTests(int argc, char *argv[]) {
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
using namespace ::testing;
|
||||
|
||||
namespace mbgl {
|
||||
namespace mln {
|
||||
namespace test {
|
||||
|
||||
void checkImage(const std::string& base,
|
||||
@@ -84,4 +84,4 @@ double getImageDiff(const std::string& base, const PremultipliedImage& actual, d
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace mbgl
|
||||
} // namespace mln
|
||||
|
||||
Reference in New Issue
Block a user