diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index a4f0dc2..010421e 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -77,9 +77,9 @@ jobs: - name: Test working-directory: ${{ steps.strings.outputs.build-output-dir }} if: runner.os != 'Windows' - run: sqnice_tests + run: ./sqnice_tests - name: Test working-directory: ${{ steps.strings.outputs.build-output-dir }} if: runner.os == 'Windows' - run: sqnice_tests.exe + run: Release/sqnice_tests.exe diff --git a/include/sqnice/pool.hh b/include/sqnice/pool.hh index a3b1067..35013b8 100644 --- a/include/sqnice/pool.hh +++ b/include/sqnice/pool.hh @@ -28,6 +28,7 @@ #define SQNICE_POOL_H #include "sqnice/database.hh" +#include #include #include #include @@ -113,17 +114,20 @@ namespace sqnice { /// (The pool can still re-open more databases on demand, up to its capacity.) void close_unused(); +#ifndef __GNUC__ private: friend borrowed_database; friend borrowed_writeable_database; +#endif + void operator() (database* _Nullable) noexcept; // deleter + void operator() (database const* _Nullable) noexcept; // deleter + private: pool(pool&&) = delete; pool& operator=(pool&&) = delete; borrowed_database borrow(bool); borrowed_writeable_database borrow_writeable(bool); std::unique_ptr new_db(bool writeable); - void operator() (database* _Nullable) noexcept; // deleter - void operator() (database const* _Nullable) noexcept; // deleter using db_ptr = std::unique_ptr; diff --git a/test/testdb.cc b/test/testdb.cc index a949412..9fb1ffd 100644 --- a/test/testdb.cc +++ b/test/testdb.cc @@ -151,7 +151,7 @@ TEST_CASE_METHOD(sqnice_test, "SQNice callbacks", "[sqnice]") { } TEST_CASE("SQNice pool", "[sqnice]") { - sqnice::pool p("/tmp/sqnice_test.sqlite3", + sqnice::pool p("sqnice_test.sqlite3", sqnice::open_flags::delete_first | sqnice::open_flags::readwrite); { auto db = p.borrow_writeable();