From 36d1ebb68359d7faa194a1f62c17011b462a3a1f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 4 Feb 2019 16:56:59 +0000 Subject: Switch to string_view --- libpqpp/unittests/testpq.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpqpp/unittests') diff --git a/libpqpp/unittests/testpq.cpp b/libpqpp/unittests/testpq.cpp index e5d86ef..0a13c1e 100644 --- a/libpqpp/unittests/testpq.cpp +++ b/libpqpp/unittests/testpq.cpp @@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE( bindAndSend ) mod->execute(); mod->bindParamI(0, (unsigned int)(testInt + 10)); mod->bindParamF(1, (float)(testDouble + 10)); - mod->bindParamS(2, testString + " something"); + mod->bindParamS(2, std::string(testString) + " something"); mod->bindParamB(3, true); mod->bindParamT(4, testDateTime); mod->bindParamT(5, testInterval); @@ -134,7 +134,7 @@ BOOST_AUTO_TEST_CASE( bindAndSelectOther ) while (select->fetch()) { assertColumnValueHelper(*select, 0, 4); assertColumnValueHelper(*select, 1, 123.45); - assertColumnValueHelper(*select, 2, std::string("some text with a ; in it and a ' too")); + assertColumnValueHelper(*select, 2, std::string_view("some text with a ; in it and a ' too")); assertColumnValueHelper(*select, 3, true); assertColumnValueHelper(*select, 4, boost::posix_time::ptime_from_tm({ 3, 6, 23, 27, 3, 115, 0, 0, 0, 0, 0})); assertColumnValueHelper(*select, 5, boost::posix_time::time_duration(38, 13, 12)); -- cgit v1.2.3