e8ed7b1d1b
This patch adds a tool called DSENT to the ext/ directory. DSENT is a tool that models power and area for on-chip networks. The next patch adds a script for using the tool.
23 lines
489 B
C
23 lines
489 B
C
#ifndef __ASSERT_H__
|
|
#define __ASSERT_H__
|
|
|
|
#include "String.h"
|
|
#include "Exception.h"
|
|
|
|
#ifdef NDEBUG
|
|
#define ASSERT(test_value_,exception_msg_)
|
|
#else
|
|
#define ASSERT(test_value_,msg_) \
|
|
do \
|
|
{ \
|
|
if(!(test_value_)) \
|
|
{ \
|
|
const LibUtil::String& exception_msg = LibUtil::String::format("\nAt %s:%d\n", __FILE__, __LINE__) + (String)(msg_); \
|
|
throw LibUtil::Exception(exception_msg); \
|
|
} \
|
|
} while(0);
|
|
#endif
|
|
|
|
#endif // __ASSERT_H__
|
|
|