Ejemplo n.º 1
0
int
main(int argc, char **argv) {
	g_test_init(&argc, &argv, NULL);
	g_test_bug_base("http://bugs.mysql.com/");

	g_test_add_func("/asn1/get_id", t_asn1_get_id);
	g_test_add_func("/asn1/get_length", t_asn1_get_length);
	g_test_add_func("/asn1/get_id", t_asn1_get_oid);

	return g_test_run();

}
Ejemplo n.º 2
0
int main(int argc, char *argv[])
{
	/* initialization */
	gtk_test_init(&argc, &argv, NULL);

	g_test_add_func("/gebr/help/about", test_gebr_help_about);
	/* FIXME: this test is not passing anymore
	g_test_add_func("/gebr/help/ckeditor/confirm-save", test_gebr_help_ckeditor_confirm_save);
	*/
	return g_test_run();

}
Ejemplo n.º 3
0
int
main (int   argc,
      char *argv[])
{
  g_type_init ();
  g_test_init (&argc, &argv, NULL);

  g_test_dbus_unset ();

  g_test_add_func ("/gdbus/bz627724", test_bz627724);
  return g_test_run();
}
Ejemplo n.º 4
0
int main(int argc, char **argv)
{
    QTestState *s = NULL;
    CharDriverState *chr = NULL;
    const char *hugefs = 0;
    char *socket_path = 0;
    char *qemu_cmd = 0;
    char *chr_path = 0;
    int ret;

    g_test_init(&argc, &argv, NULL);

    module_call_init(MODULE_INIT_QOM);

    hugefs = init_hugepagefs();
    if (!hugefs) {
        return 0;
    }

    socket_path = g_strdup_printf("/tmp/vhost-%d.sock", getpid());

    /* create char dev and add read handlers */
    qemu_add_opts(&qemu_chardev_opts);
    chr_path = g_strdup_printf("unix:%s,server,nowait", socket_path);
    chr = qemu_chr_new("chr0", chr_path, NULL);
    g_free(chr_path);
    qemu_chr_add_handlers(chr, chr_can_read, chr_read, NULL, chr);

    /* run the main loop thread so the chardev may operate */
    data_mutex = _mutex_new();
    data_cond = _cond_new();
    _thread_new(NULL, thread_function, NULL);

    qemu_cmd = g_strdup_printf(QEMU_CMD, hugefs, socket_path);
    s = qtest_start(qemu_cmd);
    g_free(qemu_cmd);

    qtest_add_func("/vhost-user/read-guest-mem", read_guest_mem);

    ret = g_test_run();

    if (s) {
        qtest_quit(s);
    }

    /* cleanup */
    unlink(socket_path);
    g_free(socket_path);
    _cond_free(data_cond);
    _mutex_free(data_mutex);

    return ret;
}
Ejemplo n.º 5
0
int main(int argc, char* argv[])
{
#if !GLIB_CHECK_VERSION(2, 35, 1)
    g_type_init();
#endif
    g_test_init (&argc, &argv, NULL);

    g_test_add_func ("/fcitx/keyboard", test_keyboard);
    g_test_add_func ("/fcitx/client", test_client);

    return g_test_run ();
}
int main(int argc, char **argv) {
  g_test_init(&argc, &argv, NULL);
  for (guint i = 0; i < G_N_ELEMENTS(example_messages); i++) {
    AddTest("TestNew", i, TestNew);
    AddTest("TestGetValues", i, TestGetValues);
    AddTest("TestLoad", i, TestLoad);
    AddTest("TestDump", i, TestDump);
    AddTest("TestRead", i, TestRead);
    AddTest("TestWrite", i, TestWrite);
  }
  return g_test_run();
}
Ejemplo n.º 7
0
int main(int argc, char **argv)
{
    g_test_init(&argc, &argv, NULL);
    
    g_test_add_func("/Bipartite Graph Test 1", bipartite_graph_test_0);
    g_test_add_func("/Bipartite Graph Test 2", bipartite_graph_test_1);
    g_test_add_func("/Bipartite Graph Test 3", bipartite_graph_test_2);
    g_test_add_func("/Bipartite Graph Test 4", bipartite_graph_test_3);
    g_test_add_func("/Bipartite Graph Test 5", bipartite_graph_test_4);
    
    return g_test_run();
}
Ejemplo n.º 8
0
/* The main test function */
int main(int argc, char** argv) {

	g_test_init (&argc, &argv, NULL);

	g_test_add_func ("/Messages", test_messages);
	g_test_add_func ("/Data", test_data);
    g_test_add_func ("/Localization", test_localization);
    g_test_add_func ("/Engine", test_engine);
    g_test_add_func ("/Config", test_config);
	
	return g_test_run();
}
Ejemplo n.º 9
0
int
main(int argc, char *argv[])
{
    g_type_init();
    g_test_init (&argc, &argv, NULL);

    g_test_add_func ("/testmemorybuffer/CreateAndDestroy", test_create_and_destroy);
    g_test_add_func ("/testmemorybuffer/OpenAndClose", test_open_and_close);
    g_test_add_func ("/testmemorybuffer/ReadAndWrite", test_read_and_write);

    return g_test_run ();
}
Ejemplo n.º 10
0
int main(int argc, char **argv) {
	g_thread_init(NULL);

	g_test_init(&argc, &argv, NULL);
	g_test_bug_base("http://bugs.mysql.com/");
	
	g_test_add_func("/core/basedir/relpath", test_path_basedir);
	g_test_add_func("/core/basedir/nobasedir", test_no_basedir);
	g_test_add_func("/core/basedir/abspath", test_abspath_basedir);
	
	return g_test_run();
}
Ejemplo n.º 11
0
int
main (int   argc,
      char *argv[])
{
  g_test_init (&argc, &argv, NULL);

  g_test_bug_base ("http://bugzilla.gnome.org/");

  g_test_add_func ("/socket-listener/event-signal", test_event_signal);

  return g_test_run();
}
Ejemplo n.º 12
0
int main(int argc, char *argv[])
{
	g_test_init(&argc, &argv, NULL);

	g_test_add_func("/radix/print", test_print);
	g_test_add_func("/radix/add", test_add);
	g_test_add_func("/radix/lookup", test_lookup);

	g_test_run();

	return 0;
}
Ejemplo n.º 13
0
int main(int argc, char **argv)
{
    const char *arch = qtest_get_arch();

    g_test_init(&argc, &argv, NULL);

    if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
        qtest_cb_for_every_machine(add_pc_test_case);
    }

    return g_test_run();
}
Ejemplo n.º 14
0
int main(int argc, char **argv){
	if (log4c_init()) {
		g_message("log4c init error!");
	}
	g_test_init(&argc, &argv, NULL);
	g_test_add("/misc/cache_insert_1", Fixture, NULL, case_setup, \
			test_cache_insert_1, case_teardown);
	g_test_add("/misc/cache_query_1", Fixture, NULL, case_setup, \
			test_cache_query_1, case_teardown);

	return g_test_run();
}
Ejemplo n.º 15
0
int main (int argc, char ** argv)
{
    g_test_init (&argc, &argv, NULL);
    g_type_init ();

    /** @todo Add here: g_test_add_func ("/test-class/test-class-method", test_class_method); */
    g_test_add_func ("/test-automata/test-FSM-start-state", test_FSM_start_state);
    g_test_add_func ("/test-automata/test-FSM-states", test_FSM_states);
    g_test_add_func ("/test-automata/test-concatenation-constructor", test_concatenation_constructor);

    g_test_run();
}
Ejemplo n.º 16
0
int main(int argc, char *argv[])
{
	g_test_init(&argc, &argv, NULL);

	g_test_add_func("/ecdh/multi", test_multi);

	g_test_add_func("/ecdh/sample/1", test_sample_1);
	g_test_add_func("/ecdh/sample/2", test_sample_2);
	g_test_add_func("/ecdh/sample/3", test_sample_3);

	return g_test_run();
}
Ejemplo n.º 17
0
int main(int argc, char **argv) {
  CacheTestInit();
  CacheTestInitUsersAndGroups();
  g_test_init(&argc, &argv, NULL);
  g_test_add_func(
      "/storage_test/TestPutAndGetEntry", TestPutAndGetEntry);
  g_test_add_func(
      "/storage_test/TestGetMissingEntry", TestGetMissingEntry);
  g_test_add_func(
      "/storage_test/TestGetInvalidUsername", TestGetInvalidUsername);
  return g_test_run();
}
Ejemplo n.º 18
0
int main(int argc, char* argv[])
{
    G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
    g_type_init();
    G_GNUC_END_IGNORE_DEPRECATIONS;
    g_test_init(&argc, &argv, NULL);
    g_test_add_func(TEST_PREFIX "basic", test_inotify_basic);
    g_test_add_func(TEST_PREFIX "move", test_inotify_move);
    g_test_add_func(TEST_PREFIX "callback", test_inotify_callback);
    test_init(&test_opt, argc, argv);
    return g_test_run();
}
Ejemplo n.º 19
0
int main(int argc, char** argv)
{
	gtk_test_init(&argc, &argv, NULL);

	g_test_add_func("/blacklist/active", test_set_blacklist_active);
	g_test_add_func("/blacklist/empty", test_empty_blacklist);

	/* mute standard debug output from plugin */
	g_log_set_handler("dynlist", G_LOG_LEVEL_DEBUG, redirect_log, NULL);

	return g_test_run();
}
Ejemplo n.º 20
0
int main (int   argc, char *argv[])
{
    g_type_init();
    fm_init(NULL);

    g_test_init (&argc, &argv, NULL); // initialize test program
    g_test_add_func("/FmPath/new_child_len", test_path_child);
    g_test_add_func("/FmPath/path_parsing", test_path_parsing);
    g_test_add_func("/FmPath/uri_parsing", test_uri_parsing);
    g_test_add_func("/FmPath/predefined_paths", test_predefined_paths);

    return g_test_run();
}
Ejemplo n.º 21
0
int
main(int argc, char *argv[])
{
	g_test_init(&argc, &argv, NULL);
#if !GLIB_CHECK_VERSION(2, 36, 0)
	g_type_init();
#endif
	g_test_add(CLASS"/001", gpointer, NULL, NULL, test_001, teardown);
	g_test_add(CLASS"/002", gpointer, NULL, NULL, test_002, teardown);
	g_test_add(CLASS"/003", gpointer, NULL, NULL, test_003, teardown);
	g_test_add(CLASS"/004", gpointer, NULL, NULL, test_004, teardown);
	return g_test_run();
}
Ejemplo n.º 22
0
int main(int argc, char **argv) {

	g_test_init(&argc, &argv, NULL);
	g_test_bug_base("http://bugs.mysql.com/");


	g_test_add_func("/core/test_zabbix_socket_header_judge",test_zabbix_socket_header_judge);
	g_test_add_func("/core/test_zabbix_socket_length_transform",test_zabbix_socket_length_transform);

	gint ret = g_test_run();

	return ret;
}
gint
main (gint argc, gchar * argv[])
{
#if !GLIB_CHECK_VERSION (2, 35, 1)
	g_type_init();
#endif
	g_test_init(&argc, &argv, NULL);

	/* Test suites */
	test_dbus_suite();

	return g_test_run ();
}
Ejemplo n.º 24
0
int
main(int argc, char *argv[])
{
	g_test_init(&argc, &argv, NULL);
	g_type_init();
#ifndef G_THREADS_IMPL_NONE
	if (!g_thread_supported()) {
		g_thread_init(NULL);
	}
#endif
	g_test_add(CLASS"/001", Fixture, NULL, setup, test_001, teardown);
	return g_test_run();
}
Ejemplo n.º 25
0
int main(int argc, char **argv)
{
    g_test_init(&argc, &argv, NULL);

    g_test_add_func("/0.15/visitor_core", test_visitor_core);
    g_test_add_func("/0.15/nested_structs", test_nested_structs);
    g_test_add_func("/0.15/enums", test_enums);
    g_test_add_func("/0.15/nested_enums", test_nested_enums);

    g_test_run();

    return 0;
}
Ejemplo n.º 26
0
int main(int argc, char **argv)
{
    bdrv_init();
    qemu_init_main_loop(&error_abort);

    g_test_init(&argc, &argv, NULL);

    g_test_add_func("/block-backend/drain_aio_error", test_drain_aio_error);
    g_test_add_func("/block-backend/drain_all_aio_error",
                    test_drain_all_aio_error);

    return g_test_run();
}
Ejemplo n.º 27
0
int main(int argc, char **argv)
{
	struct pg_error *error = NULL;
	int r;

	g_test_init(&argc, &argv, NULL);
	pg_start(argc, argv, &error);
	g_assert(!error);
	test_benchmark_rxtx(argc, argv);
	r = g_test_run();
	pg_stop();
	return r;
}
Ejemplo n.º 28
0
/**
 * clutter_test_run:
 *
 * Runs the test suite using the units added by calling
 * clutter_test_add().
 *
 * The typical test suite is composed of a list of functions
 * called by clutter_test_run(), for instance:
 *
 * |[
 * static void unit_foo (void) { ... }
 *
 * static void unit_bar (void) { ... }
 *
 * static void unit_baz (void) { ... }
 *
 * int
 * main (int argc, char *argv[])
 * {
 *   clutter_test_init (&argc, &argv);
 *
 *   clutter_test_add ("/unit/foo", unit_foo);
 *   clutter_test_add ("/unit/bar", unit_bar);
 *   clutter_test_add ("/unit/baz", unit_baz);
 *
 *   return clutter_test_run ();
 * }
 * ]|
 *
 * Return value: the exit code for the test suite
 *
 * Since: 1.18
 */
int
clutter_test_run (void)
{
  int res;

  g_assert (test_environ != NULL);
  
  res = g_test_run ();

  g_free (test_environ);

  return res;
}
Ejemplo n.º 29
0
int main(int argc, char **argv)
{
    g_test_init(&argc, &argv, NULL);

    g_test_add_func("/0.15/dispatch_cmd", test_dispatch_cmd);
    g_test_add_func("/0.15/dispatch_cmd_error", test_dispatch_cmd_error);
    g_test_add_func("/0.15/dispatch_cmd_io", test_dispatch_cmd_io);

    module_call_init(MODULE_INIT_QAPI);
    g_test_run();

    return 0;
}
Ejemplo n.º 30
0
gint
main(gint argc, gchar **argv) {
	g_test_init(&argc, &argv, NULL);

	g_test_add_func("/xmlnode/billion_laughs_attack",
	                test_xmlnode_billion_laughs_attack);
	g_test_add_func("/xmlnode/prefixes",
	                test_xmlnode_prefixes);
	g_test_add_func("/xmlnode/strip_prefixes",
	                test_strip_prefixes);

	return g_test_run();
}