Update catch2 version

This commit is contained in:
Jan
2023-06-18 13:39:40 +02:00
parent 34cdd46b42
commit 6c164eee61
31 changed files with 128 additions and 46 deletions

View File

@ -1,4 +1,5 @@
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include "Parsing/Commands/Impl/CommandsLexer.h"
#include "Parsing/Mock/MockParserLineStream.h"

View File

@ -1,4 +1,5 @@
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include "Utils/ClassUtils.h"
#include "Parsing/Commands/Sequence/SequenceAction.h"

View File

@ -1,4 +1,5 @@
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include "Utils/ClassUtils.h"
#include "Parsing/Commands/Sequence/SequenceArchitecture.h"

View File

@ -1,4 +1,5 @@
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include "Utils/ClassUtils.h"
#include "Parsing/Commands/Sequence/SequenceGame.h"

View File

@ -1,8 +1,12 @@
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_floating_point.hpp>
#include <catch2/generators/catch_generators.hpp>
#include "Parsing/Header/Impl/HeaderLexer.h"
#include "Parsing/Mock/MockParserLineStream.h"
using namespace Catch::Matchers;
namespace test::parsing::header::impl::header_lexer
{
void ExpectCharacterToken(HeaderLexer& lexer, char c)
@ -22,7 +26,8 @@ namespace test::parsing::header::impl::header_lexer
void ExpectFloatingPointToken(HeaderLexer& lexer, double number)
{
REQUIRE(lexer.GetToken(0).m_type == HeaderParserValueType::FLOATING_POINT);
REQUIRE(lexer.GetToken(0).FloatingPointValue() == Approx(number));
const auto a = lexer.GetToken(0).FloatingPointValue();
REQUIRE_THAT(lexer.GetToken(0).FloatingPointValue(), WithinRel(number));
lexer.PopTokens(1);
}

View File

@ -1,4 +1,5 @@
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include "Parsing/Header/Sequence/SequenceNamespace.h"
#include "Parsing/Mock/MockLexer.h"

View File

@ -1,5 +1,7 @@
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <algorithm>
#include <sstream>
#include "Utils/ClassUtils.h"

View File

@ -1,2 +0,0 @@
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>