![]() |
Scrutiny
1.1.0
C testing framework for POSIX environments
|
Defines the test macros. More...
#include <stddef.h>
#include <stdint.h>
#include "definitions.h"
Go to the source code of this file.
Macros | |
#define | scrFail(...) |
Fails the current test with a message. | |
#define | scrAssert(expr) |
Asserts that an expression is true and fails the test if it isn't. | |
#define | scrAssertEq(expr1, expr2) |
Asserts that two integers are equal. | |
#define | scrAssertNe(expr1, expr2) |
Asserts that two integers are not equal. | |
#define | scrAssertLt(expr1, expr2) |
Asserts that one integer is less than another. | |
#define | scrAssertLe(expr1, expr2) |
Asserts that one integer is less than or equal to another. | |
#define | scrAssertGt(expr1, expr2) |
Asserts that one integer is greater than another. | |
#define | scrAssertGe(expr1, expr2) |
Asserts that one integer is greater than or equal to another. | |
#define | scrAssertUnsignedEq(expr1, expr2) |
Asserts that two unsigned integers are equal. | |
#define | scrAssertUnsignedNe(expr1, expr2) |
Asserts that two unsigned integers are not equal. | |
#define | scrAssertUnsignedLt(expr1, expr2) |
Asserts that one unsigned integer is less than another. | |
#define | scrAssertUnsignedLe(expr1, expr2) |
Asserts that one unsigned integer is less than or equal to another. | |
#define | scrAssertUnsignedGt(expr1, expr2) |
Asserts that one unsigned integer is greater than another. | |
#define | scrAssertUnsignedGe(expr1, expr2) |
Asserts that one unsigned integer is greater than or equal to another. | |
#define | scrAssertFloatEq(expr1, expr2) |
Asserts that two floating-point values are equal. | |
#define | scrAssertFloatNe(expr1, expr2) |
Asserts that two floating-point values are not equal. | |
#define | scrAssertFloatLt(expr1, expr2) |
Asserts that one floating-point value is less than another. | |
#define | scrAssertFloatLe(expr1, expr2) |
Asserts that one floating-point value is less than or equal to another. | |
#define | scrAssertFloatGt(expr1, expr2) |
Asserts that one floating-point value is greater than another. | |
#define | scrAssertFloatGe(expr1, expr2) |
Asserts that one floating-point value is greater than or equal to another. | |
#define | scrAssertPtrEq(expr1, expr2) |
Asserts that two pointers are equal. | |
#define | scrAssertPtrNe(expr1, expr2) |
Asserts that two pointers are not equal. | |
#define | scrAssertStrEq(expr1, expr2) |
Asserts that two strings are equal. | |
#define | scrAssertStrNe(expr1, expr2) |
Asserts that two strings are not equal. | |
#define | scrAssertStrBeginsWith(expr1, expr2) |
Asserts that one string starts with another. | |
#define | scrAssertStrNBeginsWith(expr1, expr2) |
Asserts that one string doesn't start with another. | |
#define | scrAssertStrContains(expr1, expr2) |
Asserts that one string contains another. More... | |
#define | scrAssertStrNContains(expr1, expr2) |
Asserts that one string doesn't contain another. | |
#define | scrAssertCharEq(expr1, expr2) |
Asserts that two characters are equal. | |
#define | scrAssertCharNe(expr1, expr2) |
Asserts that two characters are not equal. | |
#define | scrAssertMemEq(expr1, expr2, size) |
Asserts that two memory regions are equal. | |
Functions | |
void * | scrGroupCtx (void) SCR_EXPORT __attribute__((pure)) |
Gets the group context. More... | |
void * | scrPatchedFunction (const char *func_name) SCR_EXPORT SCR_NONNULL(1) |
Gets the real pointer to a monkeypatched function. More... | |
void | scrTestSkip (void) SCR_EXPORT SCR_NORETURN |
Skips the current test. | |
void | _scrLog (SCR_CONTEXT_DECL, const char *format,...) SCR_EXPORT |
Logs a message. | |
Defines the test macros.
#define scrAssertStrContains | ( | expr1, | |
expr2 | |||
) |
Asserts that one string contains another.
void* scrGroupCtx | ( | void | ) |
Gets the group context.
void* scrPatchedFunction | ( | const char * | func_name | ) |
Gets the real pointer to a monkeypatched function.
func_name | The name of the function that was monkeypatched. |