summaryrefslogtreecommitdiff
path: root/libdbpp/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'libdbpp/unittests')
m---------libdbpp/unittests/libdbpp-mysql0
m---------libdbpp/unittests/libdbpp-odbc0
m---------libdbpp/unittests/libdbpp-postgresql0
m---------libdbpp/unittests/libdbpp-sqlite0
-rw-r--r--libdbpp/unittests/mockdb.cpp7
-rw-r--r--libdbpp/unittests/mockdb.h5
-rw-r--r--libdbpp/unittests/testConnection.cpp11
-rw-r--r--libdbpp/unittests/testConnectionPool.cpp4
-rw-r--r--libdbpp/unittests/testMock.cpp11
-rw-r--r--libdbpp/unittests/testParse.cpp6
-rw-r--r--libdbpp/unittests/testPatch.cpp8
-rw-r--r--libdbpp/unittests/testUtils.cpp39
12 files changed, 79 insertions, 12 deletions
diff --git a/libdbpp/unittests/libdbpp-mysql b/libdbpp/unittests/libdbpp-mysql
-Subproject 7b56849be41fdd342c8d92c243df6370a53c830
+Subproject a8630518c10667ff88f0e0846de98337743a580
diff --git a/libdbpp/unittests/libdbpp-odbc b/libdbpp/unittests/libdbpp-odbc
-Subproject 3eb8f4b130eb815aa3ff7cfbb89d05ebce21635
+Subproject b7f71b71224238a8b7bdb76b6feb98db9bac7aa
diff --git a/libdbpp/unittests/libdbpp-postgresql b/libdbpp/unittests/libdbpp-postgresql
-Subproject 3e305e46d818a28a9c1cbb814bdc3dd72605d80
+Subproject 465ea24362ee267cf83909efa0b5cdee689ff1f
diff --git a/libdbpp/unittests/libdbpp-sqlite b/libdbpp/unittests/libdbpp-sqlite
-Subproject 5c72a2b6a0076d85ce12884bca3b1de89df4db1
+Subproject f036fb38fb75c1298f6729ffc2f7d411b547885
diff --git a/libdbpp/unittests/mockdb.cpp b/libdbpp/unittests/mockdb.cpp
index 30180b9..15e07fb 100644
--- a/libdbpp/unittests/mockdb.cpp
+++ b/libdbpp/unittests/mockdb.cpp
@@ -1,4 +1,11 @@
#include "mockdb.h"
+#include "command_fwd.h"
+#include "connection.h"
+#include "connection_fwd.h"
+#include "error.h"
+#include "factory.h"
+#include "mockDatabase.h"
+#include <memory>
// LCOV_EXCL_START
diff --git a/libdbpp/unittests/mockdb.h b/libdbpp/unittests/mockdb.h
index e9775c6..a511c70 100644
--- a/libdbpp/unittests/mockdb.h
+++ b/libdbpp/unittests/mockdb.h
@@ -1,8 +1,13 @@
#ifndef DB_MOCKDB_H
#define DB_MOCKDB_H
+#include "../command_fwd.h"
#include "../connection.h"
+#include "../connection_fwd.h"
#include "../mockDatabase.h"
+#include <filesystem>
+#include <string>
+#include <vector>
class MockDb : public DB::Connection {
public:
diff --git a/libdbpp/unittests/testConnection.cpp b/libdbpp/unittests/testConnection.cpp
index 46a8e6a..66975e1 100644
--- a/libdbpp/unittests/testConnection.cpp
+++ b/libdbpp/unittests/testConnection.cpp
@@ -1,14 +1,15 @@
#define BOOST_TEST_MODULE DbConnection
#include <boost/test/unit_test.hpp>
+#include "command.h"
+#include "command_fwd.h"
#include "mockdb.h"
#include <connection.h>
-#include <definedDirs.h>
-#include <error.h>
-#include <factory.h>
-#include <fstream>
+#include <exception>
+#include <factory.impl.h>
+#include <memory>
+#include <optional>
#include <pq-command.h>
-#include <sqlParse.h>
#include <vector>
BOOST_AUTO_TEST_CASE(create)
diff --git a/libdbpp/unittests/testConnectionPool.cpp b/libdbpp/unittests/testConnectionPool.cpp
index 5ad0121..630cb0a 100644
--- a/libdbpp/unittests/testConnectionPool.cpp
+++ b/libdbpp/unittests/testConnectionPool.cpp
@@ -1,9 +1,13 @@
#define BOOST_TEST_MODULE DbConnectionPool
#include <boost/test/unit_test.hpp>
+#include "connection.h"
+#include "mockDatabase.h"
#include <buffer.h>
#include <connectionPool.h>
+#include <memory>
#include <pq-mock.h>
+#include <resourcePool.impl.h>
class MockPool : public DB::PluginMock<PQ::Mock>, public DB::ConnectionPool {
public:
diff --git a/libdbpp/unittests/testMock.cpp b/libdbpp/unittests/testMock.cpp
index 362b984..b2eede4 100644
--- a/libdbpp/unittests/testMock.cpp
+++ b/libdbpp/unittests/testMock.cpp
@@ -1,11 +1,18 @@
#define BOOST_TEST_MODULE DbMock
#include <boost/test/unit_test.hpp>
-#include "../error.h"
-#include "../mockDatabase.h"
+#include "mockDatabase.h"
#include "mockdb.h"
#include <definedDirs.h>
+#include <factory.impl.h> // for Factory::createNew, Factory::get
+#include <filesystem> // for operator/, path
#include <fstream>
+#include <memory> // for allocator, __shared_ptr_access
+#include <typeinfo> // for type_info
+
+namespace DB {
+ class Error;
+}
BOOST_AUTO_TEST_CASE(noFactory)
{
diff --git a/libdbpp/unittests/testParse.cpp b/libdbpp/unittests/testParse.cpp
index 29ffc38..38b877d 100644
--- a/libdbpp/unittests/testParse.cpp
+++ b/libdbpp/unittests/testParse.cpp
@@ -1,12 +1,12 @@
#define BOOST_TEST_MODULE DbConnection
#include <boost/test/unit_test.hpp>
-#include <connection.h>
#include <definedDirs.h>
-#include <error.h>
-#include <factory.h>
+#include <filesystem>
#include <fstream>
+#include <initializer_list>
#include <sqlParse.h>
+#include <string>
#include <vector>
using SQLs = std::vector<std::string>;
diff --git a/libdbpp/unittests/testPatch.cpp b/libdbpp/unittests/testPatch.cpp
index cc9fd24..5febea1 100644
--- a/libdbpp/unittests/testPatch.cpp
+++ b/libdbpp/unittests/testPatch.cpp
@@ -1,13 +1,21 @@
#define BOOST_TEST_MODULE DbTablePatch
#include <boost/test/unit_test.hpp>
+#include "command_fwd.h"
+#include "mockDatabase.h"
+#include "selectcommand.h"
#include <buffer.h>
#include <command.h>
#include <connection.h>
+#include <cstdint>
+#include <cstdio>
#include <definedDirs.h>
+#include <filesystem>
+#include <memory>
#include <pq-mock.h>
#include <selectcommandUtil.impl.h>
#include <sqlWriter.h>
+#include <string>
#include <tablepatch.h>
class Mock : public DB::PluginMock<PQ::Mock> {
diff --git a/libdbpp/unittests/testUtils.cpp b/libdbpp/unittests/testUtils.cpp
index 054ffb6..043fc30 100644
--- a/libdbpp/unittests/testUtils.cpp
+++ b/libdbpp/unittests/testUtils.cpp
@@ -1,17 +1,52 @@
#define BOOST_TEST_MODULE DbUtil
#include <boost/test/unit_test.hpp>
-#include <IceUtil/Exception.h>
+#include "column.h"
+#include "command_fwd.h"
+#include "dbTypes.h"
+#include "mockDatabase.h"
+#include <IceUtil/Exception.h> // IWYU pragma: keep
#include <IceUtil/Optional.h>
+#include <boost/date_time/posix_time/conversion.hpp>
#include <boost/date_time/posix_time/posix_time_io.hpp>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <boost/date_time/posix_time/ptime.hpp>
+#include <boost/static_assert.hpp>
#include <connection.h>
+#include <cstdint>
+#include <cstdio>
#include <definedDirs.h>
-#include <fstream>
+#include <deque>
+#include <filesystem>
+#include <fstream> // IWYU pragma: keep
+#include <glibmm/ustring.h>
+#include <iterator>
+#include <memory>
#include <modifycommand.h>
+#include <optional>
#include <pq-mock.h>
#include <selectcommand.h>
#include <selectcommandUtil.impl.h>
+#include <sstream>
+#include <string>
+#include <string_view>
+#include <sys/types.h>
#include <testCore.h>
+#include <tuple>
+#include <type_traits>
+#include <utility>
+#include <vector>
+// IWYU pragma: no_include <boost/date_time/gregorian_calendar.ipp>
+
+namespace DB {
+ class InvalidConversion;
+}
+namespace DB {
+ class UnexpectedNullValue;
+}
+namespace boost::posix_time {
+ class time_duration;
+}
class StandardMockDatabase : public DB::PluginMock<PQ::Mock> {
public: