./devel/check, Unit test framework for C

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 0.12.0, Package name: check-0.12.0, Maintainer: pkgsrc-users

Check is a unit test framework for C. It features a simple interface
for defining unit tests, putting little in the way of the developer.
Tests are run in a separate address space, so Check can catch both
assertion failures and code errors that cause segmentation faults or
other signals. The output from unit tests can be used within source code
editors and IDEs.

There is a tutorial introduction to check at

http://check.sourceforge.net/tutorial.html

This includes a brief comparison of check with other C unit test
frameworks, such as GNU Autounit, cUnit, and CUnit.

Check was inspired by similar frameworks that currently exist for most
programming languages; the most famous example being JUnit for Java
(www.junit.org). There is a list of unit test frameworks for multiple
languages at www.xprogramming.com/software.htm .


Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: 2c10a4c09af75f32d58239097ab249ec60f38e88
RMD160: bc2246f95268ae3dc0b45a9fed6832ab3dce7836
Filesize: 274.538 KB

Version history: (Expand)


CVS history: (Expand)


   2018-04-04 13:46:26 by Jonathan Perkin | Files touched by this commit (1)
Log message:
check: Requires pkg-config.
   2018-03-30 21:16:55 by Amitai Schleier | Files touched by this commit (3) | Package updated
Log message:
Update to 0.12.0. From the changelog:

* Fix out-of-tree builds with CMake.
  Issue #86

* Fix issue found with Clang regarding invalid suffix on a literal
  Issue #110

* Check now responds to a few errors in a more clear way when it cannot run tests.
  PR #122, #123

* Fix missing pid_t definition in check.h on Windows
  Issue #78

* The maximum message size of check assertions is now configurable.
  Issue #127

* Check support added for Visual Studios 2010, 2012, 2013, 2015, and
  2017 both for x86/64 and ARM.
  PR #129, Issue #125

* Changed license of example CMake files to BSD (was previously LGPL).
  Issue #131

* Fix issue with floating point macros on MinGW
  Issue #101

* Avoid issue in unit test output checking where a shell's built-in printf
  command does not work properly, but the printf program itself is correct.

* Emit only valid XML characters in XML logging (assumes ASCII encoding).
  Bug #103

* Add LGPL header to files where it was missing; update FSF address in LGPL headers
  Bug #110

* Strip timestamps from examples using filterdiff if available. This
  allow build output to be reproducible.
  Bug #112

* Use double slash for regular expressions in checkmk for better Solaris support.

* Improve CMake build files for better Visual Studio 2015 support.
  Pull Request #19

* Fix potential SIGSEGV in Check related to the disk filling up during a test.
  Pull Request #21

* Support added for applying tags to test cases and selectively running
  test cases based on tags.
  Pull Request #44

* Macros for comparing memory regions (ck_assert_mem_eq, ck_assert_mem_ne)
  have been added.
  Pull Request #64

* Macros for comparing floating point numbers have been added.
  Pull Request #69

* Macros for comparing string, but allowing for NULL (ck_assert_pstr_eq,
  ck_assert_pstr_ne) have been added.
  Pull Request #80

* Macros for checking if a pointer is NULL or not have been added.
  Pull Request #87
   2016-06-17 04:25:47 by Amitai Schlair | Files touched by this commit (2) | Package updated
Log message:
Update to 0.10.0. From the changelog:

* CMake on MinGW and MSVC was unable to find time related types because
  time.h was not included. This header is now included for the checks.
  Patch #53.

* If the test runner process catches a SIGTERM or SIGINT signal the running
  tests are now also killed.
  Patch #52.

* If Check is compiled without support for fork(), the behavior of
  functions which require fork() to be useful have been changed.
  Functions that attempt to set CK_FORK mode are no-ops,
  check_fork() returns in failure, and check_waitpid_and_exit()
  exits in failure.

* Add space around operators in assert messages for readability.
  Bug #102.

* Use mkstemp() if available instead of tmpfile() or tempnam().
  Patch #51.

* Fix issue with string formatting in ck_assert(), where using
  the % operator would be interpreted as a string formatter. Bug #96.

* In nofork mode, the location of a failed assertion within a test
  case was lost if that test case has a checked teardown fixture
  (even if that fixture function is empty). This is now fixed.
  Bug #99
   2015-11-03 04:29:40 by Alistair G. Crooks | Files touched by this commit (1995)
Log message:
Add SHA512 digests for distfiles for devel category

Issues found with existing distfiles:
	distfiles/eclipse-sourceBuild-srcIncluded-3.0.1.zip
	distfiles/fortran-utils-1.1.tar.gz
	distfiles/ivykis-0.39.tar.gz
	distfiles/enum-1.11.tar.gz
	distfiles/pvs-3.2-libraries.tgz
	distfiles/pvs-3.2-linux.tgz
	distfiles/pvs-3.2-solaris.tgz
	distfiles/pvs-3.2-system.tgz
No changes made to these distinfo files.

Otherwise, existing SHA1 digests verified and found to be the same on
the machine holding the existing distfiles (morden).  All existing
SHA1 digests retained for now as an audit trail.
   2014-12-12 08:38:43 by Makoto Fujiwara | Files touched by this commit (2) | Package updated
Log message:
Update 0.9.10 to 0.9.14
-----------------------
Sat July 26, 2014: Released Check 0.9.14
  based on r1174 (2014-07-03 18:43:49 +0000)

* Changes to (unofficially for now) support Solaris and AIX platforms.

* Fix issue with checked teardown functions in CK_NOFORK mode. If
  the teardown function called an assertion that failed, an
  infinate loop would result. Bug#98. As a result of the change, for now
  checked teardown functions that fail in CK_NOFORK mode will
  not cause the test to fail.

* Allow checked fixtures when compiled without fork(). Previously
  such setup/teardown functions were disabled, as the full contract
  for checked fixtures could not be honored. Checked fixtures
  in CK_NOFORK mode are now closer to the contract, and are now
  enabled.

* Various code cleanup, including changes for compiling Check on
  c++ compilers Clang and g++ (which are less forgiving than their
  c counterparts).

* Re-enable internal unit tests, which verify which line numbers are
  reported for unit test failures. (The tests were unintentionally
  disabled in a previous release).

Fri May 30, 2014: Released Check 0.9.13
  based on r1137 (2014-05-26 21:03:09 +0000)

* When a test assertion fails, exit() was invoked. This results in any
  registered exit handlers being invoked. A test should not be relied
  upon to clean up if it fails. Instead, _exit() will be used to signal
  a test failure, to prevent exit handlers from being invoked.

* Fix issue with string formatting in ck_assert_(u)int_* calls, where using
  the % operator would be interpreted as a string formatter. Bug #96.

* If the LOG/XML/TAP file name is set to "-" either through the
  srunner_set_log() srunner_set_xml() or srunner_set_tap() calls
  or through the related environment variables, the logged data will be
  printed to stdout instead of a file. This is mainly to support using TAP
  for fixtures which expect the results to be reported via stdout. However,
  it is available via all of Check's logging modalities.

* For CMake builds, check_stdint.h was not being installed. This is now
  fixed.

* Check's example under doc/example now also works for CMake projects
  using Visual Studios and MSVC. This includes an example CMake
  configuration.

Mon Jan 20, 2014: Released Check 0.9.12
  based on r1054 (2014-01-16 23:08:03 +0000)

* Additional unit tests created for internal and external Check
  APIs.

* Check now compiled on Windows using MSVC when using CMake and
  NMake. All unit tests pass, though shell script based ones need
  to be run in the MSYS environment.

* Check now compiles on Windows using Visual Studio 10
  when using CMake. check_check passes when run from Visual Studios.

* Always capture the start and end times of tests when using
  NO_FORK mode. Previously the end time was not captured,
  resulting in arbitrary durations being recorded when tests
  failed. Bug #87.

* Added additional configure script checks for support of
  timer_create() on the target system. This allows for
  OpenBSD to compile and run all Check's unit tests successfully.

* Added a unit test, check_mem_leaks, which can be used against
  valgrind to test for memory leaks. No memory leaks were found.

* Added tcase_add_loop_test support in checkm. Patch from patches #46.

* Add support for logging in Test Anything Protocol (TAP) format.

* Refactor Check's assertions to be more like the assert() call in
  assert.h, in that static source code analyzers can use gcc attributes
  in the header to make assumptions about the flow of the code. See
  feature request #29.

* fix ck_assert_ptr_* causing const compilation warnings. Patch from
  bug #91.

Wed, Nov 4, 2013: Released Check 0.9.11
  based on r856 (2013-11-04 02:09:21 +0000)

* Check's unit tests pass when compiled out of the source tree.

* Check compiles for Windows using the MinGW/msys environment (without using \ 
fork), and all unit tests pass.

* Check compiles for Windows using the Cygwin environment, and all unit tests pass.

* Check compiles for Windows using MinGW in Linux (without using fork), and all \ 
unit tests pass using wine 1.4.

* Check compiles for Windows using MinGW-w64 in Linux (without using fork), and \ 
all unit tests pass using wine 1.4.

* On systems without timer_settimer, use setitimer (if available) to get
  subsecond unit test timeouts. If setitimer is unavailable, fallback
  on alarm.
   2013-10-03 16:48:07 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update check to 0.9.10.

Thu, Apr 18, 2013: Released Check 0.9.10
  based on r743 (2013-04-18 11:27:03 +0200)

* Support 64bit int for __ck_assert_int. Patch from bug #3599471

* Add equivalent uint variants for __ck_assert_int. Patch from bug #3600433.

* Detect if the system has a C99 compliant version of the printf related
  functions for check to use, and if not use an implementation provided by
  check.

* Updated HACKING and release procedure in Makefile.am.

* Detect if the system has clock_gettime() available, and if not use an
  implementation provided by check. clock_gettime() is used to measure
  test durations. The implementation for OSX uses OSX specific system calls
  to get the time. For all other systems, clock_gettime() does nothing.

* Updated documentation in check.h to reference new check API.

* Remove usage of deprecated fail(), fail_if(), and fail_unless() calls from
  check's unit tests.

* Fix implementation of putenv in check's libcompat for systems that do not
  provide it.

* Fix implementation of unsettenv in check's libcompat for systems that do
  not provide it.

* Improvements to the new Check API: new comparison functions for pointers:
  ck_assert_ptr_(eq|ne).

* Test timeouts can now be in nanosecond precision. The tcase_set_timeout
  call, and CK_DEFAULT_TIMEOUT and CK_TIMEOUT_MULTIPLIER environment
  variables now can accept floating point arguments.

* Cleanup compile warnings, patch #3579199 on SF.

* Renamed Check's internal list functions to start with check_, patch #3448601 on SF.
   2012-12-09 16:09:34 by Thomas Klausner | Files touched by this commit (3) | Package updated
Log message:
Update to 0.9.9:

Mon, Oct 22, 2012: Released Check 0.9.9
  based on r637 (2012-10-22 13:54:14 +0200)

* Measure test duration and print in XML output.
  Feature request #3521371 on SF, but reimplemented.

* Added contrib/XML_for_JUnit.xsl from feature request #3521371 on SF.

* Added support for setting log files via environment variables.
  Patch #3576713 on SF.

* Added better pkg-config and subunit support, patch #3417041 on SF.

* Make tests/test_vars.in bourne shell compatible, bug #3472578 on SF.

* Added ck_ prefix to mutex_lock variable, to avoid name clash on Solaris.
  Solves bug #3472574 on SF.

* In autoconf, request system extensions to generate 64-bit safe code,
  solution from patch #2803433 on SF.

* Fix for mutex deadlock when killing threads, patch #3564640 on SF.

* Make XML output well-formed, solution from patch #3575642 on SF.
  Solves bug #3485651 also.

* Fix buggy duration calculation, bug #3575451 on SF.

* A more complete CMake / MSVC patch for those interested in pursuing
  Windows development with Check and Visual Studio.  See
  patches/mloskot.windows.patch.

* Added instructions for improving the speed and output of `make
  check' when using Automake.  See contrib/improved_make_check/.

* Added a chapter in the documentation for selective running of tests.

* Changed how the message pipe is read. Before, the whole file was copied to
  RAM with realloc, giving problems with huge allocations for repetetive
  tests, the problem was visible for a specific GStreamer test case.

* Improvements to the new Check API: documentation, macros that allow
  multiple evaluation, unit tests, and new
  ck_assert_(str|int)_(lt|le|gt|ge) comparison functions.

* Made the new Check API primary and use it to define macros from old Check API

* Added checkmk, a tool for reducing "boilerplate coding" when writing
  unit tests with check.

* Added xslt link to xml output, added display of iteration field into xslt
  stylesheet and moved it to directory accessible from web page root

* Added longjmp to fail function to ensure that no code will be executed in test
  function after failed assertion

* Fix dead assignments and several possible NULL pointer dereferences
   2012-10-31 12:19:55 by Aleksej Saushev | Files touched by this commit (1460)
Log message:
Drop superfluous PKG_DESTDIR_SUPPORT, "user-destdir" is default these days.