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. --- zencore/stream.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'zencore/stream.cpp') diff --git a/zencore/stream.cpp b/zencore/stream.cpp index 8687d5501..ead0b014b 100644 --- a/zencore/stream.cpp +++ b/zencore/stream.cpp @@ -1,9 +1,10 @@ // Copyright Epic Games, Inc. All Rights Reserved. -#include #include #include #include +#include + #include #include @@ -279,6 +280,8 @@ IndentTextWriter::Write(const void* data, size_t byteCount) // Testing related code follows... // +#if ZEN_WITH_TESTS + void stream_forcelink() { @@ -336,4 +339,6 @@ TEST_CASE("BinaryWriter and BinaryWriter") CHECK(i64 == 42); } +#endif + } // namespace zen -- cgit v1.2.3