iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
fatal_failure.hpp File Reference
#include "iox2/bb/detail/attributes.hpp"
#include "iox2/bb/static_function.hpp"
#include "iox2/legacy/error_reporting/error_kind.hpp"
#include "iox2/legacy/logging.hpp"
#include "iox2/bb/testing/testing_support.hpp"
#include <gmock/gmock.h>
#include <gtest/gtest.h>

Go to the source code of this file.

Namespaces

namespace  iox2
namespace  iox2::bb
namespace  iox2::bb::testing

Macros

#define IOX2_TESTING_EXPECT_FATAL_FAILURE(test_function, expected_error)
#define IOX2_TESTING_EXPECT_NO_FATAL_FAILURE(test_function)

Functions

template<typename ErrorType, std::enable_if_t<!std::is_same< ErrorType, legacy::er::FatalKind >::value &&!std::is_same< ErrorType, legacy::er::EnforceViolationKind >::value &&!std::is_same< ErrorType, legacy::er::AssertViolationKind >::value, bool > = true>
auto iox2::bb::testing::expect_fatal_failure (const bb::StaticFunction< void()> &test_function, const ErrorType expected_error) -> bool
 This function is used in cases a fatal failure is expected. The function only works in combination with the iceoryx error handler. It is not recommended to use this function directly but the IOX2_TESTING_EXPECT_FATAL_FAILURE macro instead.
template<typename ErrorType, std::enable_if_t< std::is_same< ErrorType, legacy::er::FatalKind >::value, bool > = true>
auto iox2::bb::testing::expect_fatal_failure (const bb::StaticFunction< void()> &test_function, const ErrorType expected_error IOX2_MAYBE_UNUSED) -> bool
template<typename ErrorType, std::enable_if_t< std::is_same< ErrorType, legacy::er::EnforceViolationKind >::value, bool > = true>
auto iox2::bb::testing::expect_fatal_failure (const bb::StaticFunction< void()> &test_function, const ErrorType expected_error IOX2_MAYBE_UNUSED) -> bool
template<typename ErrorType, std::enable_if_t< std::is_same< ErrorType, legacy::er::AssertViolationKind >::value, bool > = true>
auto iox2::bb::testing::expect_fatal_failure (const bb::StaticFunction< void()> &test_function, const ErrorType expected_error IOX2_MAYBE_UNUSED) -> bool
auto iox2::bb::testing::expect_no_fatal_failure (const bb::StaticFunction< void()> &test_function) -> bool
 This function is used in cases no fatal failure is expected but could potentially occur. The function only works in combination with the iceoryx error handler. It is not recommended to use this function directly but the IOX2_TESTING_EXPECT_NO_FATAL_FAILURE macro instead.

Macro Definition Documentation

◆ IOX2_TESTING_EXPECT_FATAL_FAILURE

#define IOX2_TESTING_EXPECT_FATAL_FAILURE ( test_function,
expected_error )
Value:
iox2::bb::testing::expect_fatal_failure(test_function, expected_error)
auto expect_fatal_failure(const bb::StaticFunction< void()> &test_function, const ErrorType expected_error) -> bool
This function is used in cases a fatal failure is expected. The function only works in combination wi...

Definition at line 140 of file fatal_failure.hpp.

◆ IOX2_TESTING_EXPECT_NO_FATAL_FAILURE

#define IOX2_TESTING_EXPECT_NO_FATAL_FAILURE ( test_function)
Value:
auto expect_no_fatal_failure(const bb::StaticFunction< void()> &test_function) -> bool
This function is used in cases no fatal failure is expected but could potentially occur....

Definition at line 143 of file fatal_failure.hpp.