Commit 0a7a3f2f authored by 13:38:36  Tim Janik's avatar 13:38:36 Tim Janik Committed by Tim Janik

ported to new testing framework.

2007-12-06 13:38:36  Tim Janik  <timj@imendio.com>

        * tests/floatingtest.c: ported to new testing framework.

        * tests/Makefile.am: run floatingtest as testing framework test.



svn path=/trunk/; revision=19118
parent 01a89326
2007-12-06 13:38:36 Tim Janik <timj@imendio.com>
* tests/floatingtest.c: ported to new testing framework.
* tests/Makefile.am: run floatingtest as testing framework test.
2007-12-06 10:44:52 Tim Janik <timj@imendio.com>
* tests/autotestfilechooser.c: majorly speed up execution by reducing
......
......@@ -25,7 +25,9 @@ if USE_X11
testsocket_programs = testsocket testsocket_child
endif
TEST_PROGS += floatingtest
floatingtest_DEPENDENCIES = $(TEST_DEPS)
floatingtest_LDADD = $(LDADDS)
TEST_PROGS += objecttests
objecttests_SOURCES = objecttests.c
objecttests_LDADD = $(LDADDS)
......@@ -36,11 +38,10 @@ autotestfilechooser_LDADD = $(LDADDS)
autotestfilechooser_SOURCES = autotestfilechooser.c
TESTS = floatingtest buildertest
TESTS = buildertest
noinst_PROGRAMS = $(TEST_PROGS) \
autotestkeywords \
floatingtest \
buildertest \
simple \
print-editor \
......@@ -117,7 +118,6 @@ endif
endif
simple_DEPENDENCIES = $(TEST_DEPS)
floatingtest_DEPENDENCIES = $(TEST_DEPS)
buildertest_DEPENDENCIES = $(TEST_DEPS)
print_editor_DEPENDENCIES = $(TEST_DEPS)
testicontheme_DEPENDENCIES = $(TEST_DEPS)
......@@ -173,7 +173,6 @@ testtooltips_DEPENDENCIES = $(TEST_DEPS)
testvolumebutton_DEPENDENCIES = $(TEST_DEPS)
simple_LDADD = $(LDADDS)
floatingtest_LDADD = $(LDADDS)
buildertest_LDADD = $(LDADDS)
print_editor_LDADD = $(LDADDS)
testaccel_LDADD = $(LDADDS)
......
......@@ -20,16 +20,16 @@
#include "../gtk/gtk.h"
static gboolean destroyed = FALSE;
static void destroy (void) { destroyed = TRUE; }
int
main (int argc,
char *argv[])
static void
destroy (void)
{
GtkWidget *widget;
gtk_init (&argc, &argv);
destroyed = TRUE;
}
widget = g_object_new (GTK_TYPE_LABEL, NULL);
static void
floating_tests (void)
{
GtkWidget *widget = g_object_new (GTK_TYPE_LABEL, NULL);
g_object_connect (widget, "signal::destroy", destroy, NULL, NULL);
g_assert (GTK_OBJECT_FLOATING (widget));
......@@ -59,6 +59,13 @@ main (int argc,
g_assert (!destroyed);
g_object_unref (widget);
g_assert (destroyed);
return 0;
}
int
main (int argc,
char *argv[])
{
gtk_test_init (&argc, &argv);
g_test_add_func ("/floatingtest", floating_tests);
return g_test_run();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment