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
This commit is contained in:
13:38:36 Tim Janik 2007-12-06 12:38:00 +00:00 committed by Tim Janik
parent 01a89326e8
commit 0a7a3f2fa2
3 changed files with 27 additions and 15 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -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)

View File

@ -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();
}