aboutsummaryrefslogtreecommitdiff
path: root/zen/chunk/chunk.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-20 10:15:12 +0200
committerStefan Boberg <[email protected]>2021-09-20 10:15:12 +0200
commit8d3024a7e09246e44bf6d9ea14a36e6b03032e85 (patch)
treec18c2536d108378e5cddcac21398efd8d28e437d /zen/chunk/chunk.cpp
parentAdded testing.h to wrap doctest.h (diff)
downloadarchived-zen-8d3024a7e09246e44bf6d9ea14a36e6b03032e85.tar.xz
archived-zen-8d3024a7e09246e44bf6d9ea14a36e6b03032e85.zip
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.
Diffstat (limited to 'zen/chunk/chunk.cpp')
-rw-r--r--zen/chunk/chunk.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/zen/chunk/chunk.cpp b/zen/chunk/chunk.cpp
index a5f010dbe..18748e921 100644
--- a/zen/chunk/chunk.cpp
+++ b/zen/chunk/chunk.cpp
@@ -1,7 +1,6 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "chunk.h"
-#include <doctest/doctest.h>
#include <gsl/gsl-lite.hpp>
@@ -12,6 +11,7 @@
#include <zencore/scopeguard.h>
#include <zencore/sha1.h>
#include <zencore/string.h>
+#include <zencore/testing.h>
#include <zencore/thread.h>
#include <zencore/timer.h>
#include <zenstore/cas.h>
@@ -1056,6 +1056,7 @@ ChunkCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
//////////////////////////////////////////////////////////////////////////
+#if ZEN_WITH_TESTS
TEST_CASE("chunking")
{
using namespace zen;
@@ -1158,3 +1159,4 @@ TEST_CASE("chunking")
SUBCASE("mod method") { test(/* UseThreshold */ false, /* Random */ Random, 2048, 1 * 1024 * 1024); }
}
+#endif \ No newline at end of file