Fixed asserts doxygen & integrated them into the assertion reference

This commit is contained in:
Snaipe 2016-02-21 17:10:52 +01:00
parent 7bd7053aa5
commit c270c02940
5 changed files with 509 additions and 688 deletions

View file

@ -12,136 +12,35 @@ macros to this list. Hence only ``assert`` macros are represented here.
All ``assert`` macros may take an optional ``printf`` format string and
parameters.
Base Assertions
-----------------
.. doxygengroup:: BaseAsserts
Common Assertions
-----------------
=========================================================================== =========================================================================== ===========================================
Macro Passes if and only if Notes
=========================================================================== =========================================================================== ===========================================
cr_assert(Condition, [FormatString, [Args...]]) ``Condition`` is true.
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_not(Condition, [FormatString, [Args...]]) ``Condition`` is false.
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_null(Value, [FormatString, [Args...]]) ``Value`` is ``NULL``.
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_not_null(Value, [FormatString, [Args...]]) ``Value`` is not ``NULL``.
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_eq(Actual, Expected, [FormatString, [Args...]]) ``Actual`` is equal to ``Expected``. Compatible with C++ operator overloading
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_neq(Actual, Unexpected, [FormatString, [Args...]]) ``Actual`` is not equal to ``Unexpected``. Compatible with C++ operator overloading
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_lt(Actual, Reference, [FormatString, [Args...]]) ``Actual`` is less than ``Reference``. Compatible with C++ operator overloading
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_leq(Actual, Reference, [FormatString, [Args...]]) ``Actual`` is less or equal to ``Reference``. Compatible with C++ operator overloading
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_gt(Actual, Reference, [FormatString, [Args...]]) ``Actual`` is greater than ``Reference``. Compatible with C++ operator overloading
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_geq(Actual, Reference, [FormatString, [Args...]]) ``Actual`` is greater or equal to ``Reference``. Compatible with C++ operator overloading
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_float_eq(Actual, Expected, Epsilon, [FormatString, [Args...]]) ``Actual`` is equal to ``Expected`` with a tolerance of ``Epsilon``. Use this to test equality between floats
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_float_neq(Actual, Unexpected, Epsilon, [FormatString, [Args...]]) ``Actual`` is not equal to ``Unexpected`` with a tolerance of ``Epsilon``. Use this to test inequality between floats
=========================================================================== =========================================================================== ===========================================
.. doxygengroup:: CommonBinAsserts
.. doxygengroup:: CommonUnaryAsserts
.. doxygengroup:: FloatAsserts
String Assertions
-----------------
Note: these macros are meant to deal with *native* strings, i.e. char arrays.
Most of them won't work on ``std::string`` in C++, with some exceptions -- for
``std::string``, you should use regular comparison assersions, as listed above.
================================================================ =================================================================== ===========================================
Macro Passes if and only if Notes
================================================================ =================================================================== ===========================================
cr_assert_str_empty(Value, [FormatString, [Args...]]) ``Value`` is an empty string. Also works on std::string
---------------------------------------------------------------- ------------------------------------------------------------------- -------------------------------------------
cr_assert_str_not_empty(Value, [FormatString, [Args...]]) ``Value`` is not an empty string. Also works on std::string
---------------------------------------------------------------- ------------------------------------------------------------------- -------------------------------------------
cr_assert_str_eq(Actual, Expected, [FormatString, [Args...]]) ``Actual`` is lexicographically equal to ``Expected``.
---------------------------------------------------------------- ------------------------------------------------------------------- -------------------------------------------
cr_assert_str_neq(Actual, Unexpected, [FormatString, [Args...]]) ``Actual`` is not lexicographically equal to ``Unexpected``.
---------------------------------------------------------------- ------------------------------------------------------------------- -------------------------------------------
cr_assert_str_lt(Actual, Reference, [FormatString, [Args...]]) ``Actual`` is lexicographically less than ``Reference``.
---------------------------------------------------------------- ------------------------------------------------------------------- -------------------------------------------
cr_assert_str_leq(Actual, Reference, [FormatString, [Args...]]) ``Actual`` is lexicographically less or equal to ``Reference``.
---------------------------------------------------------------- ------------------------------------------------------------------- -------------------------------------------
cr_assert_str_gt(Actual, Reference, [FormatString, [Args...]]) ``Actual`` is lexicographically greater than ``Reference``.
---------------------------------------------------------------- ------------------------------------------------------------------- -------------------------------------------
cr_assert_str_geq(Actual, Reference, [FormatString, [Args...]]) ``Actual`` is lexicographically greater or equal to ``Reference``.
================================================================ =================================================================== ===========================================
.. doxygengroup:: StringAsserts
Array Assertions
-----------------
=============================================================================== =========================================================================== ===========================================
Macro Passes if and only if Notes
=============================================================================== =========================================================================== ===========================================
cr_assert_arr_eq(Actual, Expected, Size, [FormatString, [Args...]]) ``Actual`` is byte-to-byte equal to ``Expected``. This should not be used on struct arrays,
consider using ``cr_assert_arr_eq_cmp``
instead.
------------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_arr_neq(Actual, Unexpected, Size, [FormatString, [Args...]]) ``Actual`` is not byte-to-byte equal to ``Unexpected``. This should not be used on struct arrays,
consider using ``cr_assert_arr_neq_cmp``
instead.
------------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_arr_eq_cmp(Actual, Expected, Size, Cmp, [FormatString, [Args...]]) ``Actual`` is comparatively equal to ``Expected`` Only available in C++ and GNU C99
------------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_arr_neq_cmp(Actual, Unexpected, Size, Cmp, [FormatString, [Args...]]) ``Actual`` is not comparatively equal to ``Expected`` Only available in C++ and GNU C99
------------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_arr_lt_cmp(Actual, Reference, Size, Cmp, [FormatString, [Args...]]) ``Actual`` is comparatively less than ``Reference`` Only available in C++ and GNU C99
------------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_arr_leq_cmp(Actual, Reference, Size, Cmp, [FormatString, [Args...]]) ``Actual`` is comparatively less or equal to ``Reference`` Only available in C++ and GNU C99
------------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_arr_gt_cmp(Actual, Reference, Size, Cmp, [FormatString, [Args...]]) ``Actual`` is comparatively greater than ``Reference`` Only available in C++ and GNU C99
------------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_arr_geq_cmp(Actual, Reference, Size, Cmp, [FormatString, [Args...]]) ``Actual`` is comparatively greater or equal to ``Reference`` Only available in C++ and GNU C99
=============================================================================== =========================================================================== ===========================================
.. doxygengroup:: ArrayAsserts
.. doxygengroup:: SafeArrCmpAsserts
Exception Assertions
--------------------
The following assertion macros are only defined for C++.
=============================================================================== =========================================================================== ===========================================
Macro Passes if and only if Notes
=============================================================================== =========================================================================== ===========================================
cr_assert_throw(Statement, Exception, [FormatString, [Args...]]) ``Statement`` throws an instance of ``Exception``.
------------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_no_throw(Statement, Exception, [FormatString, [Args...]]) ``Statement`` does not throws an instance of ``Exception``.
------------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_any_throw(Statement, [FormatString, [Args...]]) ``Statement`` throws any kind of exception.
------------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
cr_assert_none_throw(Statement, [FormatString, [Args...]]) ``Statement`` does not throw any exception.
=============================================================================== =========================================================================== ===========================================
.. doxygengroup:: ExceptionAsserts
File Assertions
---------------
=================================================================================== ============================================================================ ===========================================
Macro Passes if and only if Notes
=================================================================================== ============================================================================ ===========================================
cr_assert_file_contents_eq_str(File, ExpectedContents, [FormatString, [Args...]]) The contents of ``File`` are equal to the string ``ExpectedContents``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_file_contents_neq_str(File, ExpectedContents, [FormatString, [Args...]]) The contents of ``File`` are not equal to the string ``ExpectedContents``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_stdout_eq_str(ExpectedContents, [FormatString, [Args...]]) The contents of ``stdout`` are equal to the string ``ExpectedContents``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_stdout_neq_str(ExpectedContents, [FormatString, [Args...]]) The contents of ``stdout`` are not equal to the string ``ExpectedContents``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_stderr_eq_str(ExpectedContents, [FormatString, [Args...]]) The contents of ``stderr`` are equal to the string ``ExpectedContents``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_stderr_neq_str(ExpectedContents, [FormatString, [Args...]]) The contents of ``stderr`` are not equal to the string ``ExpectedContents``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_file_contents_eq(File, RefFile, [FormatString, [Args...]]) The contents of ``File`` are equal to the contents of ``RefFile``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_file_contents_neq(File, RefFile, [FormatString, [Args...]]) The contents of ``File`` are not equal to the contents of ``RefFile``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_stdout_eq(RefFile, [FormatString, [Args...]]) The contents of ``stdout`` are equal to the contents of ``RefFile``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_stdout_neq(RefFile, [FormatString, [Args...]]) The contents of ``stdout`` are not equal to the contents of ``RefFile``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_stderr_eq(RefFile, [FormatString, [Args...]]) The contents of ``stderr`` are equal to the contents of ``RefFile``.
----------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
cr_assert_stderr_neq(RefFile, [FormatString, [Args...]]) The contents of ``stderr`` are not equal to the contents of ``RefFile``.
=================================================================================== ============================================================================ ===========================================
.. doxygengroup:: FileAsserts

File diff suppressed because it is too large Load diff

View file

@ -460,4 +460,172 @@ CR_END_C_API
"The `" #Name "` macro is only available on GNU C compilers." \
)
// Actual implementation
# undef cr_assert_fail
# define cr_assert_fail(...) CR_EXPAND(cr_fail(CR_FAIL_ABORT_, __VA_ARGS__))
# undef cr_expect_fail
# define cr_expect_fail(...) CR_EXPAND(cr_fail(CR_FAIL_CONTINUES_, __VA_ARGS__))
# undef cr_assert
# define cr_assert(...) CR_EXPAND(cr_assert_(__VA_ARGS__))
# undef cr_expect
# define cr_expect(...) CR_EXPAND(cr_expect_(__VA_ARGS__))
# undef cr_assert_not
# define cr_assert_not(...) CR_EXPAND(cr_assert_not_(__VA_ARGS__))
# undef cr_expect_not
# define cr_expect_not(...) CR_EXPAND(cr_expect_not_(__VA_ARGS__))
# undef cr_assert_eq
# define cr_assert_eq(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_ABORT_, ==, __VA_ARGS__))
# undef cr_expect_eq
# define cr_expect_eq(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_CONTINUES_, ==, __VA_ARGS__))
# undef cr_assert_neq
# define cr_assert_neq(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_ABORT_, !=, __VA_ARGS__))
# undef cr_expect_neq
# define cr_expect_neq(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_CONTINUES_, !=, __VA_ARGS__))
# undef cr_assert_lt
# define cr_assert_lt(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_ABORT_, <, __VA_ARGS__))
# undef cr_expect_lt
# define cr_expect_lt(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_CONTINUES_, <, __VA_ARGS__))
# undef cr_assert_leq
# define cr_assert_leq(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_ABORT_, <=, __VA_ARGS__))
# undef cr_expect_leq
# define cr_expect_leq(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_CONTINUES_, <=, __VA_ARGS__))
# undef cr_assert_gt
# define cr_assert_gt(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_ABORT_, >, __VA_ARGS__))
# undef cr_expect_gt
# define cr_expect_gt(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_CONTINUES_, >, __VA_ARGS__))
# undef cr_assert_geq
# define cr_assert_geq(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_ABORT_, >=, __VA_ARGS__))
# undef cr_expect_geq
# define cr_expect_geq(...) CR_EXPAND(cr_assert_op_va_(CR_FAIL_CONTINUES_, >=, __VA_ARGS__))
# undef cr_assert_null
# define cr_assert_null(...) CR_EXPAND(cr_assert_null_op_va_(CR_FAIL_ABORT_, ==, CRITERION_ASSERT_MSG_IS_NOT_NULL, __VA_ARGS__))
# undef cr_expect_null
# define cr_expect_null(...) CR_EXPAND(cr_assert_null_op_va_(CR_FAIL_CONTINUES_, ==, CRITERION_ASSERT_MSG_IS_NOT_NULL, __VA_ARGS__))
# undef cr_assert_not_null
# define cr_assert_not_null(...) CR_EXPAND(cr_assert_null_op_va_(CR_FAIL_ABORT_, !=, CRITERION_ASSERT_MSG_IS_NULL, __VA_ARGS__))
# undef cr_expect_not_null
# define cr_expect_not_null(...) CR_EXPAND(cr_assert_null_op_va_(CR_FAIL_CONTINUES_, !=, CRITERION_ASSERT_MSG_IS_NULL, __VA_ARGS__))
# undef cr_assert_float_eq
# define cr_assert_float_eq(...) CR_EXPAND(cr_assert_float_op_va_(CR_FAIL_ABORT_, cr_assert_float_eq_op_, __VA_ARGS__))
# undef cr_expect_float_eq
# define cr_expect_float_eq(...) CR_EXPAND(cr_assert_float_op_va_(CR_FAIL_CONTINUES_, cr_assert_float_eq_op_, __VA_ARGS__))
# undef cr_assert_float_neq
# define cr_assert_float_neq(...) CR_EXPAND(cr_assert_float_op_va_(CR_FAIL_ABORT_, cr_assert_float_neq_op_, __VA_ARGS__))
# undef cr_expect_float_neq
# define cr_expect_float_neq(...) CR_EXPAND(cr_assert_float_op_va_(CR_FAIL_CONTINUES_, cr_assert_float_neq_op_, __VA_ARGS__))
# undef cr_assert_str_empty
# define cr_assert_str_empty(...) CR_EXPAND(cr_assert_str_op_empty_va_(CR_FAIL_ABORT_, ==, CRITERION_ASSERT_MSG_IS_NOT_EMPTY, __VA_ARGS__))
# undef cr_expect_str_empty
# define cr_expect_str_empty(...) CR_EXPAND(cr_assert_str_op_empty_va_(CR_FAIL_CONTINUES_, ==, CRITERION_ASSERT_MSG_IS_NOT_EMPTY, __VA_ARGS__))
# undef cr_assert_str_not_empty
# define cr_assert_str_not_empty(...) CR_EXPAND(cr_assert_str_op_empty_va_(CR_FAIL_ABORT_, !=, CRITERION_ASSERT_MSG_IS_EMPTY, __VA_ARGS__))
# undef cr_expect_str_not_empty
# define cr_expect_str_not_empty(...) CR_EXPAND(cr_assert_str_op_empty_va_(CR_FAIL_CONTINUES_, !=, CRITERION_ASSERT_MSG_IS_EMPTY, __VA_ARGS__))
# undef cr_assert_str_eq
# define cr_assert_str_eq(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_ABORT_, ==, __VA_ARGS__))
# undef cr_expect_str_eq
# define cr_expect_str_eq(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_CONTINUES_, ==, __VA_ARGS__))
# undef cr_assert_str_neq
# define cr_assert_str_neq(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_ABORT_, !=, __VA_ARGS__))
# undef cr_expect_str_neq
# define cr_expect_str_neq(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_CONTINUES_, !=, __VA_ARGS__))
# undef cr_assert_str_lt
# define cr_assert_str_lt(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_ABORT_, <, __VA_ARGS__))
# undef cr_expect_str_lt
# define cr_expect_str_lt(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_CONTINUES_, <, __VA_ARGS__))
# undef cr_assert_str_leq
# define cr_assert_str_leq(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_ABORT_, <=, __VA_ARGS__))
# undef cr_expect_str_leq
# define cr_expect_str_leq(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_CONTINUES_, <=, __VA_ARGS__))
# undef cr_assert_str_gt
# define cr_assert_str_gt(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_ABORT_, >, __VA_ARGS__))
# undef cr_expect_str_gt
# define cr_expect_str_gt(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_CONTINUES_, >, __VA_ARGS__))
# undef cr_assert_str_geq
# define cr_assert_str_geq(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_ABORT_, >=, __VA_ARGS__))
# undef cr_expect_str_geq
# define cr_expect_str_geq(...) CR_EXPAND(cr_assert_str_op_va_(CR_FAIL_CONTINUES_, >=, __VA_ARGS__))
# undef cr_assert_arr_eq
# define cr_assert_arr_eq(...) CR_EXPAND(cr_assert_mem_op_va_(CR_FAIL_ABORT_, ==, __VA_ARGS__))
# undef cr_expect_arr_eq
# define cr_expect_arr_eq(...) CR_EXPAND(cr_assert_mem_op_va_(CR_FAIL_CONTINUES_, ==, __VA_ARGS__))
# undef cr_assert_arr_neq
# define cr_assert_arr_neq(...) CR_EXPAND(cr_assert_mem_op_va_(CR_FAIL_ABORT_, !=, __VA_ARGS__))
# undef cr_expect_arr_neq
# define cr_expect_arr_neq(...) CR_EXPAND(cr_assert_mem_op_va_(CR_FAIL_CONTINUES_, !=, __VA_ARGS__))
# if defined(__GNUC__) || defined(__clang__) || defined(__cplusplus)
# undef cr_assert_arr_eq_cmp
# define cr_assert_arr_eq_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_ABORT_, ==, __VA_ARGS__))
# undef cr_expect_arr_eq_cmp
# define cr_expect_arr_eq_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_CONTINUES_, ==, __VA_ARGS__))
# undef cr_assert_arr_neq_cmp
# define cr_assert_arr_neq_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_ABORT_, !=, __VA_ARGS__))
# undef cr_expect_arr_neq_cmp
# define cr_expect_arr_neq_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_CONTINUES_, !=, __VA_ARGS__))
# undef cr_assert_arr_lt_cmp
# define cr_assert_arr_lt_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_ABORT_, <, __VA_ARGS__))
# undef cr_expect_arr_lt_cmp
# define cr_expect_arr_lt_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_CONTINUES_, <, __VA_ARGS__))
# undef cr_assert_arr_leq_cmp
# define cr_assert_arr_leq_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_ABORT_, <=, __VA_ARGS__))
# undef cr_expect_arr_leq_cmp
# define cr_expect_arr_leq_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_CONTINUES_, <=, __VA_ARGS__))
# undef cr_assert_arr_gt_cmp
# define cr_assert_arr_gt_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_ABORT_, >, __VA_ARGS__))
# undef cr_expect_arr_gt_cmp
# define cr_expect_arr_gt_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_CONTINUES_, >, __VA_ARGS__))
# undef cr_assert_arr_geq_cmp
# define cr_assert_arr_geq_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_ABORT_, >=, __VA_ARGS__))
# undef cr_expect_arr_geq_cmp
# define cr_expect_arr_geq_cmp(...) CR_EXPAND(cr_assert_arr_op_cmp_va_(CR_FAIL_CONTINUES_, >=, __VA_ARGS__))
# else
# undef cr_assert_arr_eq_cmp
# define cr_assert_arr_eq_cmp(...) CRITERION_GNUC_WARN_(cr_assert_arr_eq_cmp) CR_NOOP
# undef cr_expect_arr_eq_cmp
# define cr_expect_arr_eq_cmp(...) CRITERION_GNUC_WARN_(cr_expect_arr_eq_cmp) CR_NOOP
# undef cr_assert_arr_neq_cmp
# define cr_assert_arr_neq_cmp(...) CRITERION_GNUC_WARN_(cr_assert_arr_neq_cmp) CR_NOOP
# undef cr_expect_arr_neq_cmp
# define cr_expect_arr_neq_cmp(...) CRITERION_GNUC_WARN_(cr_expect_arr_neq_cmp) CR_NOOP
# undef cr_assert_arr_lt_cmp
# define cr_assert_arr_lt_cmp(...) CRITERION_GNUC_WARN_(cr_assert_arr_lt_cmp) CR_NOOP
# undef cr_expect_arr_lt_cmp
# define cr_expect_arr_lt_cmp(...) CRITERION_GNUC_WARN_(cr_expect_arr_lt_cmp) CR_NOOP
# undef cr_assert_arr_leq_cmp
# define cr_assert_arr_leq_cmp(...) CRITERION_GNUC_WARN_(cr_assert_arr_leq_cmp) CR_NOOP
# undef cr_expect_arr_leq_cmp
# define cr_expect_arr_leq_cmp(...) CRITERION_GNUC_WARN_(cr_expect_arr_leq_cmp) CR_NOOP
# undef cr_assert_arr_gt_cmp
# define cr_assert_arr_gt_cmp(...) CRITERION_GNUC_WARN_(cr_assert_arr_gt_cmp) CR_NOOP
# undef cr_expect_arr_gt_cmp
# define cr_expect_arr_gt_cmp(...) CRITERION_GNUC_WARN_(cr_expect_arr_gt_cmp) CR_NOOP
# undef cr_assert_arr_geq_cmp
# define cr_assert_arr_geq_cmp(...) CRITERION_GNUC_WARN_(cr_assert_arr_geq_cmp) CR_NOOP
# undef cr_expect_arr_geq_cmp
# define cr_expect_arr_geq_cmp(...) CRITERION_GNUC_WARN_(cr_expect_arr_geq_cmp) CR_NOOP
# endif
# undef cr_assert_throw
# define cr_assert_throw(...) CR_EXPAND(cr_assert_throw_va_(CR_FAIL_ABORT_, __VA_ARGS__))
# undef cr_expect_throw
# define cr_expect_throw(...) CR_EXPAND(cr_assert_throw_va_(CR_FAIL_CONTINUES_, __VA_ARGS__))
# undef cr_assert_no_throw
# define cr_assert_no_throw(...) CR_EXPAND(cr_assert_no_throw_va_(CR_FAIL_ABORT_, __VA_ARGS__))
# undef cr_expect_no_throw
# define cr_expect_no_throw(...) CR_EXPAND(cr_assert_no_throw_va_(CR_FAIL_CONTINUES_, __VA_ARGS__))
# undef cr_assert_any_throw
# define cr_assert_any_throw(...) CR_EXPAND(cr_assert_any_throw_va_(CR_FAIL_ABORT_, __VA_ARGS__))
# undef cr_expect_any_throw
# define cr_expect_any_throw(...) CR_EXPAND(cr_assert_any_throw_va_(CR_FAIL_CONTINUES_, __VA_ARGS__))
# undef cr_assert_none_throw
# define cr_assert_none_throw(...) CR_EXPAND(cr_assert_none_throw_va_(CR_FAIL_ABORT_, __VA_ARGS__))
# undef cr_expect_none_throw
# define cr_expect_none_throw(...) CR_EXPAND(cr_assert_none_throw_va_(CR_FAIL_CONTINUES_, __VA_ARGS__))
#endif /* !CRITERION_INTERNAL_ASSERT_H_ */

View file

@ -67,5 +67,53 @@
CR_VA_TAIL(CR_VA_TAIL(__VA_ARGS__)) \
))
# undef cr_assert_file_contents_eq_str
# define cr_assert_file_contents_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, ==, __VA_ARGS__))
# undef cr_expect_file_contents_eq_str
# define cr_expect_file_contents_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, ==, __VA_ARGS__))
# undef cr_assert_file_contents_neq_str
# define cr_assert_file_contents_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, !=, __VA_ARGS__))
# undef cr_expect_file_contents_neq_str
# define cr_expect_file_contents_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, !=, __VA_ARGS__))
# undef cr_assert_file_contents_eq
# define cr_assert_file_contents_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, ==, __VA_ARGS__))
# undef cr_expect_file_contents_eq
# define cr_expect_file_contents_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, ==, __VA_ARGS__))
# undef cr_assert_file_contents_neq
# define cr_assert_file_contents_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, !=, __VA_ARGS__))
# undef cr_expect_file_contents_neq
# define cr_expect_file_contents_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, !=, __VA_ARGS__))
# undef cr_assert_stdout_eq_str
# define cr_assert_stdout_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, ==, cr_get_redirected_stdout(), __VA_ARGS__))
# undef cr_expect_stdout_eq_str
# define cr_expect_stdout_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, ==, cr_get_redirected_stdout(), __VA_ARGS__))
# undef cr_assert_stdout_neq_str
# define cr_assert_stdout_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, !=, cr_get_redirected_stdout(), __VA_ARGS__))
# undef cr_expect_stdout_neq_str
# define cr_expect_stdout_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, !=, cr_get_redirected_stdout(), __VA_ARGS__))
# undef cr_assert_stderr_eq_str
# define cr_assert_stderr_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, ==, cr_get_redirected_stderr(), __VA_ARGS__))
# undef cr_expect_stderr_eq_str
# define cr_expect_stderr_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, ==, cr_get_redirected_stderr(), __VA_ARGS__))
# undef cr_assert_stderr_neq_str
# define cr_assert_stderr_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, !=, cr_get_redirected_stderr(), __VA_ARGS__))
# undef cr_expect_stderr_neq_str
# define cr_expect_stderr_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, !=, cr_get_redirected_stderr(), __VA_ARGS__))
# undef cr_assert_stdout_eq
# define cr_assert_stdout_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, ==, cr_get_redirected_stdout(), __VA_ARGS__))
# undef cr_expect_stdout_eq
# define cr_expect_stdout_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, ==, cr_get_redirected_stdout(), __VA_ARGS__))
# undef cr_assert_stdout_neq
# define cr_assert_stdout_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, !=, cr_get_redirected_stdout(), __VA_ARGS__))
# undef cr_expect_stdout_neq
# define cr_expect_stdout_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, !=, cr_get_redirected_stdout(), __VA_ARGS__))
# undef cr_assert_stderr_eq
# define cr_assert_stderr_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, ==, cr_get_redirected_stderr(), __VA_ARGS__))
# undef cr_expect_stderr_eq
# define cr_expect_stderr_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, ==, cr_get_redirected_stderr(), __VA_ARGS__))
# undef cr_assert_stderr_neq
# define cr_assert_stderr_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, !=, cr_get_redirected_stderr(), __VA_ARGS__))
# undef cr_expect_stderr_neq
# define cr_expect_stderr_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, !=, cr_get_redirected_stderr(), __VA_ARGS__))
#endif /* !CRITERION_INTERNAL_REDIRECT_H_ */

View file

@ -104,7 +104,6 @@ CR_API CR_STDN FILE *cr_mock_file_size(size_t max_size);
CR_END_C_API
/**
* @defgroup FileAsserts File content assertions
* @{
@ -113,9 +112,6 @@ CR_END_C_API
/**
* Passes if the contents of \c File are equal to the string \c ExpectedContents
*
* Call: \c cr_assert_file_contents_eq_str(File, ExpectedContents,
* [FormatString, [Args...]])
*
* Passes if the contents of \c File are equal to the string
* \c ExpectedContents.
* Otherwise the test is marked as failure and the execution of the function
@ -125,19 +121,15 @@ CR_END_C_API
*
* @param[in] File Pointer to a FILE object that specifies an input stream
* @param[in] ExpectedContents C string with the ExpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_file_contents_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, ==, __VA_ARGS__))
# define cr_assert_file_contents_eq_str(File, ExpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c File are equal to the string \c ExpectedContents
*
* Call: \c cr_expect_file_contents_eq_str(File, ExpectedContents,
* [FormatString, [Args...]])
*
* Passes if the contents of \c File are equal to the string
* \c ExpectedContents.
* Otherwise the test is marked as failure but the execution will continue.
@ -146,20 +138,16 @@ CR_END_C_API
*
* @param[in] File Pointer to a FILE object that specifies an input stream
* @param[in] ExpectedContents C string with the ExpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_file_contents_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, ==, __VA_ARGS__))
# define cr_expect_file_contents_eq_str(File, ExpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c File are not equal to the string
* \c UnexpectedContents
*
* Call: \c cr_assert_file_contents_neq_str(File, UnexpectedContents,
* [FormatString, [Args...]])
*
* Passes if the contents of \c File are not equal to the string
* \c UnexpectedContents.
* Otherwise the test is marked as failure and the execution of the function
@ -169,19 +157,16 @@ CR_END_C_API
*
* @param[in] File Pointer to a FILE object that specifies an input stream
* @param[in] UnexpectedContents C string with the UnexpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_file_contents_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, !=, __VA_ARGS__))
# define cr_assert_file_contents_neq_str(File, UnexpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c File are not equal to the string
* \c UnexpectedContents
*
* Call: \c cr_expect_file_contents_neq_str(File, UnexpectedContents,
* [FormatString, [Args...]])
*
* Passes if the contents of \c File are not equal to the string
* \c UnexpectedContents.
* Otherwise the test is marked as failure but the execution will continue.
@ -190,19 +175,15 @@ CR_END_C_API
*
* @param[in] File Pointer to a FILE object that specifies an input stream
* @param[in] UnexpectedContents C string with the UnexpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_file_contents_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, !=, __VA_ARGS__))
# define cr_expect_file_contents_neq_str(File, UnexpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c File are equal to the contents of \c RefFile
*
* Call: \c cr_assert_file_contents_eq(File, RefFile, [FormatString,
* [Args...]])
*
* Passes if the contents of \c File are equal to the contents of \c RefFile.
* Otherwise the test is marked as failure and the execution of the function
* is aborted.
@ -211,18 +192,15 @@ CR_END_C_API
*
* @param[in] File Pointer to a FILE object that specifies an input stream
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_file_contents_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, ==, __VA_ARGS__))
# define cr_assert_file_contents_eq(File, RefFile, FormatString, ...) <internal>
/**
* Passes if the contents of \c File are equal to the contents of \c RefFile
*
* Call: \c cr_expect_file_contents_eq(File, RefFile, [FormatString,
* [Args...]])
*
* Passes if the contents of \c File are equal to the contents of \c RefFile.
* Otherwise the test is marked as failure but the execution will continue.
*
@ -230,20 +208,16 @@ CR_END_C_API
*
* @param[in] File Pointer to a FILE object that specifies an input stream
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_file_contents_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, ==, __VA_ARGS__))
# define cr_expect_file_contents_eq(File, RefFile, FormatString, ...) <internal>
/**
* Passes if the contents of \c File are not equal to the contents of
* \c RefFile
*
* Call: \c cr_assert_file_contents_neq(File, RefFile, [FormatString,
* [Args...]])
*
* Passes if the contents of \c File are not equal to the contents of
* \c RefFile.
* Otherwise the test is marked as failure and the execution of the function
@ -253,19 +227,16 @@ CR_END_C_API
*
* @param[in] File Pointer to a FILE object that specifies an input stream
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_file_contents_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, !=, __VA_ARGS__))
# define cr_assert_file_contents_neq(File, RefFile, FormatString, ...) <internal>
/**
* Passes if the contents of \c File are not equal to the contents of
* \c RefFile
*
* Call: \c cr_expect_file_contents_neq(File, RefFile, [FormatString,
* [Args...]])
*
* Passes if the contents of \c File are not equal to the contents of
* \c RefFile.
* Otherwise the test is marked as failure but the execution will continue.
@ -274,12 +245,11 @@ CR_END_C_API
*
* @param[in] File Pointer to a FILE object that specifies an input stream
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_file_contents_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, !=, __VA_ARGS__))
# define cr_expect_file_contents_neq(File, RefFile, FormatString, ...) <internal>
/**@}*/
@ -292,9 +262,6 @@ CR_END_C_API
* Passes if the contents of \c stdout are equal to the contents of the string
* \c ExpectedContents
*
* Call: \c cr_assert_stdout_eq_str(ExpectedContents, [FormatString,
* [Args...]])
*
* Passes if the contents of \c stdout are equal to the contents of the string
* \c ExpectedContents.
* Otherwise the test is marked as failure and the execution of the function
@ -303,19 +270,16 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] ExpectedContents C string with the ExpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_stdout_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, ==, cr_get_redirected_stdout(), __VA_ARGS__))
# define cr_assert_stdout_eq_str(ExpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c stdout are equal to the contents of the string
* \c ExpectedContents
*
* Call: \c cr_expect_stdout_eq_str(ExpectedContents, [FormatString,
* [Args...]])
*
* Passes if the contents of \c stdout are equal to the contents of the string
* \c ExpectedContents.
* Otherwise the test is marked as failure but the execution will continue.
@ -323,20 +287,16 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] ExpectedContents C string with the ExpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_stdout_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, ==, cr_get_redirected_stdout(), __VA_ARGS__))
# define cr_expect_stdout_eq_str(ExpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c stdout are not equal to the contents of the
* string \c UnexpectedContents
*
* Call: \c cr_assert_stdout_neq_str(UnexpectedContents, [FormatString,
* [Args...]])
*
* Passes if the contents of \c stdout are not equal to the contents of the
* string \c UnexpectedContents.
* Otherwise the test is marked as failure and the execution of the function
@ -345,19 +305,16 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] UnexpectedContents C string with the UnexpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_stdout_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, !=, cr_get_redirected_stdout(), __VA_ARGS__))
# define cr_assert_stdout_neq_str(UnexpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c stdout are not equal to the contents of the
* string \c UnexpectedContents
*
* Call: \c cr_expect_stdout_neq_str(UnexpectedContents, [FormatString,
* [Args...]])
*
* Passes if the contents of \c stdout are not equal to the contents of the
* string \c UnexpectedContents.
* Otherwise the test is marked as failure but the execution will continue.
@ -365,20 +322,16 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] UnexpectedContents C string with the UnexpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_stdout_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, !=, cr_get_redirected_stdout(), __VA_ARGS__))
# define cr_expect_stdout_neq_str(UnexpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c stderr are equal to the contents of the string
* \c ExpectedContents
*
* Call: \c cr_assert_stderr_eq_str(ExpectedContents, [FormatString,
* [Args...]])
*
* Passes if the contents of \c stderr are equal to the contents of the string
* \c ExpectedContents.
* Otherwise the test is marked as failure and the execution of the function
@ -387,19 +340,16 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] ExpectedContents C string with the ExpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_stderr_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, ==, cr_get_redirected_stderr(), __VA_ARGS__))
# define cr_assert_stderr_eq_str(ExpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c stderr are equal to the contents of the string
* \c ExpectedContents
*
* Call: \c cr_expect_stderr_eq_str(ExpectedContents, [FormatString,
* [Args...]])
*
* Passes if the contents of \c stderr are equal to the contents of the string
* \c ExpectedContents.
* Otherwise the test is marked as failure but the execution will continue.
@ -407,20 +357,16 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] ExpectedContents C string with the ExpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_stderr_eq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, ==, cr_get_redirected_stderr(), __VA_ARGS__))
# define cr_expect_stderr_eq_str(ExpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c stderr are not equal to the contents of the
* string \c UnexpectedContents
*
* Call: \c cr_assert_sterr_neq_str(UnexpectedContents, [FormatString,
* [Args...]])
*
* Passes if the contents of \c stderr are not equal to the contents of the
* string \c UnexpectedContents.
* Otherwise the test is marked as failure and the execution of the function
@ -429,19 +375,16 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] UnexpectedContents C string with the UnexpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_stderr_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_ABORT_, cr_file_match_str, !=, cr_get_redirected_stderr(), __VA_ARGS__))
# define cr_assert_stderr_neq_str(UnexpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c stderr are not equal to the contents of the
* string \c UnexpectedContents
*
* Call: \c cr_expect_sterr_neq_str(UnexpectedContents, [FormatString,
* [Args...]])
*
* Passes if the contents of \c stderr are not equal to the contents of the
* string \c UnexpectedContents.
* Otherwise the test is marked as failure but the execution will continue.
@ -449,19 +392,15 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] UnexpectedContents C string with the UnexpectedContents
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_stderr_neq_str(...) CR_EXPAND(cr_assert_redir_op_va_(CR_FAIL_CONTINUES_, cr_file_match_str, !=, cr_get_redirected_stderr(), __VA_ARGS__))
# define cr_expect_stderr_neq_str(UnexpectedContents, FormatString, ...) <internal>
/**
* Passes if the contents of \c stdout are equal to the contents of \c RefFile
*
* Call: \c cr_assert_stdout_eq(RefFile, [FormatString,
* [Args...]])
*
* Passes if the contents of \c stdout are equal to the contents of \c RefFile.
* Otherwise the test is marked as failure and the execution of the function
* is aborted.
@ -469,37 +408,31 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_stdout_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, ==, cr_get_redirected_stdout(), __VA_ARGS__))
# define cr_assert_stdout_eq(RefFile, FormatString, ...) <internal>
/**
* Passes if the contents of \c stdout are equal to the contents of \c RefFile
*
* Call: \c cr_expect_stdout_eq(RefFile, [FormatString,
* [Args...]])
*
* Passes if the contents of \c stdout are equal to the contents of \c RefFile.
* Otherwise the test is marked as failure but the execution will continue.
*
* The optional string is printed on failure.
*
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_stdout_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, ==, cr_get_redirected_stdout(), __VA_ARGS__))
# define cr_expect_stdout_eq(RefFile, FormatString, ...) <internal>
/**
* Passes if the contents of \c stdout are not equal to the contents of \c
* RefFile
*
* Call: \c cr_assert_stout_neq(RefFile, [FormatString, [Args...]])
*
* Passes if the contents of \c stdout are not equal to the contents of \c
* RefFile.
* Otherwise the test is marked as failure and the execution of the function
@ -508,18 +441,16 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_stdout_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, !=, cr_get_redirected_stdout(), __VA_ARGS__))
# define cr_assert_stdout_neq(RefFile, FormatString, ...) <internal>
/**
* Passes if the contents of \c stdout are not equal to the contents of \c
* RefFile
*
* Call: \c cr_expect_stout_neq(RefFile, [FormatString, [Args...]])
*
* Passes if the contents of \c stdout are not equal to the contents of \c
* RefFile.
* Otherwise the test is marked as failure but the execution will continue.
@ -527,18 +458,15 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_stdout_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, !=, cr_get_redirected_stdout(), __VA_ARGS__))
# define cr_expect_stdout_neq(RefFile, FormatString, ...) <internal>
/**
* Passes if the contents of \c stderr are equal to the contents of \c RefFile
*
* Call: \c cr_assert_stderr_eq(RefFile, [FormatString, [Args...]])
*
* Passes if the contents of \c stderr are equal to the contents of \c RefFile.
* Otherwise the test is marked as failure and the execution of the function
* is aborted.
@ -546,70 +474,61 @@ CR_END_C_API
* The optional string is printed on failure.
*
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_stderr_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, ==, cr_get_redirected_stderr(), __VA_ARGS__))
# define cr_assert_stderr_eq(RefFile, FormatString, ...) <internal>
/**
* Passes if the contents of \c stderr are equal to the contents of \c RefFile
*
* Call: \c cr_expect_stderr_eq(RefFile, [FormatString, [Args...]])
*
* Passes if the contents of \c stderr are equal to the contents of \c RefFile.
* Otherwise the test is marked as failure but the execution will continue.
*
* The optional string is printed on failure.
*
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_stderr_eq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, ==, cr_get_redirected_stderr(), __VA_ARGS__))
# define cr_expect_stderr_eq(RefFile, FormatString, ...) <internal>
/**
* Passes if the contents of \c stderr are not equal to the contents of \c
* RefFile
*
* Call: \c cr_expect_sterr_neq(RefFile, [FormatString, [Args...]])
*
* Passes if the contents of \c stderr are not equal to the contents of \c
* RefFile.
* Otherwise the test is marked as failure and the execution of the function
* is aborted.
*
*
* The optional string is printed on failure.
*
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_assert_stderr_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_ABORT_, cr_file_match_file, !=, cr_get_redirected_stderr(), __VA_ARGS__))
# define cr_assert_stderr_neq(RefFile, FormatString, ...) <internal>
/**
* Passes if the contents of \c stderr are not equal to the contents of \c
* RefFile
*
* Call: \c cr_expect_sterr_neq(RefFile, [FormatString, [Args...]])
*
* Passes if the contents of \c stderr are not equal to the contents of \c
* RefFile.
* Otherwise the test is marked as failure but the execution will continue.
*
*
* The optional string is printed on failure.
*
* @param[in] RefFile Pointer to a FILE object that specifies an input stream
* @param[in] FormatString printf like format string
* @param[in] Args Additional arguments depending on FormatString
* @param[in] FormatString (optional) printf-like format string
* @param[in] ... (optional) format string parameters
*
*****************************************************************************/
# define cr_expect_stderr_neq(...) CR_EXPAND(cr_assert_redir_f_op_va_(CR_FAIL_CONTINUES_, cr_file_match_file, !=, cr_get_redirected_stderr(), __VA_ARGS__))
# define cr_expect_stderr_neq(RefFile, FormatString, ...) <internal>
/**@}*/