Improved ASSERT macro, and renamed tests/check.hpp to tests/assert.hpp
This commit is contained in:
parent
7282a342b9
commit
e716cd9764
6 changed files with 13 additions and 14 deletions
8
tests/assert.hpp
Normal file
8
tests/assert.hpp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef TESTS_ASSERT_HPP
|
||||
#define TESTS_ASSERT_HPP
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#define ASSERT(e) ((void)((e) ? ((void)0) : ((void)fprintf(stderr, "Assertion failed: (%s), function %s, file %s, line %u.\n", #e, __func__, __FILE__, __LINE__), abort())))
|
||||
|
||||
#endif /* TESTS_ASSERT_HPP */
|
||||
Loading…
Add table
Add a link
Reference in a new issue