> For the complete documentation index, see [llms.txt](https://yutakatay.gitbook.io/katapedia/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yutakatay.gitbook.io/katapedia/doc/assert.md).

# Assert

```
#ifdef DEBUG
#define ASSERT(C) DoAssert_((C),__FILE__,__LINE__)
#else
#define ASSERT(C)
#endif


#ifdef DEBUG
void DoAssert_( bool bCond, const char *pcFileName, int nLine )
{
if ( bCond ) {
;
}
else {
cout << "Assertion failed at " << pcFileName
<< "(" << nLine << ")" << endl;
ABORT();
}
}
#endif
```
