Example #1
0
END_TEST


START_TEST(test_send_test_error)
{
  TestResult *tr;
  setup_messaging();
  send_ctx_info(CK_CTX_SETUP);
  send_loc_info("abc123.c", 10);
  send_ctx_info(CK_CTX_TEST);
  send_loc_info("abc124.c", 22);
  send_loc_info("abc125.c", 25);
  tr = receive_test_result(1);
  teardown_messaging();

  ck_assert_msg (tr != NULL,
	       "No test result received");
  ck_assert_msg (tr_ctx(tr) == CK_CTX_TEST,
	       "Bad CTX received");
  ck_assert_msg (strcmp(tr_lfile(tr), "abc125.c") == 0,
	       "Bad loc file received");
  ck_assert_msg (tr_lno(tr) == 25,
	       "Bad loc line received");
  if (tr != NULL)
    tr_free(tr);
}
Example #2
0
static void srunner_run_init (SRunner *sr, enum print_output print_mode)
{
  set_fork_status(srunner_fork_status(sr));
  setup_messaging();
  srunner_init_logging (sr, print_mode);
  log_srunner_start (sr);
}
Example #3
0
END_TEST

START_TEST(test_send_big)
{
  TestResult *tr;
  int i;
  
  setup_messaging();
  send_ctx_info(CK_CTX_SETUP);
  send_loc_info("abc123.c", 10);
  for (i = 0; i < 10000; i++) {
    send_ctx_info(CK_CTX_TEST);
    send_loc_info("abc124.c", i);
  }

  tr = receive_test_result(0);
  teardown_messaging();

  ck_assert_msg (tr != NULL,
	       "No test result received");
  ck_assert_msg (tr_ctx(tr) == CK_CTX_TEST,
	       "Bad CTX received");
  ck_assert_msg (strcmp(tr_lfile(tr), "abc124.c") == 0,
	       "Bad loc file received");
  ck_assert_msg (tr_lno(tr) == i -1,
	       "Bad loc line received");
  if (tr != NULL)
    tr_free(tr);
}