diff --git a/include/rfl/comparisons.hpp b/include/rfl/comparisons.hpp index b40daa1d..3a9a35f7 100644 --- a/include/rfl/comparisons.hpp +++ b/include/rfl/comparisons.hpp @@ -19,7 +19,7 @@ struct EqualTo { }; template -struct GreaterEqual { +struct Minimum { template static Result validate(T _value) noexcept { constexpr auto threshold = static_cast(_threshold); @@ -33,7 +33,7 @@ struct GreaterEqual { }; template -struct GreaterThan { +struct ExclusiveMinimum { template static Result validate(T _value) noexcept { constexpr auto threshold = static_cast(_threshold); @@ -47,7 +47,7 @@ struct GreaterThan { }; template -struct LessEqual { +struct Maximum { template static Result validate(T _value) noexcept { constexpr auto threshold = static_cast(_threshold); @@ -61,7 +61,7 @@ struct LessEqual { }; template -struct LessThan { +struct ExclusiveMaximum { template static Result validate(T _value) noexcept { constexpr auto threshold = static_cast(_threshold); diff --git a/tests/test_all_of.hpp b/tests/test_all_of.hpp index cc5edeea..26baafe1 100644 --- a/tests/test_all_of.hpp +++ b/tests/test_all_of.hpp @@ -9,9 +9,8 @@ void test_all_of() { std::cout << "test_all_of" << std::endl; - using Age = - rfl::Validator, rfl::LessThan<130.>>>; + using Age = rfl::Validator, rfl::Maximum<130.>>>; struct Person { rfl::Field<"firstName", std::string> first_name; diff --git a/tests/test_any_of.hpp b/tests/test_any_of.hpp index 893aad4b..1837aaab 100644 --- a/tests/test_any_of.hpp +++ b/tests/test_any_of.hpp @@ -11,8 +11,8 @@ void test_any_of() { using Age = rfl::Validator< unsigned int, - rfl::AnyOf, rfl::LessThan<10.>>, - rfl::AllOf, rfl::LessThan<130.>>>>; + rfl::AnyOf, rfl::Maximum<10.>>, + rfl::AllOf, rfl::Maximum<130.>>>>; struct Person { rfl::Field<"firstName", std::string> first_name;