From 8d3024a7e09246e44bf6d9ea14a36e6b03032e85 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 20 Sep 2021 10:15:12 +0200 Subject: It's not possible to compile out tests Tests are now compiled in if `ZEN_WITH_TESTS=1`, and compiled out if not. Compiling tests out reduces the footprint of the resulting executables quite significantly. --- zenstore/basicfile.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'zenstore/basicfile.cpp') diff --git a/zenstore/basicfile.cpp b/zenstore/basicfile.cpp index 0b92a8979..fe54184cf 100644 --- a/zenstore/basicfile.cpp +++ b/zenstore/basicfile.cpp @@ -5,9 +5,9 @@ #include #include #include +#include #include -#include #include #include @@ -158,6 +158,8 @@ BasicFile::FileSize() return uint64_t(liFileSize.QuadPart); } +#if ZEN_WITH_TESTS + TEST_CASE("BasicFile") { ScopedCurrentDirectoryChange _; @@ -174,4 +176,6 @@ basicfile_forcelink() { } +#endif + } // namespace zen -- cgit v1.2.3