Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
fang_assert.hpp File Reference
#include "modm/architecture/interface/assert.hpp"
#include <string>
#include <cassert>
Include dependency graph for fang_assert.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FANG_ASSERT(CONDITION, DESC)
 

Macro Definition Documentation

◆ FANG_ASSERT

#define FANG_ASSERT (   CONDITION,
  DESC 
)
Value:
{ \
const std::string FANG_ASSERT_FILE{__FILE__}; \
const std::string FANG_ASSERT_LINE{"Line " + std::to_string(__LINE__)}; \
const std::string DESCRIPTION \
{ \
FANG_ASSERT_FILE + \
" : " + FANG_ASSERT_LINE + \
" : " + DESC \
}; \
modm_assert(CONDITION, "Danger! Danger!", DESCRIPTION.c_str()); \
}

Pass should be a boolean variable if it's false, then an assert will be triggered

The file NAME and DESC should be Pass should be a boolean variable if it's false, then an assert will be triggered

The file NAME and DESC should be c style strings