[or-cvs] First test added

Nick Mathewson nickm at seul.org
Mon Apr 7 13:25:46 UTC 2003


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv31295/src/or

Modified Files:
	test.c 
Log Message:
First test added

Index: test.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- test.c	7 Apr 2003 02:12:02 -0000	1.1
+++ test.c	7 Apr 2003 13:25:44 -0000	1.2
@@ -2,7 +2,31 @@
 /* See LICENSE for licensing information */
 /* $Id$ */
 
+#include "or.h"
+#include "../common/test.h"
+
+void
+test_buffers() {
+  char *buf;
+  int buflen, buf_datalen;
+
+  if (buf_new(&buf, &buflen, &buf_datalen)) {
+    test_fail();
+  }
+
+  test_eq(buflen, MAX_BUF_SIZE);
+  test_eq(buf_datalen, 0);
+
+  
+
+  buf_free(buf);
+}
+
+
 int main(int c, char**v) {
+  test_buffers();
+
+  printf("\n");
   return 0;
 }
 



More information about the tor-commits mailing list