/+junk/c_sdl_joypad

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/c_sdl_joypad

« back to all changes in this revision

Viewing changes to tests/dynamic_array/main.c

  • Committer: Gustav Hatvigsson
  • Date: 2014-01-29 14:51:36 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140129145136-ip56o1ujyhbhzcdz
* removed an assert and added an other...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "../../src/DynamicArray.h"
2
2
 
3
3
void test_for_each (DynamicArray * self, void * item, void * data) {
4
 
  /*
5
 
   * We do not care for the array at all, rely. Why it can be passed to the
 
4
  /* We do not care for the array at all, rely. Why it can be passed to the
6
5
   * for_each is becouse it may be useful when dealing with recursive cases,
7
6
   * or something...
8
7
   */
22
21
  int num_itt;
23
22
  for (int i = 0; i < num_itt; i++) {
24
23
    dynamic_array_add (array, i);
 
24
    assert (dynamic_array_get (array, i) == i);
25
25
  }
26
26
  
27
27
  assert (dynamic_array_size (array) != initial_size);
32
32
  
33
33
  dynamic_array_free (array)
34
34
  
35
 
  assert (array == NULL);
36
35
  
37
36
  retern 0;
38
37
}