diff options
| author | Stefan Boberg <[email protected]> | 2021-09-20 10:15:12 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-20 10:15:12 +0200 |
| commit | 8d3024a7e09246e44bf6d9ea14a36e6b03032e85 (patch) | |
| tree | c18c2536d108378e5cddcac21398efd8d28e437d /zencore/compactbinarybuilder.cpp | |
| parent | Added testing.h to wrap doctest.h (diff) | |
| download | zen-8d3024a7e09246e44bf6d9ea14a36e6b03032e85.tar.xz 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 'zencore/compactbinarybuilder.cpp')
| -rw-r--r-- | zencore/compactbinarybuilder.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zencore/compactbinarybuilder.cpp b/zencore/compactbinarybuilder.cpp index 08f37a23d..fa5b6a69b 100644 --- a/zencore/compactbinarybuilder.cpp +++ b/zencore/compactbinarybuilder.cpp @@ -7,12 +7,11 @@ #include <zencore/endian.h> #include <zencore/stream.h> #include <zencore/string.h> +#include <zencore/testing.h> #define _USE_MATH_DEFINES #include <math.h> -#include <doctest/doctest.h> - namespace zen { template<typename T> @@ -700,6 +699,7 @@ operator<<(CbWriter& Writer, const TimeSpan Value) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#if ZEN_WITH_TESTS void usonbuilder_forcelink() { @@ -1534,5 +1534,6 @@ TEST_CASE("usonbuilder.stream") CHECK(ValidateCompactBinary(Object.GetBuffer(), CbValidateMode::All) == CbValidateError::None); } } +#endif } // namespace zen |