Format code using Clang-Format 10 and enforce via CI

Makes the format of the code base uniform.
This commit is contained in:
Alexander Grund 2022-01-24 16:11:29 +01:00
parent b5bb500bd2
commit ee72e8b9d8
No known key found for this signature in database
GPG key ID: AA48A0760367A42B
97 changed files with 11189 additions and 10842 deletions

View file

@ -11,34 +11,33 @@
#include <catch.hpp>
template< typename Result >
template<typename Result>
struct catch_mock_error_policy
{
static Result abort()
{
FAIL( "Aborted" );
throw std::runtime_error( "unreachable" );
FAIL("Aborted");
throw std::runtime_error("unreachable");
}
template< typename Context >
static void fail( const char* message, const Context& context,
const char* file = "file://unknown-location", int line = 0 )
template<typename Context>
static void fail(const char* message,
const Context& context,
const char* file = "file://unknown-location",
int line = 0)
{
CAPTURE( context );
FAIL_CHECK( message << " in: " << file << ":" << line );
CAPTURE(context);
FAIL_CHECK(message << " in: " << file << ":" << line);
}
template< typename Context >
static void call( const Context& context, const char* file, int line )
template<typename Context>
static void call(const Context& context, const char* file, int line)
{
CAPTURE( context );
INFO( file << ":" << line );
}
static void pass( const char* file, int line )
{
INFO( file << ":" << line );
CAPTURE(context);
INFO(file << ":" << line);
}
static void pass(const char* file, int line) { INFO(file << ":" << line); }
};
#define MOCK_ERROR_POLICY catch_mock_error_policy