[android] Share common code between test runners

This commit is contained in:
Juha Alanen
2019-12-19 15:26:18 +02:00
parent 8ce3f6a987
commit 5e7e2d23e7
7 changed files with 259 additions and 475 deletions

View File

@@ -0,0 +1,34 @@
#include <mbgl/i18n/collator.hpp>
#include <memory>
namespace mbgl {
namespace platform {
class Collator::Impl {
public:
Impl(optional<std::string>) {}
bool operator==(const Impl&) const { return true; }
int compare(const std::string&, const std::string&) const { return 0; }
std::string resolvedLocale() const { return ""; }
};
Collator::Collator(bool, bool, optional<std::string> locale_) : impl(std::make_shared<Impl>(std::move(locale_))) {}
int Collator::compare(const std::string& lhs, const std::string& rhs) const {
return impl->compare(lhs, rhs);
}
bool Collator::operator==(const Collator& other) const {
return *impl == *(other.impl);
}
std::string Collator::resolvedLocale() const {
return impl->resolvedLocale();
}
} // namespace platform
} // namespace mbgl