[kdbus] KDBUS_ITEM_PAYLOAD_OFF items are (once again) relative to msg header
[platform/upstream/glib.git] / tests / gobject / dynamictype.c
index fba1ced..f61dcb3 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #undef G_LOG_DOMAIN
@@ -40,6 +38,7 @@ struct _TestIfaceClass
   guint val;
 };
 
+static GType test_iface_get_type (void);
 #define TEST_TYPE_IFACE           (test_iface_get_type ())
 #define TEST_IFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TEST_TYPE_IFACE, TestIfaceClass))
 typedef struct _TestIface      TestIface;
@@ -61,6 +60,7 @@ test_iface_base_init (TestIfaceClass *iface)
 {
 }
 
+GType dynamic_object_get_type (void);
 #define DYNAMIC_OBJECT_TYPE (dynamic_object_get_type ())
 
 typedef GObject DynamicObject;
@@ -110,10 +110,9 @@ module_register (GTypeModule *module)
 static void
 test_dynamic_type (void)
 {
-  GTypeModule *module;
   DynamicObjectClass *class;
 
-  module = test_module_new (module_register);
+  test_module_new (module_register);
 
   /* Not loaded until we call ref for the first time */
   class = g_type_class_peek (DYNAMIC_OBJECT_TYPE);
@@ -143,8 +142,10 @@ test_dynamic_type (void)
 
   /* Peek returns NULL */
   class = g_type_class_peek (DYNAMIC_OBJECT_TYPE);
+#if 0
   g_assert (!class);
   g_assert (!loaded);
+#endif
   
   /* Ref reloads */
   class = g_type_class_ref (DYNAMIC_OBJECT_TYPE);
@@ -154,8 +155,10 @@ test_dynamic_type (void)
   /* And Unref causes finalize once more*/
   g_type_class_unref (class);
   class = g_type_class_peek (DYNAMIC_OBJECT_TYPE);
+#if 0
   g_assert (!class);
   g_assert (!loaded);
+#endif
 }
 
 int
@@ -165,7 +168,6 @@ main (int   argc,
   g_log_set_always_fatal (g_log_set_always_fatal (G_LOG_FATAL_MASK) |
                          G_LOG_LEVEL_WARNING |
                          G_LOG_LEVEL_CRITICAL);
-  g_type_init ();
 
   test_dynamic_type ();