2003-04-07 04:12:02 +02:00
|
|
|
/* Copyright 2001,2002 Roger Dingledine, Matej Pfajfar. */
|
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
/* $Id$ */
|
|
|
|
|
2003-04-07 15:25:44 +02:00
|
|
|
#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);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-04-07 04:12:02 +02:00
|
|
|
int main(int c, char**v) {
|
2003-04-07 15:25:44 +02:00
|
|
|
test_buffers();
|
|
|
|
|
|
|
|
printf("\n");
|
2003-04-07 04:12:02 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
Local Variables:
|
|
|
|
mode:c
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
c-basic-offset:2
|
|
|
|
End:
|
|
|
|
*/
|