[glib] Move testgobject to tests/



commit 86610b059463472e01c0001b83ed052a3edca2e0
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 1 14:06:20 2013 -0500

    Move testgobject to tests/
    
    And fix it to actually check the right things.

 gobject/Makefile.am              |    3 ---
 tests/Makefile.am                |    6 ++++--
 {gobject => tests}/testgobject.c |    4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gobject/Makefile.am b/gobject/Makefile.am
index d7c15d1..40b1c5e 100644
--- a/gobject/Makefile.am
+++ b/gobject/Makefile.am
@@ -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
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8a18f2f..066eb34 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -41,7 +41,7 @@ EXTRA_DIST +=					\
 	gen-casemap-txt.pl			\
 	iochannel-test-infile			\
 	utf8.txt				\
-	timeloop-basic.c		
+	timeloop-basic.c
 
 BUILT_EXTRA_DIST =				\
 	makefile.msc
@@ -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				\
diff --git a/gobject/testgobject.c b/tests/testgobject.c
similarity index 98%
rename from gobject/testgobject.c
rename to tests/testgobject.c
index d5d8d63..39e10d1 100644
--- a/gobject/testgobject.c
+++ b/tests/testgobject.c
@@ -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));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]