From 8473b6944557bead095107044823c20864d3d336 Mon Sep 17 00:00:00 2001
From: amalec
Date: Thu, 25 Oct 2001 00:43:37 +0000
Subject: [PATCH] Added comments on string functions to NEWS, cleaned up money
example, and fixed a signal unit test so that it will pass under cygwin
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@108 64e312b2-a51f-0410-8e61-82d0ca0eb02a
---
check/NEWS | 4 ++++
check/doc/index.html | 26 +++++++++++++++++---------
check/doc/money/check_money.c | 4 ++--
check/tests/check_check_sub.c | 8 +-------
4 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/check/NEWS b/check/NEWS
index 6857f95..83e1911 100644
--- a/check/NEWS
+++ b/check/NEWS
@@ -6,6 +6,10 @@ an unchecked fixture, support failing in checked and uncheck fixture
functions, and errors in checked fixture functions. Rewrote the
back-end to use pipes, rather than message queues.
+Reimplemented printing functions in terms of string formatting
+functions, to allow better testing of output without full end-to-end
+testing.
+
Renamed some public constants to use the CK_ naming convention. This
will break existing test programs.
diff --git a/check/doc/index.html b/check/doc/index.html
index 2c890b0..0d1e153 100644
--- a/check/doc/index.html
+++ b/check/doc/index.html
@@ -80,6 +80,13 @@
etc. Please visit the Check project page at http://sourceforge.net/projects/check/
+ Patches to Check, unless trivial, should be against latest CVS,
+ and should include a full set of unit tests testing the new
+ behavior. No functionality goes into Check without unit tests, and
+ submitting a patch without automated testing guarantees that it
+ will go into the request queue, not the "to be applied soon"
+ pool.
+
TODO
The following enhancements are being considered for Check. Please
@@ -107,10 +114,10 @@
- Allow fail and friends to be used within fixture
- setup/teardown functions
+ setup/teardown functions (done in 0.8.0)
- Allow forkless running of suites, to allow
- debugging
+ debugging (done in 0.8.0)
- Allow unit tests that expect signals or exits
@@ -134,15 +141,16 @@
- Increase tests for more non-public modules
- Refactor to allow better unit testing of printing
- functionality (without end-to-end testing of output
+ functionality. (done in 0.8.0)
-
- Internals
- - Currently Check can only be used on POSIX machines
- supporting SysV message queues. This excludes Win32 native
- and broken POSIX implementations (e.g., cygwin on
- Win9x). Abstract the forking and message passing
+
- Internals
+
+ - Implement message passing between unit test and test
+ programs using pipes, rather than SysV IPC, to allow
+ support under cygwin. (done in 0.8.0)
+
+ - Abstract the forking and message passing
implementation to allow Win32 compatibility.
diff --git a/check/doc/money/check_money.c b/check/doc/money/check_money.c
index aed4045..3a6587f 100644
--- a/check/doc/money/check_money.c
+++ b/check/doc/money/check_money.c
@@ -46,7 +46,7 @@ Suite *money_suite (void)
suite_add_tcase (s, tc_core);
suite_add_tcase (s, tc_limits);
tcase_add_test (tc_core, test_create);
- tcase_set_fixture (tc_core, setup, teardown);
+ tcase_add_checked_fixture (tc_core, setup, teardown);
tcase_add_test (tc_limits, test_neg_create);
tcase_add_test (tc_limits, test_zero_create);
return s;
@@ -57,7 +57,7 @@ int main (void)
int nf;
Suite *s = money_suite();
SRunner *sr = srunner_create(s);
- srunner_run_all (sr, CRNORMAL);
+ srunner_run_all (sr, CK_NORMAL);
nf = srunner_ntests_failed(sr);
srunner_free(sr);
suite_free(s);
diff --git a/check/tests/check_check_sub.c b/check/tests/check_check_sub.c
index 72f5834..cdf4c74 100644
--- a/check/tests/check_check_sub.c
+++ b/check/tests/check_check_sub.c
@@ -31,13 +31,7 @@ END_TEST
START_TEST(test_segv)
{
- char arr[1];
- int i = 0;
-
- while (1) {
- arr[i] = 'a';
- i++;
- }
+ raise (SIGSEGV);
}
END_TEST
--
2.40.0