Ejemplo n.º 1
0
void test_cvector_at()
{
  cvector vec;
  int tester = 1;

  /* start the test */

  /* run the functions */
  cvector_init(&vec, int_function_registry());
  cvector_push_back(vec, &tester);

  /* test the results */;
  FO_ASSERT_EQUAL(*(int*)cvector_at(vec, 0), tester);

  cvector_destroy(vec);
}
Ejemplo n.º 2
0
void test_cvector_at()
{
  cvector vec;
  int tester = 1;

  /* start the test */
  printf("Test cvector_at:");

  /* run the functions */
  cvector_init(&vec, int_function_registry());
  cvector_push_back(vec, &tester);

  /* test the results */;
  CU_ASSERT_EQUAL(*(int*)cvector_at(vec, 0), tester);

  cvector_destroy(vec);
  test_failure();
  printf("\n");
}