ADTF
Loading...
Searching...
No Matches
catch_integration.h
Go to the documentation of this file.
1
7
#pragma once
8
9
#include <a_utils.h>
10
#include <catch2/catch.hpp>
11
12
CATCH_TRANSLATE_EXCEPTION(
const
tResult
& oError)
13
{
14
return
adtf::util::to_string(oError).GetPtr();
15
}
16
17
namespace
Catch
18
{
19
23
template
<>
24
struct
StringMaker<
tResult
>
25
{
26
static
std::string convert(
const
tResult
& oError)
27
{
28
return
adtf::util::to_string(oError).GetPtr();
29
}
30
};
31
35
template
<tErrorCode::error_code_type Code>
36
struct
StringMaker<tError<Code>>
37
{
38
static
std::string convert(
const
tError<Code>&)
39
{
40
return
tError<Code>::str_error_code;
41
}
42
};
43
47
template
<>
48
struct
StringMaker<
adtf
::util::cString>
49
{
50
static
std::string convert(
const
adtf::util::cString& strString)
51
{
52
return
strString.GetPtr();
53
}
54
};
55
59
template
<>
60
struct
StringMaker<
adtf
::util::cFilename>
61
{
62
static
std::string convert(
const
adtf::util::cFilename& strString)
63
{
64
return
strString.GetPtr();
65
}
66
};
67
68
}
// namespace Catch
69
75
#define REQUIRE_OK(...) REQUIRE(tResult(ERR_NOERROR) == __VA_ARGS__)
81
#define REQUIRE_FAILED(...) REQUIRE(tResult(ERR_NOERROR) != __VA_ARGS__)
82
88
#define CHECK_OK(...) CHECK(tResult(ERR_NOERROR) == __VA_ARGS__)
94
#define CHECK_FAILED(...) CHECK(tResult(ERR_NOERROR) != __VA_ARGS__)
tResult
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition
result.h:736
Catch
Namespace for all functionality provided by catch2 integration in adtf::testing.
Definition
catch_integration.h:18
adtf
Namespace for all functionality provided by ADTF and its SDKs.
Definition
adtf_client_connector.h:14
src
libraries
testing
include
adtftesting
catch_integration.h
Copyright © CARIAD SE. All rights reserved | Generated on Thu Aug 6 2026 by doxygen 1.13.2 | GIT Commit Hash: 07d2f84367192978b2a55ca6aee7f968758b7220