Пример #1
0
END_TEST

static Suite *util_suite(void)
{
	TCase *tc;
	Suite *s = suite_create("qb_util");

	add_tcase(s, tc, test_check_overwrite);
	add_tcase(s, tc, test_check_normal);

	return s;
}
Пример #2
0
static Suite *
loop_signal_suite(void)
{
	TCase *tc;
	Suite *s = suite_create("loop_signal_suite");

	add_tcase(s, tc, test_loop_sig_handling, 10);
	add_tcase(s, tc, test_loop_sig_only_get_one);
	add_tcase(s, tc, test_loop_sig_delete);

	return s;
}
Пример #3
0
END_TEST

static Suite *
loop_timer_suite(void)
{
	TCase *tc;
	Suite *s = suite_create("loop_timers");

	add_tcase(s, tc, test_loop_timer_input);
	add_tcase(s, tc, test_loop_timer_basic, 30);
	add_tcase(s, tc, test_loop_timer_precision, 30);
	add_tcase(s, tc, test_loop_timer_expire_leak, 30);

	return s;
}
Пример #4
0
Suite *spi_master_suite(void)
{
  Suite *s = suite_create("Spi master");

  add_tcase(s, test_trx_set_invalid,          "Trx set invalid");
  add_tcase(s, test_trx_queue_already_queued, "Trx queue already queued");
  add_tcase(s, test_send_single_byte,         "Send single byte");
  add_tcase(s, test_receive_single_byte,      "Receive single byte");
  add_tcase(s, test_send_bytes,               "Send bytes");
  add_tcase(s, test_receive_bytes,            "Receive bytes");
  add_tcase(s, test_send_receive,             "Send/receive bytes");
  add_tcase(s, test_trx_multiple,             "Send/receive multiple trx");

  return s;
}
Пример #5
0
END_TEST

void tdatalist_init(void) {
  TCase *tc = tcase_create("Datalist");

  tcase_add_checked_fixture(tc, setup, teardown);
  tcase_add_test(tc, test_datalist_create);
  tcase_add_test(tc, test_datalist_get);
  tcase_add_test(tc, test_datalist_push);
  tcase_add_test(tc, test_datalist_pop);
  tcase_add_test(tc, test_datalist_remove);
  tcase_add_test(tc, test_datalist_set);
  add_tcase(tc);
}
Пример #6
0
END_TEST


static Suite *loop_job_suite(void)
{
	TCase *tc;
	Suite *s = suite_create("loop_job");

	add_tcase(s, tc, test_loop_job_input);
	add_tcase(s, tc, test_loop_job_1);
	add_tcase(s, tc, test_loop_job_4);
	add_tcase(s, tc, test_loop_job_nuts, 5);
	add_tcase(s, tc, test_job_rate_limit, 5);
	add_tcase(s, tc, test_job_add_del);
	add_tcase(s, tc, test_loop_job_order);

	return s;
}
Пример #7
0
END_TEST

/* ------------------------------------------------------------------------ */

void create_number(void) {
  TCase *tc = tcase_create("Number");
  tcase_add_checked_fixture(tc, _setup_number_lexer, _teardown);
  tcase_add_test(tc, test_lexa_integer);
  tcase_add_test(tc, test_lexa_neg_integer);
  tcase_add_test(tc, test_lexa_integer_nospace);
  tcase_add_test(tc, test_lexa_hex);
  tcase_add_test(tc, test_lexa_hex_nothexdigit);
  tcase_add_test(tc, test_lexa_float_unconfigured);
  tcase_add_test(tc, test_lexa_float);
  tcase_add_test(tc, test_lexa_neg_float);
  tcase_add_test(tc, test_lexa_sci_float);
  tcase_add_test(tc, test_lexa_sci_float_nosign);
  tcase_add_test(tc, test_lexa_sci_float_no_exp);
  tcase_add_test(tc, test_lexa_sci_float_sign_no_exp);
  add_tcase(tc);
}
Пример #8
0
END_TEST

/* ----------------------------------------------------------------------- */

/* ----------------------------------------------------------------------- */

void create_uri(void) {
  TCase *tc = tcase_create("URI");
  tcase_add_checked_fixture(tc, NULL, _teardown);
  tcase_add_test(tc, test_uri_create);
  tcase_add_test(tc, test_uri_create_ipv4);
  tcase_add_test(tc, test_uri_create_localhost);
  tcase_add_test(tc, test_uri_create_localhost_8080);
  tcase_add_test(tc, test_uri_auth);
  tcase_add_test(tc, test_uri_path);
  tcase_add_test(tc, test_uri_trailing_slash);
  tcase_add_test(tc, test_uri_relative_file);
  tcase_add_test(tc, test_uri_absolute_file);
  tcase_add_test(tc, test_uri_query);
  add_tcase(tc);
}
Пример #9
0
END_TEST
#endif

static Suite *
log_suite(void)
{
	TCase *tc;
	Suite *s = suite_create("logging");

	add_tcase(s, tc, test_va_serialize);
	add_tcase(s, tc, test_log_stupid_inputs);
	add_tcase(s, tc, test_log_basic);
	add_tcase(s, tc, test_log_format);
	add_tcase(s, tc, test_log_enable);
	add_tcase(s, tc, test_log_threads, 360);
	add_tcase(s, tc, test_log_long_msg);
	add_tcase(s, tc, test_log_filter_fn);
	add_tcase(s, tc, test_threaded_logging);
	add_tcase(s, tc, test_extended_information);

#ifdef HAVE_SYSLOG_TESTS
	add_tcase(s, tc, test_syslog);
#endif

	return s;
}