summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-12-27Imported Upstream version 1.1.5upstream/1.1.5cmocka-1.1.5upstreamTizenOpenSource22-47/+602
2022-12-27Imported Upstream version 1.1.3cmocka-1.1.3JinWang An52-2686/+828
2022-12-27Imported Upstream version 1.1.2cmocka-1.1.2JinWang An56-2786/+5321
2017-06-22src: Initialize teardown_name to fix a build warningsandbox/kopasiak/upstreamAndreas Schneider1-1/+1
BUG #60
2017-04-07Bump version to 1.1.1cmocka-1.1.1Andreas Schneider2-2/+8
2017-04-07cmocka: Change define to HAVE_CLOCK_REALTIMEAndreas Schneider3-3/+3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2017-04-05src: Do not use C++ keywords as local variablesAndreas Schneider1-5/+5
2017-04-05Fix TAP output and summary.Stas Kobzar2-20/+20
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2017-03-07Update doxygen configAndreas Schneider2-117/+201
2017-01-22doxygen: Allow space in path namesMartin Fischer1-8/+8
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-12-17Remove dangling unit test source file.Terje Runde1-95/+0
2016-11-12cmake: Add -Wstrict-prototypes during buildAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-12src: Add support for compile flag -Wstrict-prototypesAdrian Friedli3-6/+6
2016-11-07cmocka: Leave if expected_call is NULLAndreas Schneider1-2/+3
CID 1365415 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-10-04Fixed xUnit output durationsAdrien Marc1-2/+2
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-10-03This patch allows cmocka to be run under windows 64-bitNikos Mavrogiannopoulos1-1/+1
In that system while the maximum word size is 64-bits, the 'unsigned long int' type is only 32-bits. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-09-21cpack: Ignore all object directoriesAndreas Schneider1-1/+1
2016-09-21Bump version to 1.1.0Andreas Schneider2-3/+15
2016-09-21tests: Add test_groups test to validate xml outputDavid Schneider2-15/+127
This is for multiple groups in one test to make sure they do not create invalid xml. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-09-21cmocka: Do not add xml headers twiceAndreas Schneider2-6/+34
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-09-21cmocka: Add file pattern to create xml file for each groupAndreas Schneider1-0/+46
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-09-21Fixed format specifier width mismatchJoseph Ates2-7/+28
On some platforms PRIu64 is not necessarily the width of the LargestIntegralType. A new decimal format specifier for LargestIntegralType was added and replaces the invocations of PRIu64.
2016-09-21cmocka: Use defines for WILL_RETURN valuesAndreas Schneider2-3/+6
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-06-02vcm_print_error: fix segfault on long messagesAris Adamantiadis1-5/+7
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-03-03cmake: Fix possible issues with librt during configureAndreas Schneider1-7/+9
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmake: Add MinGW DLL Prefix WorkaroundJoseph Ates3-25/+43
CMake assigns "lib" as the prefix to shared libraries on MinGW GCC, but MinGW does not expect such a prefix when linking to DLLs. By setting, CMAKE_SHARED_LIBRARY_PREFIX to "" the example tests were able to run with the exception of the calculator_test which segfaults (SIGSEGV) on the setjmp in test_divide_by_zero. This fault is specific to MinGW and does not occur within runs on Cygwin or Visual Studio. calculator_test was enabled only for static linking on MinGW Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Add VS2015 supportJoseph Ates2-2/+6
Visual Studio now includes support for vsnprintf and snprintf but does so as an inline functions. check_symbol_exists is used to check for its existence within stdio. [3] All tests are passing when run from within the IDE or via NMake. Command line builds via msbuild seem to error for the first few example tests. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Add will_return_maybe() for ignoring mock returnsJoseph Ates6-7/+289
As both parameter and function call order checking allow for ignoring cases where they are never invoked, the mock return values are at somewhat of a mismatch in that they must always be returned at least once (even in the case of will_return_always()). Therefore, the ability to set the count to -2 on will_return_count was added with a new macro (will_return_maybe) that indicates that that the value field may never be returned and still allow a successful test. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Fix indentationJoseph Ates1-3/+3
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Include strings.h for strcasecmpEmil Velikov1-0/+4
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10tests: Add a group setup assert testAndreas Schneider2-0/+45
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Print group setup and teardown errorsAndreas Schneider1-1/+15
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-12-18tests: Add test for call ordering functionalityJoseph Ates3-1/+218
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-12-18cmocka: Add support to verify call orderingJoseph Ates3-12/+322
2015-10-28Ignore all build and obj* directoresAndreas Schneider2-3/+3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-10-19INSTALL: Add Testing sectionAndreas Schneider1-0/+22
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-10-07INSTALL: Add example for WindowsAndreas Schneider1-1/+6
Looks like it isn't clear for some people reading that file that we support Windows and MSVC ...
2015-10-05src: Fix some compiler warningsAndreas Schneider1-5/+5
BUG: https://open.cryptomilk.org/issues/43
2015-09-30src: Use variable name for accessing the array elementsAndreas Schneider1-3/+3
2015-09-30include: Improve documentation for prestate macrosAndreas Schneider1-8/+10
2015-09-23cmocka: Allow to pass initial data to test casesPawel Szewczyk4-4/+63
Sometimes multiple test cases share the same test function, running it on different data. To pass this data to test functions we must define setup function for each data set. It's not very convienient when there are many states to test. This commit introduce more elegant way to pass data to tests. The initial_state field of CMUnitTest structure can be defined by user. It will be either passed to setup function, which makes any preparation needed, or it will be passed directly to test function when setup func is NULL. Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
2015-09-14src: Simplify exception_handler()Andreas Schneider1-3/+6
2015-09-14test: update test_segfault_recovery to try multiple faultsJonathon Reinhart1-0/+2
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-14Use sigsetjmp()/siglongjmp() when availableJonathon Reinhart3-4/+22
Without using siglongjmp, the signal mask is not restored when longjmp-ing from the signal handler, and whichever signal was being handled remains blocked for the remainder of the tests. As a result, the same signal cannot be caught twice, and will cause process termination when being raised the second time. This does not change 'jmp_buf global_expect_assert_env', because it is part of the public API, and isn't used from a signal handler. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-09src: Improve error reporting with cmocka default outputAndreas Schneider1-2/+13
Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-09-07src: Filter out invalid tests.Andreas Schneider1-9/+16
2015-08-04include: Protect config.h inclusionAndreas Schneider1-0/+2
Thanks to Gregory Pakosz. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-08-01include: Add va_copy macro if MSVC doesn't provide itAndreas Schneider1-0/+4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-07-07cmake: Fix warning on OSXAndreas Schneider1-0/+6
2015-07-07def: Add missing cmocka_set_message_output symbolAndreas Schneider1-0/+1