qxLib
Macros
predicates.h File Reference

Go to the source code of this file.

Macros

#define QX_NO_ENTRY   !"No entry"
 Use this as a condition in any macro above to indicate that this part of your code must never be executed.
 
#define QX_NOT_IMPLEMENTED   !"Not implemented"
 Use this as a condition in any macro above to indicate that this part of your code is not ready yet.
 
#define QX_PREDICATE_HIT_ONCE()
 Predicate to add to a condition in any EXPECT macro. When added, a macro will only hit once. More...
 

Detailed Description

Author
Khrapov
Date
27.12.2025

Definition in file predicates.h.

Macro Definition Documentation

◆ QX_PREDICATE_HIT_ONCE

#define QX_PREDICATE_HIT_ONCE ( )
Value:
[]() \
{ \
static bool h = false; \
return qx::details::hit_once(h); \
}()

Predicate to add to a condition in any EXPECT macro. When added, a macro will only hit once.

Note
It must be after the actual condition.
QX_EXPECT((a > b || b == 0) || QX_PREDICATE_HIT_ONCE());
#define QX_EXPECT(condition,...)
Verifies that the condition is true.
Definition: asserts.h:89
#define QX_PREDICATE_HIT_ONCE()
Predicate to add to a condition in any EXPECT macro. When added, a macro will only hit once.
Definition: predicates.h:41

Definition at line 41 of file predicates.h.