aboutsummaryrefslogtreecommitdiff
path: root/zencore/stats.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-09-21 11:06:13 +0200
committerMartin Ridgers <[email protected]>2021-09-21 11:06:13 +0200
commit68c951e0f440ffd483795dced737e88152c1a581 (patch)
tree5c0910ca2a85b45fb05dba3ce457b7d156213894 /zencore/stats.cpp
parentMerge main into linux-mac (diff)
parentTrigger storage scrubbing pass at startup (diff)
downloadzen-68c951e0f440ffd483795dced737e88152c1a581.tar.xz
zen-68c951e0f440ffd483795dced737e88152c1a581.zip
Merged main into linux-mac
Diffstat (limited to 'zencore/stats.cpp')
-rw-r--r--zencore/stats.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/zencore/stats.cpp b/zencore/stats.cpp
index f8cdc8fbb..c5187940e 100644
--- a/zencore/stats.cpp
+++ b/zencore/stats.cpp
@@ -1,10 +1,13 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "zencore/stats.h"
-#include <doctest/doctest.h>
#include <cmath>
#include "zencore/timer.h"
+#if ZEN_WITH_TESTS
+# include <zencore/testing.h>
+#endif
+
//
// Derived from https://github.com/dln/medida/blob/master/src/medida/stats/ewma.cc
//
@@ -47,6 +50,8 @@ EWMA::Rate() const
//////////////////////////////////////////////////////////////////////////
+#if ZEN_WITH_TESTS
+
TEST_CASE("Stats")
{
SUBCASE("Simple")
@@ -70,4 +75,6 @@ stats_forcelink()
{
}
+#endif
+
} // namespace zen