Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions inflection/src/inflection/util/ULocale.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ inflection::util::ULocale::operator!=(const ::inflection::util::ULocale& other)
inline bool
inflection::util::ULocale::operator<(const ::inflection::util::ULocale& other) const
{
return other.fullName < fullName;
return fullName < other.fullName;
}

inline bool
inflection::util::ULocale::operator>(const ::inflection::util::ULocale& other) const
{
return other.fullName > fullName;
return fullName > other.fullName;
}

inline ::std::string_view
Expand Down
9 changes: 6 additions & 3 deletions inflection/test/src/inflection/util/LocaleUtilsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,18 @@ TEST_CASE("LocaleUtilsTest#hashTest")
{
inflection::util::ULocale locale1 = inflection::util::LocaleUtils::ARABIC();
inflection::util::ULocale locale2 = inflection::util::LocaleUtils::GERMAN();
inflection::util::ULocale locale3 = inflection::util::LocaleUtils::HINDI();

std::set<inflection::util::ULocale> s;
s.insert(locale1);
s.insert(locale2);
s.insert(locale1);
s.insert(locale3);

auto it = s.begin();

REQUIRE(locale2 == *it);
REQUIRE(locale1 == *(++it));
REQUIRE(locale1 == *it);
REQUIRE(locale2 == *(++it));
REQUIRE(locale3 == *(++it));
}

TEST_CASE("LocaleUtilsTest#testCoverage")
Expand Down
Loading