Revision 6d1a7eaa

View differences:

som/Tests/chunkidset_test_bug.c
12 12
#include "trade_sig_la.h"
13 13
#include "chunkid_set_h.h"
14 14

  
15
static void display_cset(struct chunkID_set *cset)
16
{
17
  printf("Chunk ID Set initialised: size is %d\n", chunkID_set_size(cset));
18
  printChunkID_set(cset);
19
  printf("Earliest chunk %u\n", chunkID_set_get_earliest(cset));
20
  check_chunk(cset, 0);
21
  printf("Latest chunk %u.\n", chunkID_set_get_latest(cset));
22
  check_chunk(cset, 0);
23
}
24

  
15 25
static void simple_test(void)
16 26
{
17 27
  struct chunkID_set *cset;
......
25 35
    return;
26 36
  }
27 37

  
28
  printf("Chunk ID Set initialised: size is %d\n", chunkID_set_size(cset));
29
  printChunkID_set(cset);
30
  printf("Earliest chunk %u\n", chunkID_set_get_earliest(cset));
31
  check_chunk(cset, 0);
32
  printf("Latest chunk %u.\n", chunkID_set_get_latest(cset));
33
  check_chunk(cset, 0);
38
  display_cset(cset);
39
  chunkID_set_add_chunk(cset, 7);
40
  chunkID_set_add_chunk(cset, 2);
41
  display_cset(cset);
42

  
34 43
  chunkID_set_free(cset);
35 44
}
36 45

  

Also available in: Unified diff