mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Format code using Clang-Format 10 and enforce via CI
Makes the format of the code base uniform.
This commit is contained in:
parent
b5bb500bd2
commit
ee72e8b9d8
97 changed files with 11189 additions and 10842 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue