MySQL 8.0.33
Source Code Documentation
harness_assert.h File Reference
#include <stdlib.h>

Go to the source code of this file.


#define harness_assert(COND)    if (!(COND)) abort()
 Improved assert() More...


void harness_assert_this_should_not_execute ()
 assert(0) idiom with an explicit name More...

Macro Definition Documentation

◆ harness_assert

#define harness_assert (   COND)     if (!(COND)) abort()

Improved assert()

This macro is meant to provide analogous functionality to the well-known assert() macro. In contrast to the original, it should also work in release builds.

Function Documentation

◆ harness_assert_this_should_not_execute()

void harness_assert_this_should_not_execute ( )

assert(0) idiom with an explicit name

This is essentially the assert(0) idiom, but with more explicit name to clarify the intent.