コード例 #1
0
Ensure(vector_push, pushes_elements_to_vector_properly)
{
  vector *double_v = new_vector(2, sizeof(double));

  double dummy = 1.23456789;

  int i;
  for(i = 0; i < 4; i++)
    vector_push(double_v, &dummy);

  assert_that(double_v->elems, is_non_null);
  assert_that(double_v->allocLength, is_equal_to(4));
  assert_that(double_v->logLength, is_equal_to(4));

  dispose_vector(&double_v);
}
コード例 #2
0
ファイル: jobs.c プロジェクト: senechal/shell
void dispose_job_list(Vector job_list){
    dispose_vector(job_list);
}