INN commit: trunk/tests (libtest.c libtest.h)

INN Commit rra at isc.org
Fri Jan 28 21:48:31 UTC 2011


    Date: Friday, January 28, 2011 @ 13:48:31
  Author: iulius
Revision: 9175

Re-add the legacy *errors to the libtest header.  It was removed
by mistake in the last commit.
(gcc 4.3 complains about it, whereas gcc 4.1 does not)

Modified:
  trunk/tests/libtest.c
  trunk/tests/libtest.h

-----------+
 libtest.c |    6 +++---
 libtest.h |    8 ++++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

Modified: libtest.c
===================================================================
--- libtest.c	2011-01-28 21:28:32 UTC (rev 9174)
+++ libtest.c	2011-01-28 21:48:31 UTC (rev 9175)
@@ -304,7 +304,7 @@
 skip_block(int n UNUSED, int count, const char *reason) {
     new_skip_block(count, reason);
 }
-  
+
 void
 new_skip_block(unsigned long count, const char *reason, ...)
 #endif
@@ -369,7 +369,7 @@
 ok_string(int n UNUSED, const char *wanted, const char *seen)
 {
     is_string(wanted, seen, NULL);
-}   
+}
 #endif
 void
 is_string(const char *wanted, const char *seen, const char *format, ...)
@@ -406,7 +406,7 @@
 ok_double(int n UNUSED, double wanted, double seen)
 {
     is_double(wanted, seen, 0.01, NULL);
-}   
+}
 #endif
 void
 is_double(double wanted, double seen, double epsilon, const char *format, ...)

Modified: libtest.h
===================================================================
--- libtest.h	2011-01-28 21:28:32 UTC (rev 9174)
+++ libtest.h	2011-01-28 21:48:31 UTC (rev 9175)
@@ -79,6 +79,14 @@
         __attribute__((__format__(printf, 2, 3)));
 
 void test_init(int count);
+
+/* A global buffer into which errors_capture stores errors. */
+extern char *errors;
+
+/* Turn on capturing of errors with errors_capture.  Errors reported by warn
+ * will be stored in the global errors variable.  Turn this off again with
+ * errors_uncapture.  Caller is responsible for freeing errors when done.
+ */
 void errors_capture(void);
 void errors_uncapture(void);
 #else




More information about the inn-committers mailing list