From f9d6f4d9699b759a62a88e279331b5dbb72e18e9 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 24 May 2020 11:25:18 +0100 Subject: Add some test blob data to testcore --- libdbpp/Jamfile.jam | 1 + libdbpp/testCore.cpp | 8 +++++++- libdbpp/testCore.h | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libdbpp/Jamfile.jam b/libdbpp/Jamfile.jam index 6f9e780..a5b9a88 100644 --- a/libdbpp/Jamfile.jam +++ b/libdbpp/Jamfile.jam @@ -29,6 +29,7 @@ lib dbpptestcore : : BOOST_TEST_DYN_LINK dbppcore + adhocutil boost_utf : : . diff --git a/libdbpp/testCore.cpp b/libdbpp/testCore.cpp index db18316..d29480b 100644 --- a/libdbpp/testCore.cpp +++ b/libdbpp/testCore.cpp @@ -3,13 +3,19 @@ #include #include #include +#include namespace DB { TestCore::TestCore() : testString("Some C String"), testDateTime(boost::posix_time::from_time_t(1430530593)), - testInterval(boost::posix_time::time_duration(1, 2, 3)) + testInterval(boost::posix_time::time_duration(1, 2, 3)), + testBlobData([](){ + AdHoc::FileUtils::MemMap f("/proc/self/exe"); + return std::vector(f.sv().begin(), f.sv().end()); + }()), + testBlob(testBlobData) { } diff --git a/libdbpp/testCore.h b/libdbpp/testCore.h index 285c4b7..06aedf0 100644 --- a/libdbpp/testCore.h +++ b/libdbpp/testCore.h @@ -19,6 +19,8 @@ class DLL_PUBLIC TestCore { bool testBool { false }; boost::posix_time::ptime testDateTime; boost::posix_time::time_duration testInterval; + std::vector testBlobData; + DB::Blob testBlob; template void assertScalarValueHelper(SelectCommand & sel, const T & t) const; template void assertColumnValueHelper(SelectCommand & sel, unsigned int col, const T & t) const; -- cgit v1.2.3