0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Add more tests for verbatim

This commit is contained in:
rbock 2017-10-21 16:55:11 +02:00
parent f6cb213e55
commit 06cbe05b08

View File

@ -403,11 +403,14 @@ int Function(int, char* [])
// test verbatim
{
using TB = decltype(sqlpp::verbatim<sqlpp::boolean>("1"));
using TBS = decltype(sqlpp::verbatim<sqlpp::boolean>("1").as(kaesekuchen));
using TI = decltype(sqlpp::verbatim<sqlpp::bigint>("42"));
using TF = decltype(sqlpp::verbatim<sqlpp::floating_point>("1.5"));
using TT = decltype(sqlpp::verbatim<sqlpp::text>("cheesecake"));
static_assert(not sqlpp::is_selectable_t<TB>::value, "type requirement");
static_assert(sqlpp::is_boolean_t<TB>::value, "type requirement");
static_assert(sqlpp::is_selectable_t<TBS>::value, "type requirement");
static_assert(sqlpp::is_boolean_t<TBS>::value, "type requirement");
static_assert(not sqlpp::is_selectable_t<TB>::value, "type requirement");
static_assert(sqlpp::is_integral_t<TI>::value, "type requirement");
static_assert(not sqlpp::is_selectable_t<TI>::value, "type requirement");