You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rb...@apache.org on 2002/11/26 17:10:26 UTC
cvs commit: apr/test test_apr.h
rbb 2002/11/26 08:10:26
Modified: test test_apr.h
Log:
These macros can finally go away, there are no tests that are still using
them.
Revision Changes Path
1.28 +0 -88 apr/test/test_apr.h
Index: test_apr.h
===================================================================
RCS file: /home/cvs/apr/test/test_apr.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- test_apr.h 26 Nov 2002 16:02:37 -0000 1.27
+++ test_apr.h 26 Nov 2002 16:10:25 -0000 1.28
@@ -86,92 +86,4 @@
CuSuite *testsockets(void);
CuSuite *testproc(void);
-
-
-#include "apr_strings.h"
-#include "apr_time.h"
-
-
-#define TEST_EQ(str, func, value, good, bad) \
- printf("%-60s", str); \
- { \
- apr_status_t rv; \
- if ((rv = func) == value){ \
- char errmsg[200]; \
- printf("%s\n", bad); \
- fprintf(stderr, "Error was %d : %s\n", rv, \
- apr_strerror(rv, (char*)&errmsg, 200)); \
- exit(-1); \
- } \
- printf("%s\n", good); \
- }
-
-#define TEST_NEQ(str, func, value, good, bad) \
- printf("%-60s", str); \
- { \
- apr_status_t rv; \
- if ((rv = func) != value){ \
- char errmsg[200]; \
- printf("%s\n", bad); \
- fprintf(stderr, "Error was %d : %s\n", rv, \
- apr_strerror(rv, (char*)&errmsg, 200)); \
- exit(-1); \
- } \
- printf("%s\n", good); \
- }
-
-#define TEST_NEQ_NONFATAL(str, func, value, good, bad) \
- printf("%-60s", str); \
- { \
- apr_status_t rv; \
- if ((rv = func) != value){ \
- char errmsg[200]; \
- printf("%s\n", bad); \
- fprintf(stderr, "Error was %d : %s\n", rv, \
- apr_strerror(rv, (char*)&errmsg, 200)); \
- } \
- else \
- printf("%s\n", good); \
- }
-
-#define TEST_STATUS(str, func, testmacro, good, bad) \
- printf("%-60s", str); \
- { \
- apr_status_t rv = func; \
- if (!testmacro(rv)) { \
- char errmsg[200]; \
- printf("%s\n", bad); \
- fprintf(stderr, "Error was %d : %s\n", rv, \
- apr_strerror(rv, (char*)&errmsg, 200)); \
- exit(-1); \
- } \
- printf("%s\n", good); \
- }
-
-#define STD_TEST_NEQ(str, func) \
- TEST_NEQ(str, func, APR_SUCCESS, "OK", "Failed");
-
-#define STD_TEST_NEQ_NONFATAL(str, func) \
- TEST_NEQ_NONFATAL(str, func, APR_SUCCESS, "OK", "Failed");
-
-#define PRINT_ERROR(rv) \
- { \
- char errmsg[200]; \
- fprintf(stderr, "Error was %d : %s\n", rv, \
- apr_strerror(rv, (char*)&errmsg, 200)); \
- exit(-1); \
- }
-
-#define MSG_AND_EXIT(msg) \
- printf("%s\n", msg); \
- exit (-1);
-
-#define TIME_FUNCTION(time, function) \
- { \
- apr_time_t tt = apr_time_now(); \
- function; \
- time = apr_time_now() - tt; \
- }
-
-
#endif /* APR_TEST_INCLUDES */