diff options
author | Not Zed <NotZed@HelixCode.com> | 2000-11-24 11:54:55 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-11-24 11:54:55 +0800 |
commit | 189cb50426fc12b55a79c67a00064623ec964383 (patch) | |
tree | cdc37cf4d65c4b5a7fb69de104663be4875d0781 /camel/tests/lib/camel-test.c | |
parent | 99e80d6ecf06cc60f2734f87bc974bd9479ba139 (diff) | |
download | gsoc2013-evolution-189cb50426fc12b55a79c67a00064623ec964383.tar gsoc2013-evolution-189cb50426fc12b55a79c67a00064623ec964383.tar.gz gsoc2013-evolution-189cb50426fc12b55a79c67a00064623ec964383.tar.bz2 gsoc2013-evolution-189cb50426fc12b55a79c67a00064623ec964383.tar.lz gsoc2013-evolution-189cb50426fc12b55a79c67a00064623ec964383.tar.xz gsoc2013-evolution-189cb50426fc12b55a79c67a00064623ec964383.tar.zst gsoc2013-evolution-189cb50426fc12b55a79c67a00064623ec964383.zip |
Added at least some explanation of all this stuff.
2000-11-24 Not Zed <NotZed@HelixCode.com>
* tests/README: Added at least some explanation of all this stuff.
* tests/lib/camel-test.h (check_msg): Added a non-gcc version of
the fail command, we dont get the expression that failed, but no
matter. Should be (more) portable now.
(check, check_msg): Put the file/lineno in the default message.
svn path=/trunk/; revision=6657
Diffstat (limited to 'camel/tests/lib/camel-test.c')
-rw-r--r-- | camel/tests/lib/camel-test.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/camel/tests/lib/camel-test.c b/camel/tests/lib/camel-test.c index b60ba1fb34..a913ad78a4 100644 --- a/camel/tests/lib/camel-test.c +++ b/camel/tests/lib/camel-test.c @@ -18,7 +18,7 @@ int camel_test_verbose; static void die(int sig) { - static indie = 0; + static int indie = 0; struct _stack *node; if (!indie) { @@ -118,17 +118,23 @@ void camel_test_pull(void) void camel_test_fail(const char *why, ...) { - struct _stack *node; va_list ap; - char *text; va_start(ap, why); - text = g_strdup_vprintf(why, ap); + camel_test_failv(why, ap); va_end(ap); +} + +void camel_test_failv(const char *why, va_list ap) +{ + struct _stack *node; + char *text; + + text = g_strdup_vprintf(why, ap); if ((nonfatal == NULL && camel_test_verbose > 0) || (nonfatal && camel_test_verbose > 1)) { - printf("Failed: %s\n", text); + printf("Failed.\n%s\n", text); } g_free(text); @@ -174,8 +180,7 @@ void camel_test_nonfatal(const char *why, ...) nonfatal = node; } -/* dont ask me why but the compiler just can't seem to find the prototypes for this */ -void camel_test_fatal() +void camel_test_fatal(void) { struct _stack *node; @@ -209,7 +214,6 @@ void camel_test_end(void) int string_equal(const char *a, const char *b) { const char *ap, *bp; - int cmp; ap = a; bp = b; |