diff --git a/tests/core/types/aggregate_function.cpp b/tests/core/types/aggregate_function.cpp index 804a1664..350fe5d2 100644 --- a/tests/core/types/aggregate_function.cpp +++ b/tests/core/types/aggregate_function.cpp @@ -58,6 +58,15 @@ void test_aggregate_functions(Value v) static_assert(sqlpp::has_enabled_as::value, ""); static_assert(sqlpp::has_enabled_as::value, ""); + // Aggregate functions have a name + static_assert(sqlpp::has_name::value, ""); + static_assert(sqlpp::has_name::value, ""); + static_assert(sqlpp::has_name::value, ""); + + static_assert(sqlpp::name_tag_of_t::_alias_t::_literal == sqlpp::string_view("count"), ""); + static_assert(sqlpp::name_tag_of_t::_alias_t::_literal == sqlpp::string_view("max"), ""); + static_assert(sqlpp::name_tag_of_t::_alias_t::_literal == sqlpp::string_view("min"), ""); + // Aggregate functions enable comparison member functions. static_assert(sqlpp::has_enabled_comparison::value, ""); static_assert(sqlpp::has_enabled_comparison::value, ""); @@ -97,6 +106,13 @@ void test_numeric_aggregate_functions(Value v) static_assert(sqlpp::has_enabled_as::value, ""); static_assert(sqlpp::has_enabled_as::value, ""); + // Aggregate functions have a name + static_assert(sqlpp::has_name::value, ""); + static_assert(sqlpp::has_name::value, ""); + + static_assert(sqlpp::name_tag_of_t::_alias_t::_literal == sqlpp::string_view("sum"), ""); + static_assert(sqlpp::name_tag_of_t::_alias_t::_literal == sqlpp::string_view("avg"), ""); + // Aggregate functions enable OVER. static_assert(sqlpp::has_enabled_over::value, ""); static_assert(sqlpp::has_enabled_over::value, "");