OSSP CVS Repository

ossp - Difference in ossp-pkg/sa/ts.h versions 1.1 and 1.2
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/sa/ts.h 1.1 -> 1.2

--- ts.h 2001/10/10 15:01:56     1.1
+++ ts.h 2001/10/31 19:28:49     1.2
@@ -4,7 +4,7 @@
 **  Copyright (c) 2001 The OSSP Project <http://www.ossp.org/>
 **  Copyright (c) 2001 Cable & Wireless Deutschland <http://www.cw.com/de/>
 **
-**  This file is part of OSSP TS, a test suite library which
+**  This file is part of OSSP TS, a small test suite library which
 **  can be found at http://www.ossp.org/pkg/ts/.
 **
 **  Permission to use, copy, modify, and distribute this software for
@@ -31,32 +31,34 @@
 #ifndef _TS_H_
 #define _TS_H_
 
-struct ts_st;
-typedef struct ts_st ts_t;
-
-struct tst_st;
-typedef struct tst_st tst_t;
-
-typedef void (*tst_func_t)(tst_t *);
-
-#define TST_FUNC(name) \
-    static void name(tst_t *tst)
-
-#define TST_CTX(tst) \
-    tst_ctx(tst, __FILE__, __LINE__)
-
-#define TST \
-    TST_CTX(tst)
-
-ts_t   *ts_new    (const char *fmt, ...);
-void    ts_test   (ts_t *ts, tst_func_t func, const char *fmt, ...);
-int     ts_run    (ts_t *ts);
-void    ts_free   (ts_t *ts);
-
-tst_t  *tst_ctx   (tst_t *tst, const char *file, int line);
-void    tst_check (tst_t *tst, const char *fmt, ...);
-void    tst_fail  (tst_t *tst, const char *fmt, ...);
-void    tst_log   (tst_t *tst, const char *fmt, ...);
+/* test suite object type */
+struct ts_suite_st;
+typedef struct ts_suite_st ts_suite_t;
+
+/* test object type */
+struct ts_test_st;
+typedef struct ts_test_st ts_test_t;
+
+/* test callback function type */
+typedef void (*ts_test_cb_t)(ts_test_t *);
+
+/* test suite operations */
+ts_suite_t *ts_suite_new  (const char *fmt, ...);
+void        ts_suite_test (ts_suite_t *s, ts_test_cb_t func, const char *fmt, ...);
+int         ts_suite_run  (ts_suite_t *s);
+void        ts_suite_free (ts_suite_t *s);
+
+/* test operations */
+ts_test_t  *ts_test_ctx   (ts_test_t *t, const char *file, int line);
+void        ts_test_check (ts_test_t *t, const char *fmt, ...);
+void        ts_test_fail  (ts_test_t *t, const char *fmt, ...);
+void        ts_test_log   (ts_test_t *t, const char *fmt, ...);
+
+/* test suite short-cut macros */
+#define TS_TEST(name) \
+    static void name(ts_test_t *_t)
+#define TS_CTX \
+    ts_test_ctx(_t, __FILE__, __LINE__)
 
 #endif /* _TS_H_ */
 

CVSTrac 2.0.1