From f0d389a4430b62bfa8ea0852905fcf84065b08c2 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 20 May 2022 18:45:35 +0200 Subject: Add catch2 support (#101) Added option to use catch2 for unit tests Currently both doctest and catch2 are supported via some compatibility macros. doctest is the default, and ZEN_USE_CATCH2 needs to be defined to switch to catch2. Our goal is to evaluate how well catch2 works and switch to catch2 if everything pans out since UE5 now supports using catch2 for unit tests. --- zencore/compactbinary.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zencore/compactbinary.cpp') diff --git a/zencore/compactbinary.cpp b/zencore/compactbinary.cpp index a51253989..375a97fc5 100644 --- a/zencore/compactbinary.cpp +++ b/zencore/compactbinary.cpp @@ -2133,8 +2133,8 @@ TEST_CASE("uson.json") const double DoubleValue = Json["Double"].number_value(); CHECK(JsonError.empty()); - CHECK(FloatValue == doctest::Approx(ExpectedFloatValue)); - CHECK(DoubleValue == doctest::Approx(ExpectedDoubleValue)); + CHECK(FloatValue == Approx(ExpectedFloatValue)); + CHECK(DoubleValue == Approx(ExpectedDoubleValue)); } SUBCASE("number.nan") -- cgit v1.2.3