Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
41
libs/indexer/indexer_tests/test_mwm_set.hpp
Normal file
41
libs/indexer/indexer_tests/test_mwm_set.hpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#pragma once
|
||||
|
||||
#include "indexer/mwm_set.hpp"
|
||||
|
||||
#include "platform/country_file.hpp"
|
||||
#include "platform/local_country_file.hpp"
|
||||
#include "platform/mwm_version.hpp"
|
||||
|
||||
#include "geometry/rect2d.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
using platform::CountryFile;
|
||||
using platform::LocalCountryFile;
|
||||
|
||||
namespace tests
|
||||
{
|
||||
|
||||
class TestMwmSet : public MwmSet
|
||||
{
|
||||
protected:
|
||||
/// @name MwmSet overrides
|
||||
//@{
|
||||
std::unique_ptr<MwmInfo> CreateInfo(platform::LocalCountryFile const & localFile) const override
|
||||
{
|
||||
int const n = localFile.GetCountryName()[0] - '0';
|
||||
auto info = std::make_unique<MwmInfo>();
|
||||
info->m_maxScale = n;
|
||||
info->m_bordersRect = m2::RectD(0, 0, 1, 1);
|
||||
info->m_version.SetFormat(version::Format::lastFormat);
|
||||
return info;
|
||||
}
|
||||
|
||||
std::unique_ptr<MwmValue> CreateValue(MwmInfo & info) const override
|
||||
{
|
||||
return std::make_unique<MwmValue>(info.GetLocalFile());
|
||||
}
|
||||
//@}
|
||||
};
|
||||
|
||||
} // namespace tests
|
||||
Loading…
Add table
Add a link
Reference in a new issue