Updated documentation on asserts
This commit is contained in:
parent
8986414138
commit
5e275da558
1 changed files with 48 additions and 0 deletions
|
@ -94,3 +94,51 @@ cr_assert_arr_gt_cmp(Actual, Reference, Size, Cmp, [Message, [Args...]]) ``Ac
|
|||
cr_assert_arr_geq_cmp(Actual, Reference, Size, Cmp, [Message, [Args...]]) ``Actual`` is comparatively greater or equal to ``Reference`` Only available in C++ and GNU C99
|
||||
=========================================================================== =========================================================================== ===========================================
|
||||
|
||||
Exception Assertions
|
||||
--------------------
|
||||
|
||||
The following assertion macros are only defined for C++.
|
||||
|
||||
=========================================================================== =========================================================================== ===========================================
|
||||
Macro Passes if and only if Notes
|
||||
=========================================================================== =========================================================================== ===========================================
|
||||
cr_assert_throw(Statement, Exception, [Message, [Args...]]) ``Statement`` throws an instance of ``Exception``.
|
||||
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_no_throw(Statement, Exception, [Message, [Args...]]) ``Statement`` does not throws an instance of ``Exception``.
|
||||
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_any_throw(Statement, [Message, [Args...]]) ``Statement`` throws any kind of exception.
|
||||
--------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_none_throw(Statement, [Message, [Args...]]) ``Statement`` does not throw any exception.
|
||||
=========================================================================== =========================================================================== ===========================================
|
||||
|
||||
File Assertions
|
||||
---------------
|
||||
|
||||
=============================================================================== ============================================================================ ===========================================
|
||||
Macro Passes if and only if Notes
|
||||
=============================================================================== ============================================================================ ===========================================
|
||||
cr_assert_file_contents_eq_str(File, ExpectedContents, [Message, [Args...]]) The contents of ``File`` are equal to the string ``ExpectedContents``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_file_contents_neq_str(File, ExpectedContents, [Message, [Args...]]) The contents of ``File`` are not equal to the string ``ExpectedContents``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_stdout_eq_str(ExpectedContents, [Message, [Args...]]) The contents of ``stdout`` are equal to the string ``ExpectedContents``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_stdout_neq_str(ExpectedContents, [Message, [Args...]]) The contents of ``stdout`` are not equal to the string ``ExpectedContents``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_stderr_eq_str(ExpectedContents, [Message, [Args...]]) The contents of ``stderr`` are equal to the string ``ExpectedContents``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_stderr_neq_str(ExpectedContents, [Message, [Args...]]) The contents of ``stderr`` are not equal to the string ``ExpectedContents``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_file_contents_eq(File, RefFile, [Message, [Args...]]) The contents of ``File`` are equal to the contents of ``RefFile``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_file_contents_neq(File, RefFile, [Message, [Args...]]) The contents of ``File`` are not equal to the contents of ``RefFile``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_stdout_eq(RefFile, [Message, [Args...]]) The contents of ``stdout`` are equal to the contents of ``RefFile``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_stdout_neq(RefFile, [Message, [Args...]]) The contents of ``stdout`` are not equal to the contents of ``RefFile``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_stderr_eq(RefFile, [Message, [Args...]]) The contents of ``stderr`` are equal to the contents of ``RefFile``.
|
||||
------------------------------------------------------------------------------- ---------------------------------------------------------------------------- -------------------------------------------
|
||||
cr_assert_stderr_neq(RefFile, [Message, [Args...]]) The contents of ``stderr`` are not equal to the contents of ``RefFile``.
|
||||
=============================================================================== ============================================================================ ===========================================
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue