]> granicus.if.org Git - check/log
check
9 years agoupdate AUTHORS file
brarcher [Sun, 15 Mar 2015 02:23:38 +0000 (02:23 +0000)]
update AUTHORS file

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1201 64e312b2-a51f-0410-8e61-82d0ca0eb02a

9 years agoUpdate NEWS
brarcher [Thu, 12 Mar 2015 13:02:04 +0000 (13:02 +0000)]
Update NEWS

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1200 64e312b2-a51f-0410-8e61-82d0ca0eb02a

9 years agoadd extra space around comparison operators for assert messages
brarcher [Thu, 12 Mar 2015 12:58:57 +0000 (12:58 +0000)]
add extra space around comparison operators for assert messages

The following argument was made in the report of bug #102 to
include extra space around the comparison operator in
assert messages:

When ck_assert_int_gt(1 + 2, 3 + 4) fails, it outputs a string like this:

   Assertion '1 + 2>3 + 4' failed: 1 + 2==3, 3 + 4==7

This doesn’t look nice, since most programmers write spaces around comparison operators.
Therefore, the assertion message should do the same.

   Assertion '1 + 2 > 3 + 4' failed: 1 + 2 == 3, 3 + 4 == 7

For condensed code, it would look like this:

   Assertion '1+2 > 3+4' failed: 1+2 == 3, 3+4 == 7

I think the versions with the spaces look nicer than those without.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1199 64e312b2-a51f-0410-8e61-82d0ca0eb02a

9 years agoDo not remove check.info during 'clean' target
brarcher [Thu, 12 Mar 2015 02:50:43 +0000 (02:50 +0000)]
Do not remove check.info during 'clean' target

It was observed that if one does not have texinfo installed
and invoked "make clean" then a subsequent build will fail
because the docs cannot be built. The issue is that
"make clean" will remove check.info and require it be rebuilt.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1198 64e312b2-a51f-0410-8e61-82d0ca0eb02a

9 years agoUse mkstemp() if available instead of tmpfile() or tempnam()
brarcher [Thu, 12 Mar 2015 02:31:57 +0000 (02:31 +0000)]
Use mkstemp() if available instead of tmpfile() or tempnam()

This is based on patch #51 submitted by Neos3452 from Sourceforge.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1197 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agotests: expect location of file based on srcdir
brarcher [Fri, 28 Nov 2014 15:35:33 +0000 (15:35 +0000)]
tests: expect location of file based on srcdir

Otherwise, when the test is run out of the source tree
the test will fail.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1196 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoadd test_check_nofork_teardown.sh to EXTRA_DIST
brarcher [Fri, 28 Nov 2014 06:05:42 +0000 (06:05 +0000)]
add test_check_nofork_teardown.sh to EXTRA_DIST

Otherwise, the prereleasecheck target will fail

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1195 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoChange spacing.
brarcher [Fri, 28 Nov 2014 05:50:23 +0000 (05:50 +0000)]
Change spacing.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1194 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoreport correct error if teardown after failure in no fork mode
brarcher [Fri, 28 Nov 2014 05:50:22 +0000 (05:50 +0000)]
report correct error if teardown after failure in no fork mode

In nofork mode, the location of a failed assertion within a test
case is lost if that test case has a checked teardown fixture
(even if that fixture function is empty).

The reason why this happens is this: the end of the message sequence
coming down the pipe is CK_MSG_LOC (location of failing test),
CK_MSG_FAIL, CK_MSG_CTX (TEARDOWN). It is this final message that
confuses things, because rcvmsg_update_ctx() updates rmsg->lastctx
(which I suspect is the right thing for it to do), which is the ctx
value used by the first 'if' body in construct_test_result() in its
call to tr_set_loc_by_ctx().

The solution is to initialize tr->ctx to rmsg->failctx if
it is not CK_CTX_INVALID.

Bug #99.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1193 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: change automake requirement to 1.11.2
brarcher [Tue, 23 Sep 2014 01:29:02 +0000 (01:29 +0000)]
autotools: change automake requirement to 1.11.2

The AM_PROG_AR macro was introduced into Automake 1.11.2
(Dec 2011), which is used in Check's configure script and
in the example's. Check for this version of Automake
instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1192 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: change 'mimick' -> 'mimic'
brarcher [Tue, 19 Aug 2014 12:22:56 +0000 (12:22 +0000)]
doc: change 'mimick' -> 'mimic'

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1191 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: mention that the output from "make check" depends on Automake version
brarcher [Tue, 19 Aug 2014 12:22:54 +0000 (12:22 +0000)]
doc: mention that the output from "make check" depends on Automake version

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1190 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoupdate online docs during updateweb
brarcher [Tue, 19 Aug 2014 12:22:52 +0000 (12:22 +0000)]
update online docs during updateweb

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1189 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: change phrasing on request for corrections to docs.
brarcher [Tue, 19 Aug 2014 01:21:37 +0000 (01:21 +0000)]
doc: change phrasing on request for corrections to docs.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1188 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: update docs to deprecate AM_PATH_CHECK, mention CMake
brarcher [Tue, 19 Aug 2014 01:21:35 +0000 (01:21 +0000)]
doc: update docs to deprecate AM_PATH_CHECK, mention CMake

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1187 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: update copyright on docs
brarcher [Tue, 19 Aug 2014 01:21:30 +0000 (01:21 +0000)]
doc: update copyright on docs

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1186 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agotests: cast output of malloc() to goal type
brarcher [Wed, 30 Jul 2014 12:49:11 +0000 (12:49 +0000)]
tests: cast output of malloc() to goal type

clang++ did not like casting void* to char* implicitly.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1185 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agotests: add prototype for escape_percent()
brarcher [Wed, 30 Jul 2014 12:49:08 +0000 (12:49 +0000)]
tests: add prototype for escape_percent()

clang++ emitted an error if the prototype was not present

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1184 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoDo not vsnprintf expression string passed to ck_abort()
brarcher [Wed, 30 Jul 2014 03:09:12 +0000 (03:09 +0000)]
Do not vsnprintf expression string passed to ck_abort()

If ck_abort() detects a failure, the expression which was
evaluated is passed to _ck_assert_failed to print.
However, the previous behavior was to send the expression
to vsnprintf(), which would expect it to be properly formatted.

If the expression in ck_abort() contained % characters, such as:
   ck_abort(bar%foo == 0)
the "%f" portion would be printed as some non-existent floating
point number.

Now, if there is no message passed (and the expression is to
be used) simply report the expression as is. Only format
something with vsnprintf() if there is actual data that
expects formatting.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1183 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agotests: escape % before passing string to ck_abort_msg()
brarcher [Wed, 30 Jul 2014 03:09:09 +0000 (03:09 +0000)]
tests: escape % before passing string to ck_abort_msg()

ch_abort_msg() expects printf arguments. Passing in a constant
string that happens to have '%' in it will not end as expected,
as the underlying vsnprintf will attempt to format them.

As some unit tests now attempt to have improper output involving
'%' in expressions, it is now possible that the failure message
which is expected during Check's unit tests involve '%'. As such,
only a properly escaped string should be passed to ck_abort_msg().

This change will force the string passed to ck_abort_msg() in the
test_check_failure_msgs unit test to properly escape any '%'
found, so that if a failure did happen the correct text is printed
to the screen.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1182 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: add instructions for building on Solaris
brarcher [Sun, 27 Jul 2014 01:50:34 +0000 (01:50 +0000)]
web: add instructions for building on Solaris

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1181 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: restore in development header
brarcher [Sat, 26 Jul 2014 15:21:54 +0000 (15:21 +0000)]
NEWS: restore in development header

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1180 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: update release version on main page
brarcher [Sat, 26 Jul 2014 15:21:53 +0000 (15:21 +0000)]
web: update release version on main page

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1179 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate for release
brarcher [Sat, 26 Jul 2014 04:31:17 +0000 (04:31 +0000)]
Update for release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1177 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: add link to solaris buildbot
brarcher [Sat, 26 Jul 2014 03:37:51 +0000 (03:37 +0000)]
web: add link to solaris buildbot

An automated build has been setup for the Check project on
OpenCSW's BuildBot, which builds for Solaris. The link leads
to the latest build status of Check on several architectures.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1176 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years ago* update for release
brarcher [Sat, 26 Jul 2014 03:37:48 +0000 (03:37 +0000)]
* update for release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1175 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agocmake: include getline.c into libcompat if getline() is missing
brarcher [Thu, 3 Jul 2014 18:43:49 +0000 (18:43 +0000)]
cmake: include getline.c into libcompat if getline() is missing

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1174 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: remove AIX fix for broken xlc v6 compiler
brarcher [Tue, 24 Jun 2014 13:00:29 +0000 (13:00 +0000)]
autotools: remove AIX fix for broken xlc v6 compiler

The issue with the xlc v6 compiler on AIX seems to be a compiler
bug which is resolved in future releases of the compiler.

This fix, as it turns out, did not properly detect the bug
or resolve the issue. Unless it becomes really important,
the attempt to get around the bug is removed from Check.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1173 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoProvide getline() if unavailable
brarcher [Tue, 24 Jun 2014 04:45:07 +0000 (04:45 +0000)]
Provide getline() if unavailable

getline() is POSIX.1-2008, but is unavailable on several platforms,
including MinGW and Solaris 10.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1172 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse casts when assigning a void*
brarcher [Mon, 23 Jun 2014 04:13:57 +0000 (04:13 +0000)]
Use casts when assigning a void*

The changes are necessary for Check to compile with a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1171 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoChange name 'new' to something else
brarcher [Mon, 23 Jun 2014 04:13:55 +0000 (04:13 +0000)]
Change name 'new' to something else

Change necessary for compiling on c++ compiler, as
'new' is a reserved name.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1170 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoAdd comment for why test should be CK_FORK mode only
brarcher [Mon, 23 Jun 2014 04:13:54 +0000 (04:13 +0000)]
Add comment for why test should be CK_FORK mode only

Some of these tests, now that checked fixtures can be used
with CK_NOFORK mode, may be enabled regardless of fork()
availability. This specific test, however, will not work as is
without fork().

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1169 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agorework how line numbers are verified in check_check_sub.c
brarcher [Mon, 23 Jun 2014 04:13:52 +0000 (04:13 +0000)]
rework how line numbers are verified in check_check_sub.c

Line number checking failures in check_check_sub.c are broken
and were broken since r527 (2009-02-02).

_STR(__LINE__) as is evaluates to "__LINE__", which results in -1
being returned from atoi. A -1 means to not check the line
number of the failure. As a result, no line numbers were checked
since r527. Checking with strtol finds the conversion failure,
which is what identified this bug.

Note that more redirection can be used to convert __LINE__ to a string,
e.g.:
   #define LINE_TO_STRING(Y) #Y
   #define _LINE_TO_STRING(Y) LINE_TO_STRING(Y)
   #define _STR(Y) _LINE_TO_STRING(Y)

However, then the line converted to a string is the line which references
the macro. I.e., not the line number of the test, which was expected.

The tests of the failure line numbers are valuable. To fix them,
instead of determining the values at compile time, they are determined
at run time. Whenever a test should fail, record_failure_line_num()
will be used to record the line number to a temporary file.
This in several cases required splitting up a test which was used
to induce a success and a failure. For such functions, there is
now a clear function to use when a success is required (no call
to record_failure_line_num()) and one to use when a failure
is required at a specific location (to call record_failure_line_num()).

The FILE pointer is created at the setup of the sub suite, and
deleted on the cleanup. The test_check_failure_lnos test then
will, for each failure, read the next line in the file and make
sure it matches the value reported by Check.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1168 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse proper storage type for print_output
brarcher [Mon, 23 Jun 2014 04:13:50 +0000 (04:13 +0000)]
Use proper storage type for print_output

This fix was necessary to get Check compiling with a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1167 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoPass in print_output to srunner_run_all in test_null
brarcher [Mon, 23 Jun 2014 04:13:48 +0000 (04:13 +0000)]
Pass in print_output to srunner_run_all in test_null

Change was necessary to get Check to compile on a c++
compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1166 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCast to ck_result_ctx in test_pack_ctx_limit
brarcher [Mon, 23 Jun 2014 04:13:46 +0000 (04:13 +0000)]
Cast to ck_result_ctx in test_pack_ctx_limit

This change was necessary to get Check compiling on a c++
compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1165 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoPass in proper arguments for upack in test_pack_abuse
brarcher [Mon, 23 Jun 2014 04:13:44 +0000 (04:13 +0000)]
Pass in proper arguments for upack in test_pack_abuse

Even those the test 'abuses' upack, passing in a non-pointer
to a pointer argument is a bad idea.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1164 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoMove sub_nfailed/ntests vars inside check_check_master.c
brarcher [Mon, 23 Jun 2014 04:13:42 +0000 (04:13 +0000)]
Move sub_nfailed/ntests vars inside check_check_master.c

The header file check_check.h declaring these resulted in
multiple files creating storage but for duplicate names.

Only one of these (sub_ntests) was ever used outside of
check_check_master.c. Now it is accessable via an extern
declaration.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1163 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agocast upack_int() to goal container
brarcher [Mon, 23 Jun 2014 04:13:39 +0000 (04:13 +0000)]
cast upack_int() to goal container

Needed to get Check to compile on a c++ compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1162 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCase void* to pthread_mutex_t before passing to unlock
brarcher [Mon, 23 Jun 2014 04:13:37 +0000 (04:13 +0000)]
Case void* to pthread_mutex_t before passing to unlock

This change was necessary to get Check to compile on a
c++ compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1161 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCase void* to goal container for logging callbacks
brarcher [Mon, 23 Jun 2014 04:13:35 +0000 (04:13 +0000)]
Case void* to goal container for logging callbacks

These changes were necessary to get Check to compile on
a c++ compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1160 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agocast value sent to srunner_set_fork_status to fork_status
brarcher [Mon, 23 Jun 2014 04:13:32 +0000 (04:13 +0000)]
cast value sent to srunner_set_fork_status to fork_status

The change is necessary for compiling Check with a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1159 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix data type of internal fork_status variable
brarcher [Mon, 23 Jun 2014 04:13:29 +0000 (04:13 +0000)]
Fix data type of internal fork_status variable

This was necessary to compile Check with a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1158 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCase void* to goal container after using Check's lists
brarcher [Mon, 23 Jun 2014 04:13:21 +0000 (04:13 +0000)]
Case void* to goal container after using Check's lists

These changes were necessary to get Check to compile with
a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1157 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCase void* to goal container after emalloc()
brarcher [Mon, 23 Jun 2014 04:13:18 +0000 (04:13 +0000)]
Case void* to goal container after emalloc()

These changes were necessary to get Check to compile with
a c++ compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1156 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoAllow checked fixtures when compiled without fork().
brarcher [Mon, 23 Jun 2014 04:13:16 +0000 (04:13 +0000)]
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.

Besides, it was possible to use checked fixtures if the system
had fork() but the tests were configured to run in CK_NOFORK mode.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1155 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse US_PER_SEC instead of magic number
brarcher [Mon, 23 Jun 2014 04:13:13 +0000 (04:13 +0000)]
Use US_PER_SEC instead of magic number

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1154 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoAdd DurationMsg to CheckMsg union
brarcher [Mon, 23 Jun 2014 04:13:11 +0000 (04:13 +0000)]
Add DurationMsg to CheckMsg union

As the CheckMsg union is passed around to the various
pack/upack functions, and a DurationMsg is valid to be
passed around, include it in the union just in case
the DurationMsg is or becomes larger than the other
members.

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1153 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoInitialize buf before use
brarcher [Mon, 23 Jun 2014 04:13:09 +0000 (04:13 +0000)]
Initialize buf before use

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1152 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRemove unused declaration
brarcher [Mon, 23 Jun 2014 04:13:06 +0000 (04:13 +0000)]
Remove unused declaration

Patch provided by Michael Piszczek

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1151 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix checked teardown calls going into infinate loop in CK_NOFORK mode
brarcher [Mon, 23 Jun 2014 04:13:03 +0000 (04:13 +0000)]
Fix checked teardown calls going into infinate loop in CK_NOFORK mode

A test can be created with a checked teardown, where the teardown
would call some Check asserts. If the test was run in CK_NOFORK
mode and one of the asserts in the teardown failed, longjmp()
would be called, which would result in the setjmp() being returned
to which monitored the test function, and the checked teardowns
executed again. This lead to an infinate loop.

The fix* for this is to execute the checked teardowns in their
own setjmp() block. A test is added to ensure that CK_NOFORK
with a failed checked teardown does not go into an infinate loop.

In addition, the comments for the checked and unchecked
fixture API are updated to be more clear as to what occurs
for CK_FORK and CK_NOFORK mode.

* This reveals another problem: a failed checked teardown
reacts differently for CK_FORK and CK_NOFORK mode.

CK_FORK: the test is marked as failed
CK_NOFORK: the test is marked as passed

More work will need to be done to allow CK_NOFORK mode to also
cause a test to fail if the checked teardown fails.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1150 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoCombine checked and unchecked setup handling
brarcher [Mon, 23 Jun 2014 04:13:00 +0000 (04:13 +0000)]
Combine checked and unchecked setup handling

The code for checked and unchecked was very similar, and
was combined to simplify things.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1149 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix spacing
brarcher [Mon, 23 Jun 2014 04:12:58 +0000 (04:12 +0000)]
Fix spacing

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1148 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: change check for floor() and __floor()
brarcher [Mon, 23 Jun 2014 04:12:55 +0000 (04:12 +0000)]
autotools: change check for floor() and __floor()

The reason AIX is having difficulty with floor() is that the
   AC_CHECK_LIB([m], [floor])
finds floor() in libm, however due to some header file stuff
(maybe) floor() cannot be used directly. Instead, there is likely
a definition for __floor() -> floor().

To check for this, floor() is detected in libm as normal. After,
determine if floor() can be used directly. If not, check if __floor()
is defined (not necessarily a function). If floor() is usable, do
that. If not but __floor() is available, try using that.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1147 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate AUTHORS file
brarcher [Mon, 23 Jun 2014 04:12:53 +0000 (04:12 +0000)]
Update AUTHORS file

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1146 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse env to find shell to use
brarcher [Thu, 19 Jun 2014 01:53:32 +0000 (01:53 +0000)]
Use env to find shell to use

On at least one platform (Solaris), the shell located at /bin/sh is
not a compliant shell. Using env as a form of redirection to find
a sh program, the PATH can be changed to find a compliant sh
to use. On platforms where /bin/sh is compliant, env should work
just fine.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1145 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: fix floor() check
brarcher [Thu, 19 Jun 2014 01:53:30 +0000 (01:53 +0000)]
autotools: fix floor() check

The floor check did not work properly on Solaris.

The check yields this in config.h:

   #define HAVE_FLOOR $HAVE_FLOOR

which results in the following build failure:

   "libcompat.h", line 127: token not allowed in directive: $

This fix is provided by Georg Sauthoff.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1144 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: include flag for AIX only if on AIX
brarcher [Sun, 15 Jun 2014 23:15:10 +0000 (23:15 +0000)]
autotools: include flag for AIX only if on AIX

Also, correcting comment about this being for Solaris.
It is for AIX instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1143 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautoconf: attempt to find __floor() if floor() is unavailable
brarcher [Sun, 15 Jun 2014 23:15:07 +0000 (23:15 +0000)]
autoconf: attempt to find __floor() if floor() is unavailable

On the AIX platform, floor() is not in libm, but
__floor() is an internal function in the compiler.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1142 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRestore development header in NEWS
brarcher [Sat, 31 May 2014 00:45:48 +0000 (00:45 +0000)]
Restore development header in NEWS

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1141 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate for release
brarcher [Sat, 31 May 2014 00:45:45 +0000 (00:45 +0000)]
Update for release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1140 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate for release
brarcher [Sat, 31 May 2014 00:09:01 +0000 (00:09 +0000)]
Update for release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1138 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautoconf: add cflag for Solaris to enable c99 features
brarcher [Mon, 26 May 2014 21:03:09 +0000 (21:03 +0000)]
autoconf: add cflag for Solaris to enable c99 features

Without this flag, Solaris will fail to compile in check.h when
it hits the variable macros.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1137 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agochange first arg of timer_create to clockid_t
brarcher [Mon, 26 May 2014 21:03:06 +0000 (21:03 +0000)]
change first arg of timer_create to clockid_t

The clock id argument should have been of type
clockid_t.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1136 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoonly declare atexit() test if fork is available
brarcher [Wed, 21 May 2014 12:07:44 +0000 (12:07 +0000)]
only declare atexit() test if fork is available

The test is already disabled if fork is disabled.
No need to compile the code.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1135 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agouse atexit() instead of on_exit() for test
brarcher [Wed, 21 May 2014 03:28:07 +0000 (03:28 +0000)]
use atexit() instead of on_exit() for test

atexit() is POSIX, whereas on_exit() is not.
Specifically, on_exit() does not exist on
OpenBSD (and perhaps other platforms)

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1134 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUse env to find shell to use
brarcher [Mon, 12 May 2014 01:38:24 +0000 (01:38 +0000)]
Use env to find shell to use

On at least one platform (Solaris), the shell located at /bin/sh is
not a compliant shell. Using env as a form of redirection to find
a sh program, the PATH can be changed to find a compliant sh
to use. On platforms where /bin/sh is compliant, env should work
just fine.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1133 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove warnings about prototypes
brarcher [Fri, 9 May 2014 12:48:05 +0000 (12:48 +0000)]
remove warnings about prototypes

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1132 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoautotools: find compliant sed to use
brarcher [Fri, 9 May 2014 12:41:02 +0000 (12:41 +0000)]
autotools: find compliant sed to use

On Solaris the default sed program in the PATH may not work
very well. Attempt to find a better one with the AC_PROG_SED macro

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1131 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate AUTHORS file
brarcher [Fri, 9 May 2014 12:41:00 +0000 (12:41 +0000)]
Update AUTHORS file

For the changes that Georg is helping with

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1130 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoadd comment about not using -pedantic flag due to solaris issue
brarcher [Wed, 7 May 2014 11:03:17 +0000 (11:03 +0000)]
add comment about not using -pedantic flag due to solaris issue

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1129 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoupon test failure, invoke _exit() instead of exit()
brarcher [Wed, 7 May 2014 10:59:33 +0000 (10:59 +0000)]
upon test failure, invoke _exit() instead of exit()

exit() will call atexit handlers, which may try to
clean up things or wait for things to get cleaned up,
which we don't want or need. We just want to stop
and let the parent know about the failure as quickly
as possible in case fork() is used.

Fixes timeouts on assert failures in checks where
an exit handler waits for things to stop, but they
don't stop because they haven't been shut down,
and they haven't been shut down because there's no
simple way to do so on failures.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1128 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoUpdate NEWS with bug#96 fix
brarcher [Wed, 7 May 2014 01:37:11 +0000 (01:37 +0000)]
Update NEWS with bug#96 fix

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1127 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agofix formatting for ck_assert_(u)int_* calls if using % operator
brarcher [Wed, 7 May 2014 01:32:50 +0000 (01:32 +0000)]
fix formatting for ck_assert_(u)int_* calls if using % operator

If an expression is used in any of the ck_assert_(u)int_* calls
that uses the % operator, for example:

ck_assert_int_eq(fs.write.slot % fs.slots_per_sector, i+1);

the result was the "% f" would be interpreted as a format string.

This fix prevents the issue by passing the entire expression as a
string, and feeding the underlying printf a "%s" argument instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1126 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years ago* add LT_INIT to configure.ac to build .la files
cpickett [Mon, 7 Apr 2014 16:16:46 +0000 (16:16 +0000)]
* add LT_INIT to configure.ac to build .la files

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1125 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: use pkg-config to find check
brarcher [Wed, 5 Mar 2014 02:19:32 +0000 (02:19 +0000)]
example: use pkg-config to find check

Moving away from the deprecated AM_PATH_CHECK to the
not-deprecated PKG_CHECK_MODULES

Based on patch submitted by Julien Godin

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1124 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoinclude signal.h in exit tests
brarcher [Wed, 19 Feb 2014 02:39:54 +0000 (02:39 +0000)]
include signal.h in exit tests

technically this should have been here before. However, the
autotools build did not need it, so it was not caught.
The CMake build requires it be in place to get the definition
of the SIGSEGV signal.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1123 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoadd test for tcase_add_loop_test_raise_signal
brarcher [Mon, 17 Feb 2014 12:07:52 +0000 (12:07 +0000)]
add test for tcase_add_loop_test_raise_signal

There was originally no test for this

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1122 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agofix spelling issue in test
brarcher [Sun, 16 Feb 2014 16:22:40 +0000 (16:22 +0000)]
fix spelling issue in test

The code changed 'occured' -> 'occurred', but the tests needed
to be changed as well.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1121 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agospacing
brarcher [Sun, 16 Feb 2014 05:20:41 +0000 (05:20 +0000)]
spacing

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1120 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove @since tag from fork_status enum
brarcher [Sun, 16 Feb 2014 05:20:39 +0000 (05:20 +0000)]
remove @since tag from fork_status enum

The intention was to have the @since tags on the
functions instead.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1119 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoMaking doxygen API page is now part of the release
brarcher [Sun, 16 Feb 2014 04:59:03 +0000 (04:59 +0000)]
Making doxygen API page is now part of the release

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1118 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: reference new API page
brarcher [Sun, 16 Feb 2014 04:59:01 +0000 (04:59 +0000)]
web: reference new API page

The API page is Doxygen documentation refering to Check's
API in check.h

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1117 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: include doxygen config used to create API web page
brarcher [Sun, 16 Feb 2014 04:59:00 +0000 (04:59 +0000)]
doc: include doxygen config used to create API web page

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1116 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoFix a few spelling issues in check.h.in
brarcher [Sun, 16 Feb 2014 04:58:57 +0000 (04:58 +0000)]
Fix a few spelling issues in check.h.in

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1115 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoRemove documentation at top of check.h.in
brarcher [Sun, 16 Feb 2014 04:58:55 +0000 (04:58 +0000)]
Remove documentation at top of check.h.in

This documentation is captured better in other places, including
Check's documentation and examples.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1114 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoMake check.h.in Doxygen friendly
brarcher [Sun, 16 Feb 2014 04:58:52 +0000 (04:58 +0000)]
Make check.h.in Doxygen friendly

All prototypes and enums are now documented using javadoc.
Doxygen is able to convert this file into a web page displaying
Check's API. This will be used on Check's web page to display
what API is available and when it was introduced.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1113 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoconfigure.ac: add comment regarding not using -ansi
brarcher [Fri, 14 Feb 2014 10:59:03 +0000 (10:59 +0000)]
configure.ac: add comment regarding not using -ansi

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1112 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoconfigure.ac: print summary at end of configure
brarcher [Fri, 14 Feb 2014 10:59:00 +0000 (10:59 +0000)]
configure.ac: print summary at end of configure

The reason for the summary is mostly for convenience, when
trying Check out on different platforms.

This includes most of the possible configurable options.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1111 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: add info on using Valgrind to find memory leaks
brarcher [Sat, 8 Feb 2014 07:01:42 +0000 (07:01 +0000)]
doc: add info on using Valgrind to find memory leaks

This was prompted from a discussion on Check's user mailing
list.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1110 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agodoc: fix a few spelling mistakes
brarcher [Sat, 8 Feb 2014 07:01:35 +0000 (07:01 +0000)]
doc: fix a few spelling mistakes

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1109 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoweb: mention logging formats in Check description
brarcher [Sat, 8 Feb 2014 07:01:30 +0000 (07:01 +0000)]
web: mention logging formats in Check description

For some people, the logging format (e.g. TAP) is also important
to know.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1108 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: Mention example now works with CMake
brarcher [Wed, 5 Feb 2014 16:08:57 +0000 (16:08 +0000)]
NEWS: Mention example now works with CMake

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1107 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: mention fix for check_stdint.h for CMake builds
brarcher [Wed, 5 Feb 2014 16:08:53 +0000 (16:08 +0000)]
NEWS: mention fix for check_stdint.h for CMake builds

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1106 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoNEWS: Indent last entry
brarcher [Wed, 5 Feb 2014 16:08:50 +0000 (16:08 +0000)]
NEWS: Indent last entry

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1105 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: Mention that was tested on Windows 7 with CMake
brarcher [Wed, 5 Feb 2014 16:08:44 +0000 (16:08 +0000)]
example: Mention that was tested on Windows 7 with CMake

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1104 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: add info on config.h.in, which is part of the CMake example
brarcher [Wed, 5 Feb 2014 16:08:40 +0000 (16:08 +0000)]
example: add info on config.h.in, which is part of the CMake example

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1103 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: update docs to mention CHECK_INSTALL_DIR var
brarcher [Wed, 5 Feb 2014 16:08:36 +0000 (16:08 +0000)]
example: update docs to mention CHECK_INSTALL_DIR var

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1102 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoremove trailing white space
brarcher [Wed, 5 Feb 2014 16:08:31 +0000 (16:08 +0000)]
remove trailing white space

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1101 64e312b2-a51f-0410-8e61-82d0ca0eb02a

10 years agoexample: declare variables at top, for MSVC
brarcher [Wed, 5 Feb 2014 16:08:26 +0000 (16:08 +0000)]
example: declare variables at top, for MSVC

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1100 64e312b2-a51f-0410-8e61-82d0ca0eb02a