tests cleanup

This commit is contained in:
BlackMATov
2023-01-13 14:13:54 +07:00
parent c32d599fcd
commit bff179fac5
23 changed files with 91 additions and 103 deletions

View File

@@ -74,7 +74,7 @@ namespace meta_hpp
template < typename... Args, constructor_policy_kind Policy >
class_bind<Class>& class_bind<Class>::constructor_(
constructor_opts opts,
[[maybe_unused]] Policy policy)
Policy)
requires detail::class_bind_constructor_kind<Class, Args...>
{
auto state = detail::constructor_state::make<Policy, Class, Args...>(std::move(opts.metadata));
@@ -133,7 +133,7 @@ namespace meta_hpp
std::string name,
Function function,
function_opts opts,
[[maybe_unused]] Policy policy)
Policy)
{
auto state = detail::function_state::make<Policy>(
std::move(name),
@@ -160,7 +160,7 @@ namespace meta_hpp
std::string name,
Function function,
std::initializer_list<std::string_view> arguments,
[[maybe_unused]] Policy policy)
Policy)
{
auto state = detail::function_state::make<Policy>(
std::move(name),
@@ -202,7 +202,7 @@ namespace meta_hpp
std::string name,
Member member,
member_opts opts,
[[maybe_unused]] Policy policy)
Policy)
requires detail::class_bind_member_kind<Class, Member>
{
auto state = detail::member_state::make<Policy>(
@@ -234,7 +234,7 @@ namespace meta_hpp
std::string name,
Method method,
method_opts opts,
[[maybe_unused]] Policy policy)
Policy)
requires detail::class_bind_method_kind<Class, Method>
{
auto state = detail::method_state::make<Policy>(
@@ -262,7 +262,7 @@ namespace meta_hpp
std::string name,
Method method,
std::initializer_list<std::string_view> arguments,
[[maybe_unused]] Policy policy)
Policy)
requires detail::class_bind_method_kind<Class, Method>
{
auto state = detail::method_state::make<Policy>(
@@ -315,7 +315,7 @@ namespace meta_hpp
std::string name,
Pointer pointer,
variable_opts opts,
[[maybe_unused]] Policy policy)
Policy)
{
auto state = detail::variable_state::make<Policy>(
std::move(name),

View File

@@ -42,7 +42,7 @@ namespace meta_hpp
std::string name,
Function function,
function_opts opts,
[[maybe_unused]] Policy policy)
Policy)
{
auto state = detail::function_state::make<Policy>(
std::move(name),
@@ -68,7 +68,7 @@ namespace meta_hpp
std::string name,
Function function,
std::initializer_list<std::string_view> arguments,
[[maybe_unused]] Policy policy)
Policy)
{
auto state = detail::function_state::make<Policy>(
std::move(name),
@@ -117,7 +117,7 @@ namespace meta_hpp
std::string name,
Pointer pointer,
variable_opts opts,
[[maybe_unused]] Policy policy)
Policy)
{
auto state = detail::variable_state::make<Policy>(
std::move(name),

View File

@@ -35,11 +35,11 @@ namespace meta_hpp
}
inline bool operator<(const evalue_index& l, const evalue_index& r) noexcept {
return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_);
return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_));
}
inline bool operator==(const evalue_index& l, const evalue_index& r) noexcept {
return l.type_ == r.type_ && l.name_ == r.name_;
return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_);
}
inline bool operator!=(const evalue_index& l, const evalue_index& r) noexcept {

View File

@@ -35,11 +35,11 @@ namespace meta_hpp
}
inline bool operator<(const function_index& l, const function_index& r) noexcept {
return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_);
return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_));
}
inline bool operator==(const function_index& l, const function_index& r) noexcept {
return l.type_ == r.type_ && l.name_ == r.name_;
return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_);
}
inline bool operator!=(const function_index& l, const function_index& r) noexcept {

View File

@@ -35,11 +35,11 @@ namespace meta_hpp
}
inline bool operator<(const member_index& l, const member_index& r) noexcept {
return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_);
return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_));
}
inline bool operator==(const member_index& l, const member_index& r) noexcept {
return l.type_ == r.type_ && l.name_ == r.name_;
return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_);
}
inline bool operator!=(const member_index& l, const member_index& r) noexcept {

View File

@@ -35,11 +35,11 @@ namespace meta_hpp
}
inline bool operator<(const method_index& l, const method_index& r) noexcept {
return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_);
return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_));
}
inline bool operator==(const method_index& l, const method_index& r) noexcept {
return l.type_ == r.type_ && l.name_ == r.name_;
return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_);
}
inline bool operator!=(const method_index& l, const method_index& r) noexcept {

View File

@@ -29,11 +29,11 @@ namespace meta_hpp
}
inline bool operator<(const scope_index& l, const scope_index& r) noexcept {
return l.name_ < r.name_;
return std::less<>{}(l.name_, r.name_);
}
inline bool operator==(const scope_index& l, const scope_index& r) noexcept {
return l.name_ == r.name_;
return std::equal_to<>{}(l.name_, r.name_);
}
inline bool operator!=(const scope_index& l, const scope_index& r) noexcept {

View File

@@ -35,11 +35,11 @@ namespace meta_hpp
}
inline bool operator<(const variable_index& l, const variable_index& r) noexcept {
return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_);
return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_));
}
inline bool operator==(const variable_index& l, const variable_index& r) noexcept {
return l.type_ == r.type_ && l.name_ == r.name_;
return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_);
}
inline bool operator!=(const variable_index& l, const variable_index& r) noexcept {