Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
Safe array comparison assertions

C++ / GNU C only! More...

Macros

#define cr_assert_arr_eq_cmp(Actual, Expected, Size, Cmp, FormatString, ...)   internal
 
#define cr_expect_arr_eq_cmp(Actual, Expected, Size, Cmp, FormatString, ...)   internal
 
#define cr_assert_arr_neq_cmp(Actual, Unexpected, Size, Cmp, FormatString, ...)   internal
 
#define cr_expect_arr_neq_cmp(Actual, Unexpected, Size, Cmp, FormatString, ...)   internal
 
#define cr_assert_arr_lt_cmp(Actual, Reference, Size, Cmp, FormatString, ...)   internal
 
#define cr_expect_arr_lt_cmp(Actual, Reference, Size, Cmp, FormatString, ...)   internal
 
#define cr_assert_arr_leq_cmp(Actual, Reference, Size, Cmp, FormatString, ...)   internal
 
#define cr_expect_arr_leq_cmp(Actual, Reference, Size, Cmp, FormatString, ...)   internal
 
#define cr_assert_arr_gt_cmp(Actual, Reference, Size, Cmp, FormatString, ...)   internal
 
#define cr_expect_arr_gt_cmp(Actual, Reference, Size, Cmp, FormatString, ...)   internal
 
#define cr_assert_arr_geq_cmp(Actual, Reference, Size, Cmp, FormatString, ...)   internal
 
#define cr_expect_arr_geq_cmp(Actual, Reference, Size, Cmp, FormatString, ...)   internal
 

Detailed Description

C++ / GNU C only!

These macros are only available on C++ compilers.

Macro Definition Documentation

◆ cr_assert_arr_eq_cmp

#define cr_assert_arr_eq_cmp ( Actual,
Expected,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is comparatively equal to Expected (C++ / GNU C99 only)

Passes if Actual is comparatively equal to Expected. Otherwise the test is marked as failure and the execution of the function is aborted.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]ExpectedExpected array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1205 of file assert.h.

◆ cr_assert_arr_geq_cmp

#define cr_assert_arr_geq_cmp ( Actual,
Reference,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is comparatively greater or equal to Reference (C++ / GNU C99 only)

Passes if Actual is comparatively greater or equal to Reference. Otherwise the test is marked as failure and the execution of the function is aborted.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]ReferenceReference array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1455 of file assert.h.

◆ cr_assert_arr_gt_cmp

#define cr_assert_arr_gt_cmp ( Actual,
Reference,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is comparatively greater than Reference (C++ / GNU C99 only)

Passes if Actual is comparatively greater than Reference. Otherwise the test is marked as failure and the execution of the function is aborted.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]ReferenceReference array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1405 of file assert.h.

◆ cr_assert_arr_leq_cmp

#define cr_assert_arr_leq_cmp ( Actual,
Reference,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is comparatively less or equal to Reference (C++ / GNU C99 only)

Passes if Actual is comparatively less or equal to Reference. Otherwise the test is marked as failure and the execution of the function is aborted.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]ReferenceReference array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1355 of file assert.h.

◆ cr_assert_arr_lt_cmp

#define cr_assert_arr_lt_cmp ( Actual,
Reference,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is comparatively less than Reference (C++ / GNU C99 only)

Passes if Actual is comparatively less than Reference. Otherwise the test is marked as failure and the execution of the function is aborted.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]ReferenceReference array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1305 of file assert.h.

◆ cr_assert_arr_neq_cmp

#define cr_assert_arr_neq_cmp ( Actual,
Unexpected,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is not comparatively equal to Unexpected (C++ / GNU C99 only)

Passes if Actual is not comparatively equal to Unexpected. Otherwise the test is marked as failure and the execution of the function is aborted.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]UnexpectedUnexpected array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1255 of file assert.h.

◆ cr_expect_arr_eq_cmp

#define cr_expect_arr_eq_cmp ( Actual,
Expected,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is comparatively equal to Expected (C++ / GNU C99 only)

Passes if Actual is comparatively equal to Expected. Otherwise the test is marked as failure but the execution will continue.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]ExpectedExpected array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1229 of file assert.h.

◆ cr_expect_arr_geq_cmp

#define cr_expect_arr_geq_cmp ( Actual,
Reference,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is comparatively greater or equal to Reference (C++ / GNU C99 only)

Passes if Actual is comparatively greater or equal to Reference. Otherwise the test is marked as failure but the execution will continue.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]ReferenceReference array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1480 of file assert.h.

◆ cr_expect_arr_gt_cmp

#define cr_expect_arr_gt_cmp ( Actual,
Reference,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is comparatively greater than Reference (C++ / GNU C99 only)

Passes if Actual is comparatively greater than Reference. Otherwise the test is marked as failure but the execution will continue.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]ReferenceReference array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1429 of file assert.h.

◆ cr_expect_arr_leq_cmp

#define cr_expect_arr_leq_cmp ( Actual,
Reference,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is comparatively less or equal to Reference (C++ / GNU C99 only)

Passes if Actual is comparatively less or equal to Reference. Otherwise the test is marked as failure but the execution will continue.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]ReferenceReference array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1380 of file assert.h.

◆ cr_expect_arr_lt_cmp

#define cr_expect_arr_lt_cmp ( Actual,
Reference,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is comparatively less than Reference (C++ / GNU C99 only)

Passes if Actual is comparatively less than Reference. Otherwise the test is marked as failure but the execution will continue.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]ReferenceReference array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1329 of file assert.h.

◆ cr_expect_arr_neq_cmp

#define cr_expect_arr_neq_cmp ( Actual,
Unexpected,
Size,
Cmp,
FormatString,
... )   internal

Passes if Actual is not comparatively equal to Unexpected (C++ / GNU C99 only)

Passes if Actual is not comparatively equal to Unexpected. Otherwise the test is marked as failure but the execution will continue.

The macro takes a int (*comparator)(typeof(Actual) a, typeof(Expected) b) function pointer, that returns -1, 0, or 1 when a is respectively less, equal to, or greater than b.

The optional string is printed on failure.

Note
This macro is only available on C++ and GNU C compilers.
Parameters
[in]ActualArray to test
[in]UnexpectedUnexpected array
[in]SizeNumber of bytes to check
[in]CmpThe comparator to use
[in]FormatString(optional) printf-like format string
[in]...(optional) format string parameters

Definition at line 1280 of file assert.h.