mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 22:23:44 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
35
drape/drape_tests/static_texture_tests.cpp
Normal file
35
drape/drape_tests/static_texture_tests.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "testing/testing.hpp"
|
||||
|
||||
#include "indexer/map_style.hpp"
|
||||
#include "indexer/map_style_reader.hpp"
|
||||
|
||||
#include "drape/drape_tests/testing_graphics_context.hpp"
|
||||
#include "drape/static_texture.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
UNIT_TEST(CheckTrafficArrowTextures)
|
||||
{
|
||||
static std::vector<std::string> skinPaths = {"6plus", "mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi"};
|
||||
static std::vector<MapStyle> styles = {MapStyle::MapStyleDefaultLight,
|
||||
MapStyle::MapStyleDefaultDark,
|
||||
MapStyle::MapStyleVehicleLight,
|
||||
MapStyle::MapStyleVehicleDark};
|
||||
|
||||
TestingGraphicsContext context;
|
||||
for (auto const & style : styles)
|
||||
{
|
||||
GetStyleReader().SetCurrentStyle(style);
|
||||
for (auto const & skinPath : skinPaths)
|
||||
{
|
||||
dp::StaticTexture texture(make_ref(&context), "traffic-arrow.png", skinPath,
|
||||
dp::TextureFormat::RGBA8, nullptr);
|
||||
TEST(texture.IsLoadingCorrect(), ());
|
||||
|
||||
dp::StaticTexture texture2(make_ref(&context), "area-hatching.png", skinPath,
|
||||
dp::TextureFormat::RGBA8, nullptr);
|
||||
TEST(texture2.IsLoadingCorrect(), ());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user