diff --git a/tests/FunctionTest.cpp b/tests/FunctionTest.cpp index e668a668..18eddde1 100644 --- a/tests/FunctionTest.cpp +++ b/tests/FunctionTest.cpp @@ -389,5 +389,20 @@ int main() static_assert(sqlpp::is_alias_t::value, "type requirement"); } + // test tvin + { + static_assert(std::is_same>::value, "integral values are accepted and wrapped") ; + static_assert(std::is_same>::value, "bool values are accepted and wrapped") ; + static_assert(std::is_same>::value, "float values are accepted and wrapped") ; + static_assert(std::is_same>::value, "text values are accepted and wrapped") ; + + for (const auto& row : db(select(all_of(t)).from(t).where(true))) + { + static_assert(std::is_same>::value, "result fields are accepted and not wrapped") ; + static_assert(std::is_same>::value, "result fields are accepted and not wrapped") ; + static_assert(std::is_same>::value, "result fields are accepted and not wrapped") ; + } + } + return 0; }