|
TTS v4.1.0
The Tiny Test System
|
Macros for performing relation checks. More...
Runtime Relation Checks | |
| #define | TTS_BIT_EQUAL(LHS, RHS, ...) |
| Checks that two expressions have the same bits. | |
| #define | TTS_BIT_NOT_EQUAL(LHS, RHS, ...) |
| Checks that two expressions have different bits. | |
| #define | TTS_EQUAL(LHS, RHS, ...) |
| Checks that two expressions are equal. | |
| #define | TTS_NOT_EQUAL(LHS, RHS, ...) |
| Checks that two expressions are not equal. | |
| #define | TTS_LESS(LHS, RHS, ...) |
| Checks that LHS is less than RHS. | |
| #define | TTS_GREATER(LHS, RHS, ...) |
| Checks that LHS is greater than RHS. | |
| #define | TTS_LESS_EQUAL(LHS, RHS, ...) |
| Checks that LHS is less than or equal to RHS. | |
| #define | TTS_GREATER_EQUAL(LHS, RHS, ...) |
| Checks that LHS is greater than or equal to RHS. | |
Runtime Typed Relation Checks | |
| #define | TTS_TYPED_EQUAL(LHS, RHS, ...) |
| Checks that two expressions are of the same type and that they are equal. | |
| #define | TTS_TYPED_NOT_EQUAL(LHS, RHS, ...) |
| Checks that two expressions are of the same type and that they are not equal. | |
| #define | TTS_TYPED_LESS(LHS, RHS, ...) |
| Checks that two expressions are of the same type and that LHS is less than RHS. | |
| #define | TTS_TYPED_GREATER(LHS, RHS, ...) |
| Checks that two expressions are of the same type and that LHS is greater than RHS. | |
| #define | TTS_TYPED_LESS_EQUAL(LHS, RHS, ...) |
| Checks that two expressions are of the same type and that LHS is less than or equal to RHS. | |
| #define | TTS_TYPED_GREATER_EQUAL(LHS, RHS, ...) |
| Checks that two expressions are of the same type and that LHS is greater than or equal to RHS. | |
Constexpr Relation Checks | |
| #define | TTS_CONSTEXPR_EQUAL(LHS, RHS, ...) |
| Checks at compile time that two constant expressions are equal. | |
| #define | TTS_CONSTEXPR_NOT_EQUAL(LHS, RHS, ...) |
| Checks at compile time that two constant expressions are not equal. | |
| #define | TTS_CONSTEXPR_LESS(LHS, RHS, ...) |
| Checks at compile time that LHS is less than RHS. | |
| #define | TTS_CONSTEXPR_GREATER(LHS, RHS, ...) |
| Checks at compile time that LHS is greater than RHS. | |
| #define | TTS_CONSTEXPR_LESS_EQUAL(LHS, RHS, ...) |
| Checks at compile time that LHS is less than or equal to RHS. | |
| #define | TTS_CONSTEXPR_GREATER_EQUAL(LHS, RHS, ...) |
| Checks at compile time that LHS is greater than or equal to RHS. | |
| #define TTS_BIT_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that two expressions have the same bits.
Compares with the bit_equal member of tts::comparison, a memcmp over the whole object unless the type specializes it.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_BIT_NOT_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that two expressions have different bits.
Compares with the bit_equal member of tts::comparison, a memcmp over the whole object unless the type specializes it.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_CONSTEXPR_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks at compile time that two constant expressions are equal.
Compares with operator==, or with the custom comparison of the two types.
Evaluates the expression at compile time, so it must be a constant expression, or the test does not compile. Reports the check at run time with the others, as a pass or a failure.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_CONSTEXPR_GREATER | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks at compile time that LHS is greater than RHS.
Holds when LHS is neither less than nor equal to RHS. Compares with operator< and operator==, or with the custom comparison of the two types.
Evaluates the expression at compile time, so it must be a constant expression, or the test does not compile. Reports the check at run time with the others, as a pass or a failure.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_CONSTEXPR_GREATER_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks at compile time that LHS is greater than or equal to RHS.
Holds when LHS is not less than RHS. Compares with operator<, or with the custom comparison of the two types.
Evaluates the expression at compile time, so it must be a constant expression, or the test does not compile. Reports the check at run time with the others, as a pass or a failure.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_CONSTEXPR_LESS | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks at compile time that LHS is less than RHS.
Compares with operator<, or with the custom comparison of the two types.
Evaluates the expression at compile time, so it must be a constant expression, or the test does not compile. Reports the check at run time with the others, as a pass or a failure.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_CONSTEXPR_LESS_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks at compile time that LHS is less than or equal to RHS.
Compares with operator< and operator==, or with the custom comparison of the two types.
Evaluates the expression at compile time, so it must be a constant expression, or the test does not compile. Reports the check at run time with the others, as a pass or a failure.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_CONSTEXPR_NOT_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks at compile time that two constant expressions are not equal.
Compares with operator==, or with the custom comparison of the two types.
Evaluates the expression at compile time, so it must be a constant expression, or the test does not compile. Reports the check at run time with the others, as a pass or a failure.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that two expressions are equal.
Compares with operator==, or with the custom comparison of the two types.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_GREATER | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that LHS is greater than RHS.
Holds when LHS is neither less than nor equal to RHS. Compares with operator< and operator==, or with the custom comparison of the two types.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_GREATER_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that LHS is greater than or equal to RHS.
Holds when LHS is not less than RHS. Compares with operator<, or with the custom comparison of the two types.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_LESS | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that LHS is less than RHS.
Compares with operator<, or with the custom comparison of the two types.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_LESS_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that LHS is less than or equal to RHS.
Compares with operator< and operator==, or with the custom comparison of the two types.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_NOT_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that two expressions are not equal.
Compares with operator==, or with the custom comparison of the two types.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_TYPED_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that two expressions are of the same type and that they are equal.
Behaves as TTS_EQUAL, and also fails when LHS and RHS differ in type.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_TYPED_GREATER | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that two expressions are of the same type and that LHS is greater than RHS.
Behaves as TTS_GREATER, and also fails when LHS and RHS differ in type.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_TYPED_GREATER_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that two expressions are of the same type and that LHS is greater than or equal to RHS.
Behaves as TTS_GREATER_EQUAL, and also fails when LHS and RHS differ in type.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_TYPED_LESS | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that two expressions are of the same type and that LHS is less than RHS.
Behaves as TTS_LESS, and also fails when LHS and RHS differ in type.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_TYPED_LESS_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that two expressions are of the same type and that LHS is less than or equal to RHS.
Behaves as TTS_LESS_EQUAL, and also fails when LHS and RHS differ in type.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_TYPED_NOT_EQUAL | ( | LHS, | |
| RHS, | |||
| ... ) |
#include <tts/test/relation.hpp>
Checks that two expressions are of the same type and that they are not equal.
Behaves as TTS_NOT_EQUAL, and also fails when LHS and RHS differ in type.
| LHS,RHS | Expressions to compare. |
| ... | REQUIRED ends the run when the check fails. |