Back to index

bamf  0.2.120
Functions | Variables
test-bamf.c File Reference
#include <stdio.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <glib.h>
#include <gio/gio.h>
#include <sys/types.h>
#include <unistd.h>
#include <glibtop.h>
#include "bamf.h"

Go to the source code of this file.

Functions

void test_application_create_suite (GDBusConnection *connection)
void test_matcher_create_suite (void)
void test_view_create_suite (GDBusConnection *connection)
void test_window_create_suite (void)
static void on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer data)
static void on_name_lost (GDBusConnection *connection, const gchar *name, gpointer data)
gint main (gint argc, gchar *argv[])

Variables

static int result = 1

Function Documentation

gint main ( gint  argc,
gchar *  argv[] 
)

Definition at line 59 of file test-bamf.c.

{
  GMainLoop *loop;

  gtk_init (&argc, &argv);
  g_test_init (&argc, &argv, NULL);
  glibtop_init ();

  loop = g_main_loop_new (NULL, FALSE);

  g_bus_own_name (G_BUS_TYPE_SESSION,
                  BAMF_DBUS_SERVICE".test",
                  G_BUS_NAME_OWNER_FLAGS_NONE,
                  on_bus_acquired,
                  NULL,
                  on_name_lost,
                  loop,
                  NULL);

  g_main_loop_run (loop);

  return result;
}

Here is the call graph for this function:

static void on_bus_acquired ( GDBusConnection *  connection,
const gchar *  name,
gpointer  data 
) [static]

Definition at line 38 of file test-bamf.c.

{
  GMainLoop *loop = data;

  test_matcher_create_suite ();
  test_view_create_suite (connection);
  test_window_create_suite ();
  test_application_create_suite (connection);
  result = g_test_run ();

  g_main_loop_quit (loop);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void on_name_lost ( GDBusConnection *  connection,
const gchar *  name,
gpointer  data 
) [static]

Definition at line 52 of file test-bamf.c.

{
  GMainLoop *loop = data;
  g_main_loop_quit (loop);
}

Here is the caller graph for this function:

void test_application_create_suite ( GDBusConnection *  connection)

Definition at line 48 of file test-application.c.

{
#define DOMAIN "/Application"

  gdbus_connection = connection;

  g_test_add_func (DOMAIN"/Allocation", test_allocation);
  g_test_add_func (DOMAIN"/DesktopFile", test_desktop_file);
  g_test_add_func (DOMAIN"/ManagesXid", test_manages_xid);
  g_test_add_func (DOMAIN"/Xids", test_get_xids);
  g_test_add_func (DOMAIN"/Events/Active", test_active);
  g_test_add_func (DOMAIN"/Events/Urgent", test_urgent);
  g_test_add_func (DOMAIN"/Events/UserVisible", test_user_visible);
  g_test_add_func (DOMAIN"/Events/WindowAdded", test_window_added);
  g_test_add_func (DOMAIN"/Events/WindowRemoved", test_window_removed);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void test_matcher_create_suite ( void  )

Definition at line 27 of file test-matcher.c.

{
#define DOMAIN "/Matcher"

  g_test_add_func (DOMAIN"/Allocation", test_allocation);
}

Here is the caller graph for this function:

void test_view_create_suite ( GDBusConnection *  connection)

Definition at line 43 of file test-view.c.

{
#define DOMAIN "/View"

  gdbus_connection = connection;

  g_test_add_func (DOMAIN"/Allocation", test_allocation);
  g_test_add_func (DOMAIN"/Name", test_name);
  g_test_add_func (DOMAIN"/Active", test_active);
  g_test_add_func (DOMAIN"/Running", test_running);
  g_test_add_func (DOMAIN"/Path", test_path);
  g_test_add_func (DOMAIN"/Path/Collision", test_path_collision);
  g_test_add_func (DOMAIN"/Events/Close", test_closed_event);
  g_test_add_func (DOMAIN"/Events/Active", test_active_event);
  g_test_add_func (DOMAIN"/Events/Running", test_running_event);
  g_test_add_func (DOMAIN"/Events/ChildAdded", test_child_added_event);
  g_test_add_func (DOMAIN"/Events/ChildRemoved", test_child_removed_event);
  g_test_add_func (DOMAIN"/Children", test_children);
  g_test_add_func (DOMAIN"/Children/Paths", test_children_paths);
  g_test_add_func (DOMAIN"/Children/UnrefOrder", test_parent_child_out_of_order_unref);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void test_window_create_suite ( void  )

Definition at line 40 of file test-window.c.

{
#define DOMAIN "/Window"

  g_test_add_func (DOMAIN"/Allocation", test_allocation);
  g_test_add_func (DOMAIN"/Xid", test_xid);
  g_test_add_func (DOMAIN"/Events/Active", test_active);
  g_test_add_func (DOMAIN"/Events/Urgent", test_urgent);
  g_test_add_func (DOMAIN"/Events/UserVisible", test_user_visible);
  g_test_add_func (DOMAIN"/Events/Maximized", test_maximized);
  g_test_add_func (DOMAIN"/Events/VerticallyMaximized", test_vmaximized);
  g_test_add_func (DOMAIN"/Events/HorizontallyMaximized", test_hmaximized);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int result = 1 [static]

Definition at line 35 of file test-bamf.c.