screepsxx/include/Screeps/Macro.hpp
2021-05-30 01:14:25 +03:00

12 lines
434 B
C++
Executable file

#ifndef SCREEPS_MACRO_HPP
#define SCREEPS_MACRO_HPP
#include <cassert>
#define SCREEPS_ASSERT(expr) assert(expr)
#define SCREEPS_ASSERT_MSG(expr, msg) assert(expr&& msg)
#define SCREEPS_ASSERT_FALSE(msg) SCREEPS_ASSERT_MSG(false, msg)
#define SCREEPS_PRECONDITION(expr) SCREEPS_ASSERT_MSG(expr, "precondition failed")
#define SCREEPS_POSTCONDITION(expr) SCREEPS_ASSERT_MSG(expr, "postcondition failed")
#endif // SCREEPS_MACRO_HPP