Move testgobject to tests/

And fix it to actually check the right things.
This commit is contained in:
Matthias Clasen 2013-01-01 14:06:20 -05:00
parent f2e00a07f4
commit 86610b0594
3 changed files with 6 additions and 7 deletions

View File

@ -214,16 +214,13 @@ libgobject_2_0_la_SOURCES = $(gobject_target_sources)
#
bin_PROGRAMS = gobject-query glib-genmarshal
bin_SCRIPTS = glib-mkenums
noinst_PROGRAMS = testgobject
# source files
gobject_query_SOURCES = gobject-query.c
glib_genmarshal_SOURCES = glib-genmarshal.c
testgobject_SOURCES = testgobject.c
# link programs against libgobject
progs_LDADD = ./libgobject-2.0.la $(libglib)
glib_genmarshal_LDADD = $(libglib)
gobject_query_LDADD = $(progs_LDADD)
testgobject_LDADD = $(progs_LDADD)
#
# auxillary files

View File

@ -64,7 +64,8 @@ noinst_PROGRAMS = $(TEST_PROGS) \
unicode-collate \
$(timeloop) \
assert-msg-test \
datetime
datetime \
testgobject
TEST_PROGS += testglib
testglib_SOURCES = testglib.c
@ -81,6 +82,7 @@ timeloop_LDADD = $(libglib)
timeloop_closure_LDADD = $(libglib) $(libgobject)
endif
datetime_LDADD = $(libglib)
testgobject_LDADD = $(libglib) $(libgobject)
test_programs = \
atomic-test \

View File

@ -390,10 +390,10 @@ main (int argc,
/* test new fundamentals */
g_assert (G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST) == g_type_fundamental_next ());
type = g_type_register_fundamental (g_type_fundamental_next (), "FooShadow1", &info, &finfo, 0);
g_assert (type == G_TYPE_RESERVED_USER_FIRST);
g_assert (type == G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST));
g_assert (G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST + 1) == g_type_fundamental_next ());
type = g_type_register_fundamental (g_type_fundamental_next (), "FooShadow2", &info, &finfo, 0);
g_assert (type == G_TYPE_RESERVED_USER_FIRST + 1);
g_assert (type == G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST + 1));
g_assert (G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST + 2) == g_type_fundamental_next ());
g_assert (g_type_from_name ("FooShadow1") == G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST));
g_assert (g_type_from_name ("FooShadow2") == G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST + 1));