Android-cuttlefish cvd tool
Macros
assert.h File Reference
#include "gmock/gmock.h"
#include "cuttlefish/result/expect.h"
#include "cuttlefish/result/result_matchers.h"
Include dependency graph for assert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CF_ASSERT_OVERLOAD(_1, _2, NAME, ...)   NAME
 
#define CF_ASSERT2(RESULT, MSG)
 
#define CF_ASSERT1(RESULT)   CF_ASSERT2(RESULT, "")
 
#define CF_ASSERT(...)    CF_ASSERT_OVERLOAD(__VA_ARGS__, CF_ASSERT2, CF_ASSERT1)(__VA_ARGS__)
 

Macro Definition Documentation

◆ CF_ASSERT

#define CF_ASSERT (   ...)     CF_ASSERT_OVERLOAD(__VA_ARGS__, CF_ASSERT2, CF_ASSERT1)(__VA_ARGS__)

◆ CF_ASSERT1

#define CF_ASSERT1 (   RESULT)    CF_ASSERT2(RESULT, "")

◆ CF_ASSERT2

#define CF_ASSERT2 (   RESULT,
  MSG 
)
Value:
({ \
decltype(RESULT)&& macro_intermediate_result = RESULT; \
ASSERT_THAT(macro_intermediate_result, IsOk()) << MSG; \
OutcomeDereference(std::move(macro_intermediate_result)); \
})

◆ CF_ASSERT_OVERLOAD

#define CF_ASSERT_OVERLOAD (   _1,
  _2,
  NAME,
  ... 
)    NAME