summaryrefslogtreecommitdiff
path: root/platform/android/src/test/collator_test_stub.cpp
blob: 7c83318979292657809fc1cfd9501f3b070f29d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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