obnox/cmocka.git
4 years agocmocka: fix doxygen comment for assert_not_in_range() master
Michael Adam [Thu, 29 May 2014 14:00:11 +0000 (16:00 +0200)]
cmocka: fix doxygen comment for assert_not_in_range()

Signed-off-by: Michael Adam <obnox@samba.org>
4 years agocmocka: fix doxygen comment for assert_in_range()
Michael Adam [Thu, 29 May 2014 13:57:37 +0000 (15:57 +0200)]
cmocka: fix doxygen comment for assert_in_range()

Signed-off-by: Michael Adam <obnox@samba.org>
4 years agocmocka: fix doxygen comment for assert_return_code()
Michael Adam [Thu, 29 May 2014 13:55:11 +0000 (15:55 +0200)]
cmocka: fix doxygen comment for assert_return_code()

Signed-off-by: Michael Adam <obnox@samba.org>
4 years agoBump version to 0.4.1.
Andreas Schneider [Thu, 22 May 2014 12:40:35 +0000 (14:40 +0200)]
Bump version to 0.4.1.

4 years agocmake: Fix cmocka cmake-config files.
Andreas Schneider [Thu, 22 May 2014 12:34:11 +0000 (14:34 +0200)]
cmake: Fix cmocka cmake-config files.

4 years agodoc: Improve documentation for fail_msg().
Andreas Schneider [Tue, 20 May 2014 09:03:39 +0000 (11:03 +0200)]
doc: Improve documentation for fail_msg().

BUG: https://open.cryptomilk.org/issues/29

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
5 years agocmake: Install cmake config to the correct directory.
Andreas Schneider [Wed, 16 Apr 2014 13:46:10 +0000 (15:46 +0200)]
cmake: Install cmake config to the correct directory.

5 years agocmocka: Fix type of number_of_test_states which can be negative.
Andreas Schneider [Tue, 15 Apr 2014 15:21:30 +0000 (17:21 +0200)]
cmocka: Fix type of number_of_test_states which can be negative.

5 years agoCorrectly report the number of tests without the number of setup/teardown functions...
Sebastian Dröge [Tue, 15 Apr 2014 12:38:07 +0000 (14:38 +0200)]
Correctly report the number of tests without the number of setup/teardown functions included

Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agocmocka: Add CMOCKA_TEST_ABORT env variable to leave threading apps.
Andreas Schneider [Tue, 15 Apr 2014 14:58:25 +0000 (16:58 +0200)]
cmocka: Add CMOCKA_TEST_ABORT env variable to leave threading apps.

BUG: https://open.cryptomilk.org/issues/26

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
5 years agocoverity: Add _assert_return_code model.
Andreas Schneider [Tue, 15 Apr 2014 14:49:07 +0000 (16:49 +0200)]
coverity: Add _assert_return_code model.

5 years agocmake: Ignore .ycm_extra_conf.pyc.
Andreas Schneider [Mon, 14 Apr 2014 07:23:23 +0000 (09:23 +0200)]
cmake: Ignore .ycm_extra_conf.pyc.

5 years agodoc: Document the group functions.
Andreas Schneider [Fri, 11 Apr 2014 14:49:27 +0000 (16:49 +0200)]
doc: Document the group functions.

5 years agoinclude: Fix count parameter of expect_check() macro
Sebastian Dröge [Fri, 7 Feb 2014 16:51:21 +0000 (17:51 +0100)]
include: Fix count parameter of expect_check() macro

It was always using 0, which meant that the values were never
ever used. This commit changes it to 1, which is consistent with
the other macros.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
5 years agoBump version to 0.4.0.
Andreas Schneider [Fri, 11 Apr 2014 13:22:07 +0000 (15:22 +0200)]
Bump version to 0.4.0.

5 years agocmocka: Define inline if not defined with MSVC.
Andreas Schneider [Fri, 11 Apr 2014 13:43:12 +0000 (15:43 +0200)]
cmocka: Define inline if not defined with MSVC.

5 years agoAdd YouCompleteMe config.
Andreas Schneider [Fri, 11 Apr 2014 12:44:48 +0000 (14:44 +0200)]
Add YouCompleteMe config.

You should use 'obj' as your build directory.

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
5 years agotests: Add test_group_fixtures.
Andreas Schneider [Mon, 23 Dec 2013 18:06:11 +0000 (19:06 +0100)]
tests: Add test_group_fixtures.

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
5 years agocmocka: Add support for test groups.
Andreas Schneider [Mon, 23 Dec 2013 18:05:14 +0000 (19:05 +0100)]
cmocka: Add support for test groups.

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
5 years agocmake: Update UseDoxygen.cmake.
Andreas Schneider [Thu, 10 Apr 2014 09:28:22 +0000 (11:28 +0200)]
cmake: Update UseDoxygen.cmake.

5 years agotests: Improve the fixture test.
Andreas Schneider [Thu, 10 Apr 2014 09:23:17 +0000 (11:23 +0200)]
tests: Improve the fixture test.

This way we make sure we don't run into an assert if we have more
teardown functions than setup functions.

5 years agocmocka: Add a dummy function for setup and teardown.
Andreas Schneider [Thu, 10 Apr 2014 09:22:16 +0000 (11:22 +0200)]
cmocka: Add a dummy function for setup and teardown.

We need a matching number for setup and teardown functions else we can
run in an assert. So this adds a dummy which doesn't do anything.

5 years agocmake: Create the compile command database by default.
Andreas Schneider [Wed, 9 Apr 2014 08:10:57 +0000 (10:10 +0200)]
cmake: Create the compile command database by default.

5 years agodoc: Fix some typos.
Andreas Schneider [Wed, 9 Apr 2014 08:10:48 +0000 (10:10 +0200)]
doc: Fix some typos.

5 years agoTest should not be run if setup function fails
Lukas Slebodnik [Wed, 26 Feb 2014 12:45:02 +0000 (13:45 +0100)]
Test should not be run if setup function fails

Assertions are commonly used in setup function. If setup function fail
test should not be executed, because it may result into unexpected behaviour
(crash)

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
5 years agobasic_test should be run with other CMOCKA_TESTS
Lukas Slebodnik [Wed, 26 Feb 2014 12:46:18 +0000 (13:46 +0100)]
basic_test should be run with other CMOCKA_TESTS

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
5 years agoUse prefix for commonly used macro PRINTF_ATTRIBUTE
Lukas Slebodnik [Fri, 21 Feb 2014 10:45:27 +0000 (11:45 +0100)]
Use prefix for commonly used macro PRINTF_ATTRIBUTE

It may cause warning:
/usr/include/cmocka.h:50:0: warning: "PRINTF_ATTRIBUTE" redefined
    [enabled by default]

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
5 years agoEnable warning Wundef
Lukas Slebodnik [Fri, 21 Feb 2014 10:58:03 +0000 (11:58 +0100)]
Enable warning Wundef

It is better to use "#ifdef" for testing macros instead of "#if"
In header file, "#ifdef DOXYGEN" was used 30 times and "#if DOXYGEN"
23 times. This patch makes it consistent and enable warning Wundef to prevent
this kind of issues.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
5 years agoUse static modifier for temporary_buffer
Lukas Slebodnik [Fri, 21 Feb 2014 12:37:46 +0000 (13:37 +0100)]
Use static modifier for temporary_buffer

temporary_buffer is used only in the module calculator_test.c
It's better to use use static modifier explicitly in this case.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
5 years agoUse better formatting string for printing numbers
Lukas Slebodnik [Fri, 21 Feb 2014 10:22:50 +0000 (11:22 +0100)]
Use better formatting string for printing numbers

Numbers were printed as hexadecimal.n eror message,
It is good practice to print "0x" before hexadecimal numbers,
because it may be confusing without this.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
5 years agocmake: Do not build the chef_wrap example on OSX.
Andreas Schneider [Wed, 22 Jan 2014 14:50:40 +0000 (15:50 +0100)]
cmake: Do not build the chef_wrap example on OSX.

5 years agocmake: Add cmake config mode support.
Andreas Schneider [Mon, 20 Jan 2014 22:39:19 +0000 (23:39 +0100)]
cmake: Add cmake config mode support.

5 years agotests: Close the fd in test_assert_macros_fail.
Andreas Schneider [Tue, 24 Dec 2013 08:26:42 +0000 (09:26 +0100)]
tests: Close the fd in test_assert_macros_fail.

This is not really necessary but it fixes Coverity.

CID #1146810

5 years agoRevert "tests: Use internal allocation for test_fixtures."
Andreas Schneider [Mon, 23 Dec 2013 18:58:34 +0000 (19:58 +0100)]
Revert "tests: Use internal allocation for test_fixtures."

This reverts commit eb3613e6b4c7b1d6d3a6593bd20ce8654e6bc5b8.

5 years agocmocka: Fix typo in the docs.
Andreas Schneider [Mon, 23 Dec 2013 15:16:01 +0000 (16:16 +0100)]
cmocka: Fix typo in the docs.

5 years agocmake: Run examples in 'make test' too.
Andreas Schneider [Mon, 23 Dec 2013 15:13:51 +0000 (16:13 +0100)]
cmake: Run examples in 'make test' too.

5 years agotests: Add test_basics.
Andreas Schneider [Mon, 23 Dec 2013 15:12:23 +0000 (16:12 +0100)]
tests: Add test_basics.

5 years agotests: Use internal allocation for test_fixtures.
Andreas Schneider [Mon, 23 Dec 2013 18:06:07 +0000 (19:06 +0100)]
tests: Use internal allocation for test_fixtures.

5 years agotests: Add test_fixtures.
Andreas Schneider [Mon, 23 Dec 2013 15:07:46 +0000 (16:07 +0100)]
tests: Add test_fixtures.

5 years agotests: Add test_exception_handler_fail.
Andreas Schneider [Mon, 23 Dec 2013 15:06:04 +0000 (16:06 +0100)]
tests: Add test_exception_handler_fail.

5 years agotests: Add test_assert_macros_fail.
Andreas Schneider [Mon, 23 Dec 2013 15:03:50 +0000 (16:03 +0100)]
tests: Add test_assert_macros_fail.

5 years agotests: Add test_assert_macros.
Andreas Schneider [Mon, 23 Dec 2013 15:00:07 +0000 (16:00 +0100)]
tests: Add test_assert_macros.

5 years agocmocka: Add assert_return_code().
Andreas Schneider [Mon, 23 Dec 2013 14:38:00 +0000 (15:38 +0100)]
cmocka: Add assert_return_code().

5 years agoexample: Define UNIT_TESTING in run_tests.c.
Andreas Schneider [Sat, 21 Dec 2013 16:22:35 +0000 (17:22 +0100)]
example: Define UNIT_TESTING in run_tests.c.

This makes sure we ue the unit test allocators.

5 years agocmake: Fix calling the assert_module test.
Andreas Schneider [Sat, 21 Dec 2013 16:19:22 +0000 (17:19 +0100)]
cmake: Fix calling the assert_module test.

5 years agodoc: Improve the API mainpage.
Andreas Schneider [Thu, 19 Dec 2013 17:00:17 +0000 (18:00 +0100)]
doc: Improve the API mainpage.

5 years agoexample: Add the most simple test with cmocka.
Andreas Schneider [Fri, 13 Dec 2013 09:54:53 +0000 (10:54 +0100)]
example: Add the most simple test with cmocka.

5 years agoexample: Fix exception handler test on Solaris.
Andreas Schneider [Fri, 13 Dec 2013 09:51:04 +0000 (10:51 +0100)]
example: Fix exception handler test on Solaris.

5 years agoAdd obj directory for config.h to .clang_complete.
Andreas Schneider [Fri, 13 Dec 2013 09:55:11 +0000 (10:55 +0100)]
Add obj directory for config.h to .clang_complete.

5 years agoexample: Add an exampele to test exception handling.
Andreas Schneider [Wed, 11 Dec 2013 17:52:12 +0000 (18:52 +0100)]
example: Add an exampele to test exception handling.

5 years agocmocka: Print better message for exceptions.
Andreas Schneider [Wed, 11 Dec 2013 17:51:25 +0000 (18:51 +0100)]
cmocka: Print better message for exceptions.

5 years agoconfig: Add missing define for strsignal().
Andreas Schneider [Wed, 11 Dec 2013 17:51:04 +0000 (18:51 +0100)]
config: Add missing define for strsignal().

5 years agocmake: Fix compilation with -D_FORTIFY_SOURCE.
Andreas Schneider [Thu, 28 Nov 2013 13:10:03 +0000 (14:10 +0100)]
cmake: Fix compilation with -D_FORTIFY_SOURCE.

5 years agoAdd obj directory to .gitignore.
Andreas Schneider [Wed, 6 Nov 2013 08:25:38 +0000 (09:25 +0100)]
Add obj directory to .gitignore.

5 years agocmake: Exclude obj directory.
Andreas Schneider [Wed, 6 Nov 2013 07:13:01 +0000 (08:13 +0100)]
cmake: Exclude obj directory.

5 years agoUpdate ChangeLog.
Andreas Schneider [Wed, 6 Nov 2013 06:54:45 +0000 (07:54 +0100)]
Update ChangeLog.

5 years agoinclude: Don't stringify twice with will_return_always().
Travis Hendrickson [Sun, 27 Oct 2013 14:58:29 +0000 (15:58 +0100)]
include: Don't stringify twice with will_return_always().

5 years agoinclude: Fix unit_test_teardown macro.
Andreas Schneider [Sun, 27 Oct 2013 14:54:53 +0000 (15:54 +0100)]
include: Fix unit_test_teardown macro.

5 years agoFix GTest and GCC message style conformance
Aleksandr Vinokurov [Wed, 21 Aug 2013 14:38:39 +0000 (18:38 +0400)]
Fix GTest and GCC message style conformance

Move file:line ids to the beginning of the strings, adding 'note' levels as in GCC style

5 years agodoc: Update the main doc page.
Andreas Schneider [Sun, 11 Aug 2013 10:12:05 +0000 (12:12 +0200)]
doc: Update the main doc page.

5 years agocmake: Disable broken latex doc generation.
Andreas Schneider [Sun, 11 Aug 2013 10:11:50 +0000 (12:11 +0200)]
cmake: Disable broken latex doc generation.

5 years agoinclude: Correctly define unit_test_setup() and unit_test_teardown().
Andreas Schneider [Mon, 29 Jul 2013 17:35:34 +0000 (19:35 +0200)]
include: Correctly define unit_test_setup() and unit_test_teardown().

Thanks to James Grenning <james@grenning.net>.

5 years agocoverity: Add modeling file for assert functions.
Andreas Schneider [Mon, 29 Jul 2013 17:39:46 +0000 (19:39 +0200)]
coverity: Add modeling file for assert functions.

5 years agoREADME: Fix a typo and improve cmocka cmldine.
Andreas Schneider [Thu, 25 Jul 2013 21:03:02 +0000 (23:03 +0200)]
README: Fix a typo and improve cmocka cmldine.

Thanks to James Grenning <james@grenning.net>.

5 years agocmake: Fix description and display name.
Andreas Schneider [Wed, 24 Jul 2013 09:15:25 +0000 (11:15 +0200)]
cmake: Fix description and display name.

5 years agocmake: Fix a typo in FindNSIS.
Andreas Schneider [Wed, 24 Jul 2013 09:13:07 +0000 (11:13 +0200)]
cmake: Fix a typo in FindNSIS.

5 years agocmake: Update FindNSIS module.
Andreas Schneider [Wed, 24 Jul 2013 09:09:11 +0000 (11:09 +0200)]
cmake: Update FindNSIS module.

5 years agocmake: Fix homepage url.
Andreas Schneider [Wed, 24 Jul 2013 08:43:11 +0000 (10:43 +0200)]
cmake: Fix homepage url.

5 years agocmake: Bump version number and so version.
Andreas Schneider [Wed, 24 Jul 2013 08:21:56 +0000 (10:21 +0200)]
cmake: Bump version number and so version.

5 years agoexample: Add missing stdlib.h.
Andreas Schneider [Wed, 24 Jul 2013 08:08:44 +0000 (10:08 +0200)]
example: Add missing stdlib.h.

This fixes a build error on Windows.

5 years agoAdd .gitignore.
Andreas Schneider [Wed, 24 Jul 2013 08:03:31 +0000 (10:03 +0200)]
Add .gitignore.

5 years agoinclude: Don't redefine uintptr_t on Windows.
Andreas Schneider [Wed, 24 Jul 2013 08:00:19 +0000 (10:00 +0200)]
include: Don't redefine uintptr_t on Windows.

Visual Studio defines _UINTPTR_T_DEFINED if we have uintptr_t.

5 years agocmake: Set nightly start time to UTC.
Andreas Schneider [Wed, 24 Jul 2013 06:19:25 +0000 (08:19 +0200)]
cmake: Set nightly start time to UTC.

5 years agoAdd new macro will_return_always
Pavel Březina [Thu, 18 Jul 2013 11:19:08 +0000 (13:19 +0200)]
Add new macro will_return_always

Signed-off-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
5 years agoAdd new macro fail_msg
Pavel Březina [Wed, 17 Jul 2013 09:07:39 +0000 (11:07 +0200)]
Add new macro fail_msg

Signed-off-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
5 years agocov: Add coverity modeling file.
Andreas Schneider [Fri, 12 Jul 2013 10:23:18 +0000 (12:23 +0200)]
cov: Add coverity modeling file.

5 years agocmake: Pass _FORTIFY_SOURCE directly to the preprocessor.
Andreas Schneider [Wed, 10 Jul 2013 14:37:39 +0000 (16:37 +0200)]
cmake: Pass _FORTIFY_SOURCE directly to the preprocessor.

5 years agocmake: Bump version to 0.3.1.
Andreas Schneider [Wed, 10 Jul 2013 13:29:49 +0000 (15:29 +0200)]
cmake: Bump version to 0.3.1.

5 years agosrc: Fix a typo.
Andreas Schneider [Wed, 10 Jul 2013 13:21:25 +0000 (15:21 +0200)]
src: Fix a typo.

5 years agosrc: Fix ValuePointer conversion on 32bit big endian.
Andreas Schneider [Wed, 10 Jul 2013 13:19:26 +0000 (15:19 +0200)]
src: Fix ValuePointer conversion on 32bit big endian.

5 years agoexample: Fix customer database test on big endian.
Andreas Schneider [Wed, 10 Jul 2013 10:53:34 +0000 (12:53 +0200)]
example: Fix customer database test on big endian.

5 years agoexamples: Fix memory leaks in the waiter_test.
Andreas Schneider [Tue, 11 Jun 2013 07:50:43 +0000 (09:50 +0200)]
examples: Fix memory leaks in the waiter_test.

5 years agoexamples: Fix build warning in waiter_test.
Andreas Schneider [Tue, 11 Jun 2013 07:41:11 +0000 (09:41 +0200)]
examples: Fix build warning in waiter_test.

5 years agoUpdate AUTHORS file.
Andreas Schneider [Wed, 5 Jun 2013 10:07:24 +0000 (12:07 +0200)]
Update AUTHORS file.

5 years agoChange version number of the package.
Andreas Schneider [Wed, 5 Jun 2013 06:29:27 +0000 (08:29 +0200)]
Change version number of the package.

5 years agoFix date in the changelog.
Andreas Schneider [Wed, 5 Jun 2013 06:16:15 +0000 (08:16 +0200)]
Fix date in the changelog.

5 years agodoc: Add some more documentation for Mock Objects.
Andreas Schneider [Tue, 4 Jun 2013 16:16:38 +0000 (18:16 +0200)]
doc: Add some more documentation for Mock Objects.

5 years agodoc: Document expect_memory().
Andreas Schneider [Tue, 4 Jun 2013 14:39:42 +0000 (16:39 +0200)]
doc: Document expect_memory().

5 years agodoc: Document expect_any().
Andreas Schneider [Tue, 4 Jun 2013 14:32:33 +0000 (16:32 +0200)]
doc: Document expect_any().

5 years agodoc: Fix doc build.
Andreas Schneider [Tue, 4 Jun 2013 14:32:25 +0000 (16:32 +0200)]
doc: Fix doc build.

5 years agodoc: Document expect_value().
Andreas Schneider [Tue, 4 Jun 2013 14:01:20 +0000 (16:01 +0200)]
doc: Document expect_value().

5 years agodoc: document expect_range family of functions
Jakub Hrozek [Tue, 4 Jun 2013 12:51:48 +0000 (14:51 +0200)]
doc: document expect_range family of functions

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
5 years agodoc: Fix the doc of the count parameter in expect_*().
Andreas Schneider [Tue, 4 Jun 2013 12:04:44 +0000 (14:04 +0200)]
doc: Fix the doc of the count parameter in expect_*().

5 years agodoc: Fix typo in expect_not_in_set_count().
Andreas Schneider [Tue, 4 Jun 2013 11:49:07 +0000 (13:49 +0200)]
doc: Fix typo in expect_not_in_set_count().

5 years agoAdd cmocka-0.3.0 changes to ChangeLog.
Andreas Schneider [Tue, 4 Jun 2013 11:47:01 +0000 (13:47 +0200)]
Add cmocka-0.3.0 changes to ChangeLog.

5 years agodoc: Add comment to check_expected().
Andreas Schneider [Tue, 4 Jun 2013 10:47:42 +0000 (12:47 +0200)]
doc: Add comment to check_expected().

5 years agodoc: Add example for parameter checking.
Andreas Schneider [Tue, 4 Jun 2013 10:46:16 +0000 (12:46 +0200)]
doc: Add example for parameter checking.

5 years agodoc: Document expect_string*()
Andreas Schneider [Tue, 4 Jun 2013 10:39:22 +0000 (12:39 +0200)]
doc: Document expect_string*()

5 years agodoc: Document expect_in_set().
Andreas Schneider [Tue, 4 Jun 2013 10:25:39 +0000 (12:25 +0200)]
doc: Document expect_in_set().

5 years agodoc: Update doxygen config.
Andreas Schneider [Tue, 4 Jun 2013 10:23:49 +0000 (12:23 +0200)]
doc: Update doxygen config.