summaryrefslogtreecommitdiff
path: root/test/test-util.hpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-09-04 19:45:21 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2025-09-04 19:45:21 +0100
commit796461dd432df0a750e260499c53dd5d7e59105f (patch)
tree1360d4c43d996000f318e47b9e45edd524c21cb8 /test/test-util.hpp
parentca9be55a98c094e8026a4003a099573dd4137050 (diff)
downloadwebstat-796461dd432df0a750e260499c53dd5d7e59105f.tar.bz2
webstat-796461dd432df0a750e260499c53dd5d7e59105f.tar.xz
webstat-796461dd432df0a750e260499c53dd5d7e59105f.zip
Move DeleteWith helper in src/util
Diffstat (limited to 'test/test-util.hpp')
-rw-r--r--test/test-util.hpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/test-util.hpp b/test/test-util.hpp
index 3338c5e..b0ae0dd 100644
--- a/test/test-util.hpp
+++ b/test/test-util.hpp
@@ -4,6 +4,7 @@
#include <filesystem>
#include <pq-mock.h>
#include <sys/utsname.h>
+#include <util.hpp>
namespace WebStat {
#define XSTR(s) STR(s)
@@ -12,10 +13,6 @@ namespace WebStat {
#undef XSTR
#undef STR
- template<auto Deleter>
- using DeleteWith = decltype([](auto obj) {
- return Deleter(obj);
- });
using FilePtr = std::unique_ptr<std::FILE, DeleteWith<&fclose>>;
struct MockDB : public DB::PluginMock<PQ::Mock> {