summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-10-23 22:42:31 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-10-23 22:42:31 +0000
commitdfa8c540a1932c4c7e376ca765c0d4707f0fd496 (patch)
tree176adb1ca3af08543a768b84be4fab3901442012 /tests
parent9c8150fd3582f63596c59a9cf4f2e9c0ace2c7ba (diff)
=== Released 2.3.0 ===
Thu Oct 23 12:38:24 2003 Owen Taylor <otaylor@redhat.com> * === Released 2.3.0 === * tests/gobject/Makefile.am (dist-hook): Remove and extra backslash. * tests/gobject/Makefile.am (EXTRA_DIST): Add testmarshal.list. * glib/Makefile.am (libglib_2_0_la_SOURCES): Add missing gunicode-private.h. * tests/testglib.c (main): Fix a warning. * tests/gobject/ifaceinherit.c: Remove check that wasn't supposed to work (adding an interface already added to the derived class to the base class), fix a bug.
Diffstat (limited to 'tests')
-rw-r--r--tests/gobject/.cvsignore3
-rw-r--r--tests/gobject/Makefile.am8
-rw-r--r--tests/gobject/ifaceinherit.c12
-rw-r--r--tests/testglib.c7
4 files changed, 14 insertions, 16 deletions
diff --git a/tests/gobject/.cvsignore b/tests/gobject/.cvsignore
index a1cb3adc9..7b5cc1bf3 100644
--- a/tests/gobject/.cvsignore
+++ b/tests/gobject/.cvsignore
@@ -2,7 +2,10 @@ Makefile
Makefile.in
accumulator
defaultiface
+ifacecheck
+ifaceinherit
ifaceinit
+ifaceproperties
override
testmarshal.c
testmarshal.h
diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
index c68912969..b1f212f4b 100644
--- a/tests/gobject/Makefile.am
+++ b/tests/gobject/Makefile.am
@@ -39,6 +39,7 @@ testmarshal.c: @REBUILD@ testmarshal.list $(glib_genmarshal)
&& rm -f xgen-gmc xgen-gmc~
BUILT_SOURCES = testmarshal.h testmarshal.c
+CLEANFILES = stamp-testmarshal.h
########################################################################
@@ -61,17 +62,20 @@ TESTS_ENVIRONMENT = srcdir=$(srcdir) \
########################################################################
+EXTRA_DIST = \
+ testmarshal.list
+
BUILT_EXTRA_DIST = \
testmarshal.h \
testmarshal.c
-dist-hook: $(BUILT_EXTRA_DIST) \
+dist-hook: $(BUILT_EXTRA_DIST)
files='$(BUILT_EXTRA_DIST)'; \
for f in $$files; do \
if test -f $$f; then d=.; else d=$(srcdir); fi; \
cp $$d/$$f $(distdir) || exit 1; done
-distclean-local: \
+distclean-local:
if test $(srcdir) = .; then :; else \
rm -f $(BUILT_EXTRA_DIST); \
fi
diff --git a/tests/gobject/ifaceinherit.c b/tests/gobject/ifaceinherit.c
index 516cb7eed..f9fe8beb6 100644
--- a/tests/gobject/ifaceinherit.c
+++ b/tests/gobject/ifaceinherit.c
@@ -46,10 +46,6 @@
* before DerivedObject's class_init; the results of
* g_type_interface_peek() are not allowed to change from one
* non-NULL vtable to another non-NULL vtable)
- *
- * I6) We add an interface to DerivedObject, then add the
- * same interface to BaseObject. This is rather pathological,
- * but should work.
*/
/*
@@ -96,7 +92,6 @@ typedef struct _TestIfaceClass TestIface2Class;
typedef struct _TestIfaceClass TestIface3Class;
typedef struct _TestIfaceClass TestIface4Class;
typedef struct _TestIfaceClass TestIface5Class;
-typedef struct _TestIfaceClass TestIface6Class;
struct _TestIfaceClass
{
@@ -109,14 +104,12 @@ struct _TestIfaceClass
#define TEST_TYPE_IFACE3 (test_iface3_get_type ())
#define TEST_TYPE_IFACE4 (test_iface4_get_type ())
#define TEST_TYPE_IFACE5 (test_iface5_get_type ())
-#define TEST_TYPE_IFACE6 (test_iface6_get_type ())
static DEFINE_IFACE (TestIface1, test_iface1, NULL, NULL)
static DEFINE_IFACE (TestIface2, test_iface2, NULL, NULL)
static DEFINE_IFACE (TestIface3, test_iface3, NULL, NULL)
static DEFINE_IFACE (TestIface4, test_iface4, NULL, NULL)
static DEFINE_IFACE (TestIface5, test_iface5, NULL, NULL)
-static DEFINE_IFACE (TestIface6, test_iface6, NULL, NULL)
static void
add_interface (GType object_type,
@@ -156,7 +149,7 @@ interface_is_base (GType object_type,
static void
init_derived_interface (TestIfaceClass *iface)
{
- iface->val = 21;
+ iface->val = 42;
}
static void
@@ -213,13 +206,11 @@ main (int argc,
add_base_interface (BASE_TYPE_OBJECT, TEST_TYPE_IFACE2);
add_derived_interface (DERIVED_TYPE_OBJECT, TEST_TYPE_IFACE5);
- add_derived_interface (DERIVED_TYPE_OBJECT, TEST_TYPE_IFACE6);
/* Class init DerivedObject */
g_type_class_ref (DERIVED_TYPE_OBJECT);
add_base_interface (BASE_TYPE_OBJECT, TEST_TYPE_IFACE4);
- add_base_interface (BASE_TYPE_OBJECT, TEST_TYPE_IFACE6);
/* Check that all the non-overridden interfaces were properly inherited
*/
@@ -231,7 +222,6 @@ main (int argc,
/* Check that all the overridden interfaces were properly overridden
*/
g_assert (interface_is_derived (DERIVED_TYPE_OBJECT, TEST_TYPE_IFACE5));
- g_assert (interface_is_derived (DERIVED_TYPE_OBJECT, TEST_TYPE_IFACE6));
return 0;
}
diff --git a/tests/testglib.c b/tests/testglib.c
index b2a7995c5..2bc2d8bd9 100644
--- a/tests/testglib.c
+++ b/tests/testglib.c
@@ -327,6 +327,7 @@ main (int argc,
GPtrArray *gparray;
GByteArray *gbarray;
GString *string1, *string2;
+ const gchar *charset;
GTree *tree;
char chars[62];
GRelation *relation;
@@ -1175,10 +1176,10 @@ main (int argc,
g_print ("ok\n");
- if (g_get_charset (&string))
- g_print ("current charset is UTF-8: %s\n", string);
+ if (g_get_charset (&charset))
+ g_print ("current charset is UTF-8: %s\n", charset);
else
- g_print ("current charset is not UTF-8: %s\n", string);
+ g_print ("current charset is not UTF-8: %s\n", charset);
#ifdef G_PLATFORM_WIN32
g_print ("current locale: %s\n", g_win32_getlocale ());