Add testing function and macro
This commit is contained in:
@@ -35,6 +35,8 @@
|
||||
#define DEBUG(msg)
|
||||
#endif
|
||||
|
||||
#define ASSERT(expr) m_assert(expr, #expr, __FUNCTION__, __FILE__, __LINE__)
|
||||
|
||||
/** Code stolen from https://github.com/anderkve/FYS3150
|
||||
* Header: https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/include/utils.hpp
|
||||
* Source: https://github.com/anderkve/FYS3150/blob/master/code_examples/compilation_linking/example_1/src/utils.cpp
|
||||
@@ -62,4 +64,6 @@ std::string scientific_format(const std::vector<double>& v,
|
||||
int width=20,
|
||||
int prec=10);
|
||||
|
||||
void m_assert(bool expr, const char* expr_str, const char* func, const char* file, int line);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user