MCPcopy Create free account
hub / github.com/comaps/comaps / UNIT_TEST

Function UNIT_TEST

libs/drape/drape_tests/static_texture_tests.cpp:12–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include <vector>
11
12UNIT_TEST(CheckTrafficArrowTextures)
13{
14 static std::vector<std::string> skinPaths = {"6plus", "mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi"};
15 static std::vector<MapStyle> styles = {MapStyle::MapStyleDefaultLight, MapStyle::MapStyleDefaultDark,
16 MapStyle::MapStyleVehicleLight, MapStyle::MapStyleVehicleDark};
17
18 TestingGraphicsContext context;
19 for (auto const & style : styles)
20 {
21 GetStyleReader().SetCurrentStyle(style);
22 for (auto const & skinPath : skinPaths)
23 {
24 dp::StaticTexture texture(make_ref(&context), "traffic-arrow.png", skinPath, dp::TextureFormat::RGBA8, nullptr);
25 TEST(texture.IsLoadingCorrect(), ());
26
27 dp::StaticTexture texture2(make_ref(&context), "area-hatching.png", skinPath, dp::TextureFormat::RGBA8, nullptr);
28 TEST(texture2.IsLoadingCorrect(), ());
29 }
30 }
31}

Callers

nothing calls this directly

Calls 4

make_refFunction · 0.85
TESTFunction · 0.85
SetCurrentStyleMethod · 0.80
IsLoadingCorrectMethod · 0.80

Tested by

no test coverage detected