iceoryx2
C++ Language 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)    iox2::bb::testing::expect_fatal_failure(test_function, expected_error)
 
#define IOX2_TESTING_EXPECT_NO_FATAL_FAILURE(test_function)   iox2::bb::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.
 
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 
)     iox2::bb::testing::expect_fatal_failure(test_function, expected_error)

Definition at line 140 of file fatal_failure.hpp.

◆ IOX2_TESTING_EXPECT_NO_FATAL_FAILURE

#define IOX2_TESTING_EXPECT_NO_FATAL_FAILURE (   test_function)    iox2::bb::testing::expect_no_fatal_failure(test_function)

Definition at line 143 of file fatal_failure.hpp.