test.c 537 Bytes
Newer Older
1
2
3
4
/* Copyright 2001,2002 Roger Dingledine, Matej Pfajfar. */
/* See LICENSE for licensing information */
/* $Id$ */

Nick Mathewson's avatar
Nick Mathewson committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#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);
}


26
int main(int c, char**v) {
Nick Mathewson's avatar
Nick Mathewson committed
27
28
29
  test_buffers();

  printf("\n");
30
31
32
33
34
35
36
37
38
39
  return 0;
}

/*
  Local Variables:
  mode:c
  indent-tabs-mode:nil
  c-basic-offset:2
  End:
*/