Back to index

libunity  5.92.0
test-sound-menu.c
Go to the documentation of this file.
00001 /* test-sound-menu.c generated by valac 0.17.2, the Vala compiler
00002  * generated from test-sound-menu.vala, do not modify */
00003 
00004 /* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
00005 /*
00006  * Copyright (C) 2011 Canonical Ltd
00007  *
00008  * This program is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License version 3 as
00010  * published by the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019  *
00020  * Authored by Conor Curran <conor.curran@canonical.com>
00021  *
00022  */
00023 
00024 #include <glib.h>
00025 #include <glib-object.h>
00026 #include <unity-internal.h>
00027 #include <gio/gio.h>
00028 #include <libdbusmenu-glib/client.h>
00029 #include <libdbusmenu-glib/dbusmenu-glib.h>
00030 #include <libdbusmenu-glib/enum-types.h>
00031 #include <libdbusmenu-glib/menuitem-proxy.h>
00032 #include <libdbusmenu-glib/menuitem.h>
00033 #include <libdbusmenu-glib/server.h>
00034 #include <libdbusmenu-glib/types.h>
00035 #include <stdlib.h>
00036 #include <string.h>
00037 #include <config.h>
00038 #include <gobject/gvaluecollector.h>
00039 
00040 
00041 #define UNITY_TEST_TYPE_SOUND_MENU_SUITE (unity_test_sound_menu_suite_get_type ())
00042 #define UNITY_TEST_SOUND_MENU_SUITE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TEST_TYPE_SOUND_MENU_SUITE, UnityTestSoundMenuSuite))
00043 #define UNITY_TEST_SOUND_MENU_SUITE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TEST_TYPE_SOUND_MENU_SUITE, UnityTestSoundMenuSuiteClass))
00044 #define UNITY_TEST_IS_SOUND_MENU_SUITE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TEST_TYPE_SOUND_MENU_SUITE))
00045 #define UNITY_TEST_IS_SOUND_MENU_SUITE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TEST_TYPE_SOUND_MENU_SUITE))
00046 #define UNITY_TEST_SOUND_MENU_SUITE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TEST_TYPE_SOUND_MENU_SUITE, UnityTestSoundMenuSuiteClass))
00047 
00048 typedef struct _UnityTestSoundMenuSuite UnityTestSoundMenuSuite;
00049 typedef struct _UnityTestSoundMenuSuiteClass UnityTestSoundMenuSuiteClass;
00050 typedef struct _UnityTestSoundMenuSuitePrivate UnityTestSoundMenuSuitePrivate;
00051 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00052 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00053 typedef struct _UnityTestParamSpecSoundMenuSuite UnityTestParamSpecSoundMenuSuite;
00054 #define _unity_test_sound_menu_suite_unref0(var) ((var == NULL) ? NULL : (var = (unity_test_sound_menu_suite_unref (var), NULL)))
00055 #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
00056 
00057 struct _UnityTestSoundMenuSuite {
00058        GTypeInstance parent_instance;
00059        volatile int ref_count;
00060        UnityTestSoundMenuSuitePrivate * priv;
00061 };
00062 
00063 struct _UnityTestSoundMenuSuiteClass {
00064        GTypeClass parent_class;
00065        void (*finalize) (UnityTestSoundMenuSuite *self);
00066 };
00067 
00068 struct _UnityTestParamSpecSoundMenuSuite {
00069        GParamSpec parent_instance;
00070 };
00071 
00072 
00073 static gpointer unity_test_sound_menu_suite_parent_class = NULL;
00074 
00075 gpointer unity_test_sound_menu_suite_ref (gpointer instance);
00076 void unity_test_sound_menu_suite_unref (gpointer instance);
00077 GParamSpec* unity_test_param_spec_sound_menu_suite (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
00078 void unity_test_value_set_sound_menu_suite (GValue* value, gpointer v_object);
00079 void unity_test_value_take_sound_menu_suite (GValue* value, gpointer v_object);
00080 gpointer unity_test_value_get_sound_menu_suite (const GValue* value);
00081 GType unity_test_sound_menu_suite_get_type (void) G_GNUC_CONST;
00082 enum  {
00083        UNITY_TEST_SOUND_MENU_SUITE_DUMMY_PROPERTY
00084 };
00085 UnityTestSoundMenuSuite* unity_test_sound_menu_suite_new (void);
00086 UnityTestSoundMenuSuite* unity_test_sound_menu_suite_construct (GType object_type);
00087 void unity_test_sound_menu_suite_test_stability (void);
00088 static void _unity_test_sound_menu_suite_test_stability_gtest_data_func (gpointer self);
00089 void unity_test_sound_menu_suite_test_metadata_updates (void);
00090 static void _unity_test_sound_menu_suite_test_metadata_updates_gtest_data_func (gpointer self);
00091 void unity_test_sound_menu_suite_test_playback_status_updates (void);
00092 static void _unity_test_sound_menu_suite_test_playback_status_updates_gtest_data_func (gpointer self);
00093 void unity_test_sound_menu_suite_test_current_playlist (void);
00094 static void _unity_test_sound_menu_suite_test_current_playlist_gtest_data_func (gpointer self);
00095 void unity_test_sound_menu_suite_test_track_specific_items (void);
00096 static void _unity_test_sound_menu_suite_test_track_specific_items_gtest_data_func (gpointer self);
00097 void unity_test_sound_menu_suite_test_player_specific_items (void);
00098 static void _unity_test_sound_menu_suite_test_player_specific_items_gtest_data_func (gpointer self);
00099 static void unity_test_sound_menu_suite_finalize (UnityTestSoundMenuSuite* obj);
00100 gint unity_test_main (gchar** args, int args_length1);
00101 
00102 
00103 static void _unity_test_sound_menu_suite_test_stability_gtest_data_func (gpointer self) {
00104        unity_test_sound_menu_suite_test_stability ();
00105 }
00106 
00107 
00108 static void _unity_test_sound_menu_suite_test_metadata_updates_gtest_data_func (gpointer self) {
00109        unity_test_sound_menu_suite_test_metadata_updates ();
00110 }
00111 
00112 
00113 static void _unity_test_sound_menu_suite_test_playback_status_updates_gtest_data_func (gpointer self) {
00114        unity_test_sound_menu_suite_test_playback_status_updates ();
00115 }
00116 
00117 
00118 static void _unity_test_sound_menu_suite_test_current_playlist_gtest_data_func (gpointer self) {
00119        unity_test_sound_menu_suite_test_current_playlist ();
00120 }
00121 
00122 
00123 static void _unity_test_sound_menu_suite_test_track_specific_items_gtest_data_func (gpointer self) {
00124        unity_test_sound_menu_suite_test_track_specific_items ();
00125 }
00126 
00127 
00128 static void _unity_test_sound_menu_suite_test_player_specific_items_gtest_data_func (gpointer self) {
00129        unity_test_sound_menu_suite_test_player_specific_items ();
00130 }
00131 
00132 
00133 UnityTestSoundMenuSuite* unity_test_sound_menu_suite_construct (GType object_type) {
00134        UnityTestSoundMenuSuite* self = NULL;
00135        self = (UnityTestSoundMenuSuite*) g_type_create_instance (object_type);
00136        g_test_add_data_func ("/Unit/SoundMenu/Player/SanityCheck", NULL, _unity_test_sound_menu_suite_test_stability_gtest_data_func);
00137        g_test_add_data_func ("/Unit/SoundMenu/Player/MetadataUpdates", NULL, _unity_test_sound_menu_suite_test_metadata_updates_gtest_data_func);
00138        g_test_add_data_func ("/Unit/SoundMenu/Player/PlaybackStatusUpdates", NULL, _unity_test_sound_menu_suite_test_playback_status_updates_gtest_data_func);
00139        g_test_add_data_func ("/Unit/SoundMenu/Player/CurrentPlaylist", NULL, _unity_test_sound_menu_suite_test_current_playlist_gtest_data_func);
00140        g_test_add_data_func ("/Unit/SoundMenu/Player/TrackSpecificItems", NULL, _unity_test_sound_menu_suite_test_track_specific_items_gtest_data_func);
00141        g_test_add_data_func ("/Unit/SoundMenu/Player/PlayerSpecificItems", NULL, _unity_test_sound_menu_suite_test_player_specific_items_gtest_data_func);
00142        return self;
00143 }
00144 
00145 
00146 UnityTestSoundMenuSuite* unity_test_sound_menu_suite_new (void) {
00147        return unity_test_sound_menu_suite_construct (UNITY_TEST_TYPE_SOUND_MENU_SUITE);
00148 }
00149 
00150 
00151 void unity_test_sound_menu_suite_test_stability (void) {
00152        UnityMusicPlayer* _tmp0_;
00153        UnityMusicPlayer* player;
00154        _tmp0_ = unity_music_player_new ("rhythmbox.desktop");
00155        player = _tmp0_;
00156        _vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (player, UNITY_TYPE_MUSIC_PLAYER), "player is MusicPlayer");
00157        _g_object_unref0 (player);
00158 }
00159 
00160 
00161 void unity_test_sound_menu_suite_test_metadata_updates (void) {
00162        UnityMusicPlayer* _tmp0_;
00163        UnityMusicPlayer* player;
00164        UnityTrackMetadata* _tmp1_;
00165        UnityTrackMetadata* metadata;
00166        UnityTrackMetadata* _tmp2_;
00167        UnityTrackMetadata* _tmp3_;
00168        const gchar* _tmp4_;
00169        const gchar* _tmp5_;
00170        const gchar* _tmp6_;
00171        const gchar* _tmp7_;
00172        UnityTrackMetadata* _tmp8_;
00173        UnityTrackMetadata* _tmp9_;
00174        const gchar* _tmp10_;
00175        const gchar* _tmp11_;
00176        const gchar* _tmp12_;
00177        const gchar* _tmp13_;
00178        UnityTrackMetadata* _tmp14_;
00179        UnityTrackMetadata* _tmp15_;
00180        const gchar* _tmp16_;
00181        const gchar* _tmp17_;
00182        const gchar* _tmp18_;
00183        const gchar* _tmp19_;
00184        _tmp0_ = unity_music_player_new ("rhythmbox.desktop");
00185        player = _tmp0_;
00186        _tmp1_ = unity_track_metadata_new ();
00187        metadata = _tmp1_;
00188        unity_track_metadata_set_artist (metadata, "Autechre");
00189        unity_track_metadata_set_album (metadata, "LP5");
00190        unity_track_metadata_set_title (metadata, "Rae");
00191        unity_music_player_set_current_track (player, metadata);
00192        _tmp2_ = unity_music_player_get_current_track (player);
00193        _tmp3_ = _tmp2_;
00194        _tmp4_ = unity_track_metadata_get_artist (_tmp3_);
00195        _tmp5_ = _tmp4_;
00196        _tmp6_ = unity_track_metadata_get_artist (metadata);
00197        _tmp7_ = _tmp6_;
00198        _vala_assert (g_strcmp0 (_tmp5_, _tmp7_) == 0, "player.current_track.artist == metadata.artist");
00199        _tmp8_ = unity_music_player_get_current_track (player);
00200        _tmp9_ = _tmp8_;
00201        _tmp10_ = unity_track_metadata_get_title (_tmp9_);
00202        _tmp11_ = _tmp10_;
00203        _tmp12_ = unity_track_metadata_get_title (metadata);
00204        _tmp13_ = _tmp12_;
00205        _vala_assert (g_strcmp0 (_tmp11_, _tmp13_) == 0, "player.current_track.title == metadata.title");
00206        _tmp14_ = unity_music_player_get_current_track (player);
00207        _tmp15_ = _tmp14_;
00208        _tmp16_ = unity_track_metadata_get_album (_tmp15_);
00209        _tmp17_ = _tmp16_;
00210        _tmp18_ = unity_track_metadata_get_album (metadata);
00211        _tmp19_ = _tmp18_;
00212        _vala_assert (g_strcmp0 (_tmp17_, _tmp19_) == 0, "player.current_track.album == metadata.album");
00213        _g_object_unref0 (metadata);
00214        _g_object_unref0 (player);
00215 }
00216 
00217 
00218 void unity_test_sound_menu_suite_test_playback_status_updates (void) {
00219        UnityMusicPlayer* _tmp0_;
00220        UnityMusicPlayer* player;
00221        UnityPlaybackState _tmp1_;
00222        UnityPlaybackState _tmp2_;
00223        _tmp0_ = unity_music_player_new ("rhythmbox.desktop");
00224        player = _tmp0_;
00225        unity_music_player_set_playback_state (player, UNITY_PLAYBACK_STATE_PLAYING);
00226        _tmp1_ = unity_music_player_get_playback_state (player);
00227        _tmp2_ = _tmp1_;
00228        _vala_assert (_tmp2_ == UNITY_PLAYBACK_STATE_PLAYING, "player.playback_state == PlaybackState.PLAYING");
00229        _g_object_unref0 (player);
00230 }
00231 
00232 
00233 void unity_test_sound_menu_suite_test_current_playlist (void) {
00234        UnityMusicPlayer* _tmp0_;
00235        UnityMusicPlayer* player;
00236        UnityPlaylist* _tmp1_;
00237        UnityPlaylist* pl;
00238        UnityPlaylist* _tmp2_;
00239        UnityMusicPlayer* _tmp7_;
00240        UnityPlaylist* _tmp8_;
00241        UnityMusicPlayer* _tmp9_;
00242        UnityPlaylist* _tmp10_;
00243        UnityPlaylist* _tmp11_;
00244        const gchar* _tmp12_;
00245        const gchar* _tmp13_;
00246        UnityPlaylist* _tmp14_;
00247        const gchar* _tmp15_;
00248        const gchar* _tmp16_;
00249        UnityMusicPlayer* _tmp17_;
00250        UnityPlaylist* _tmp18_;
00251        UnityPlaylist* _tmp19_;
00252        const gchar* _tmp20_;
00253        const gchar* _tmp21_;
00254        UnityPlaylist* _tmp22_;
00255        const gchar* _tmp23_;
00256        const gchar* _tmp24_;
00257        UnityMusicPlayer* _tmp25_;
00258        UnityPlaylist* _tmp26_;
00259        UnityPlaylist* _tmp27_;
00260        GIcon* _tmp28_;
00261        GIcon* _tmp29_;
00262        UnityPlaylist* _tmp30_;
00263        GIcon* _tmp31_;
00264        GIcon* _tmp32_;
00265        gboolean _tmp33_ = FALSE;
00266        GError * _inner_error_ = NULL;
00267        _tmp0_ = unity_music_player_new ("rhythmbox.desktop");
00268        player = _tmp0_;
00269        _tmp1_ = unity_playlist_new ("fake-pl-id");
00270        pl = _tmp1_;
00271        _tmp2_ = pl;
00272        unity_playlist_set_name (_tmp2_, "yellow swans like");
00273        {
00274               GIcon* _tmp3_ = NULL;
00275               GIcon* _tmp4_;
00276               UnityPlaylist* _tmp5_;
00277               GIcon* _tmp6_;
00278               _tmp3_ = g_icon_new_for_string ("audio-volume-high", &_inner_error_);
00279               _tmp4_ = _tmp3_;
00280               if (_inner_error_ != NULL) {
00281                      goto __catch0_g_error;
00282               }
00283               _tmp5_ = pl;
00284               _tmp6_ = _tmp4_;
00285               unity_playlist_set_icon (_tmp5_, _tmp6_);
00286               _g_object_unref0 (_tmp6_);
00287        }
00288        goto __finally0;
00289        __catch0_g_error:
00290        {
00291               GError* e = NULL;
00292               e = _inner_error_;
00293               _inner_error_ = NULL;
00294               g_warning ("test-sound-menu.vala:81: Unable to load Icon from name provided - unab" \
00295 "le to complete test");
00296               _g_error_free0 (e);
00297               _g_object_unref0 (pl);
00298               _g_object_unref0 (player);
00299               return;
00300        }
00301        __finally0:
00302        if (_inner_error_ != NULL) {
00303               _g_object_unref0 (pl);
00304               _g_object_unref0 (player);
00305               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
00306               g_clear_error (&_inner_error_);
00307               return;
00308        }
00309        _tmp7_ = player;
00310        _tmp8_ = pl;
00311        unity_music_player_set_current_playlist (_tmp7_, _tmp8_);
00312        _tmp9_ = player;
00313        _tmp10_ = unity_music_player_get_current_playlist (_tmp9_);
00314        _tmp11_ = _tmp10_;
00315        _tmp12_ = unity_playlist_get_name (_tmp11_);
00316        _tmp13_ = _tmp12_;
00317        _tmp14_ = pl;
00318        _tmp15_ = unity_playlist_get_name (_tmp14_);
00319        _tmp16_ = _tmp15_;
00320        _vala_assert (g_strcmp0 (_tmp13_, _tmp16_) == 0, "player.current_playlist.name == pl.name");
00321        _tmp17_ = player;
00322        _tmp18_ = unity_music_player_get_current_playlist (_tmp17_);
00323        _tmp19_ = _tmp18_;
00324        _tmp20_ = unity_playlist_get_id (_tmp19_);
00325        _tmp21_ = _tmp20_;
00326        _tmp22_ = pl;
00327        _tmp23_ = unity_playlist_get_id (_tmp22_);
00328        _tmp24_ = _tmp23_;
00329        _vala_assert (g_strcmp0 (_tmp21_, _tmp24_) == 0, "player.current_playlist.id == pl.id");
00330        _tmp25_ = player;
00331        _tmp26_ = unity_music_player_get_current_playlist (_tmp25_);
00332        _tmp27_ = _tmp26_;
00333        _tmp28_ = unity_playlist_get_icon (_tmp27_);
00334        _tmp29_ = _tmp28_;
00335        _tmp30_ = pl;
00336        _tmp31_ = unity_playlist_get_icon (_tmp30_);
00337        _tmp32_ = _tmp31_;
00338        _tmp33_ = g_icon_equal (_tmp29_, _tmp32_);
00339        _vala_assert (_tmp33_, "player.current_playlist.icon.equal (pl.icon)");
00340        _g_object_unref0 (pl);
00341        _g_object_unref0 (player);
00342 }
00343 
00344 
00345 void unity_test_sound_menu_suite_test_track_specific_items (void) {
00346        UnityMusicPlayer* _tmp0_;
00347        UnityMusicPlayer* player;
00348        DbusmenuMenuitem* _tmp1_;
00349        DbusmenuMenuitem* menuitem;
00350        DbusmenuMenuitem* _tmp2_;
00351        DbusmenuMenuitem* _tmp3_;
00352        gint _tmp4_ = 0;
00353        gint _tmp5_ = 0;
00354        _tmp0_ = unity_music_player_new ("rhythmbox.desktop");
00355        player = _tmp0_;
00356        _tmp1_ = dbusmenu_menuitem_new ();
00357        menuitem = _tmp1_;
00358        unity_music_player_set_track_menu (player, menuitem);
00359        _tmp2_ = unity_music_player_get_track_menu (player);
00360        _tmp3_ = _tmp2_;
00361        _tmp4_ = dbusmenu_menuitem_get_id (_tmp3_);
00362        _tmp5_ = dbusmenu_menuitem_get_id (menuitem);
00363        _vala_assert (_tmp4_ == _tmp5_, "player.track_menu.get_id() ==  menuitem.get_id()");
00364        _g_object_unref0 (menuitem);
00365        _g_object_unref0 (player);
00366 }
00367 
00368 
00369 void unity_test_sound_menu_suite_test_player_specific_items (void) {
00370        UnityMusicPlayer* _tmp0_;
00371        UnityMusicPlayer* player;
00372        DbusmenuMenuitem* _tmp1_;
00373        DbusmenuMenuitem* menuitem;
00374        DbusmenuMenuitem* _tmp2_;
00375        DbusmenuMenuitem* _tmp3_;
00376        gint _tmp4_ = 0;
00377        gint _tmp5_ = 0;
00378        _tmp0_ = unity_music_player_new ("rhythmbox.desktop");
00379        player = _tmp0_;
00380        _tmp1_ = dbusmenu_menuitem_new ();
00381        menuitem = _tmp1_;
00382        unity_music_player_set_player_menu (player, menuitem);
00383        _tmp2_ = unity_music_player_get_player_menu (player);
00384        _tmp3_ = _tmp2_;
00385        _tmp4_ = dbusmenu_menuitem_get_id (_tmp3_);
00386        _tmp5_ = dbusmenu_menuitem_get_id (menuitem);
00387        _vala_assert (_tmp4_ == _tmp5_, "player.player_menu.get_id() == menuitem.get_id()");
00388        _g_object_unref0 (menuitem);
00389        _g_object_unref0 (player);
00390 }
00391 
00392 
00393 static void unity_test_value_sound_menu_suite_init (GValue* value) {
00394        value->data[0].v_pointer = NULL;
00395 }
00396 
00397 
00398 static void unity_test_value_sound_menu_suite_free_value (GValue* value) {
00399        if (value->data[0].v_pointer) {
00400               unity_test_sound_menu_suite_unref (value->data[0].v_pointer);
00401        }
00402 }
00403 
00404 
00405 static void unity_test_value_sound_menu_suite_copy_value (const GValue* src_value, GValue* dest_value) {
00406        if (src_value->data[0].v_pointer) {
00407               dest_value->data[0].v_pointer = unity_test_sound_menu_suite_ref (src_value->data[0].v_pointer);
00408        } else {
00409               dest_value->data[0].v_pointer = NULL;
00410        }
00411 }
00412 
00413 
00414 static gpointer unity_test_value_sound_menu_suite_peek_pointer (const GValue* value) {
00415        return value->data[0].v_pointer;
00416 }
00417 
00418 
00419 static gchar* unity_test_value_sound_menu_suite_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
00420        if (collect_values[0].v_pointer) {
00421               UnityTestSoundMenuSuite* object;
00422               object = collect_values[0].v_pointer;
00423               if (object->parent_instance.g_class == NULL) {
00424                      return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
00425               } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
00426                      return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
00427               }
00428               value->data[0].v_pointer = unity_test_sound_menu_suite_ref (object);
00429        } else {
00430               value->data[0].v_pointer = NULL;
00431        }
00432        return NULL;
00433 }
00434 
00435 
00436 static gchar* unity_test_value_sound_menu_suite_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
00437        UnityTestSoundMenuSuite** object_p;
00438        object_p = collect_values[0].v_pointer;
00439        if (!object_p) {
00440               return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
00441        }
00442        if (!value->data[0].v_pointer) {
00443               *object_p = NULL;
00444        } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
00445               *object_p = value->data[0].v_pointer;
00446        } else {
00447               *object_p = unity_test_sound_menu_suite_ref (value->data[0].v_pointer);
00448        }
00449        return NULL;
00450 }
00451 
00452 
00453 GParamSpec* unity_test_param_spec_sound_menu_suite (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
00454        UnityTestParamSpecSoundMenuSuite* spec;
00455        g_return_val_if_fail (g_type_is_a (object_type, UNITY_TEST_TYPE_SOUND_MENU_SUITE), NULL);
00456        spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
00457        G_PARAM_SPEC (spec)->value_type = object_type;
00458        return G_PARAM_SPEC (spec);
00459 }
00460 
00461 
00462 gpointer unity_test_value_get_sound_menu_suite (const GValue* value) {
00463        g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_SOUND_MENU_SUITE), NULL);
00464        return value->data[0].v_pointer;
00465 }
00466 
00467 
00468 void unity_test_value_set_sound_menu_suite (GValue* value, gpointer v_object) {
00469        UnityTestSoundMenuSuite* old;
00470        g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_SOUND_MENU_SUITE));
00471        old = value->data[0].v_pointer;
00472        if (v_object) {
00473               g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TEST_TYPE_SOUND_MENU_SUITE));
00474               g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
00475               value->data[0].v_pointer = v_object;
00476               unity_test_sound_menu_suite_ref (value->data[0].v_pointer);
00477        } else {
00478               value->data[0].v_pointer = NULL;
00479        }
00480        if (old) {
00481               unity_test_sound_menu_suite_unref (old);
00482        }
00483 }
00484 
00485 
00486 void unity_test_value_take_sound_menu_suite (GValue* value, gpointer v_object) {
00487        UnityTestSoundMenuSuite* old;
00488        g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_SOUND_MENU_SUITE));
00489        old = value->data[0].v_pointer;
00490        if (v_object) {
00491               g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TEST_TYPE_SOUND_MENU_SUITE));
00492               g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
00493               value->data[0].v_pointer = v_object;
00494        } else {
00495               value->data[0].v_pointer = NULL;
00496        }
00497        if (old) {
00498               unity_test_sound_menu_suite_unref (old);
00499        }
00500 }
00501 
00502 
00503 static void unity_test_sound_menu_suite_class_init (UnityTestSoundMenuSuiteClass * klass) {
00504        unity_test_sound_menu_suite_parent_class = g_type_class_peek_parent (klass);
00505        UNITY_TEST_SOUND_MENU_SUITE_CLASS (klass)->finalize = unity_test_sound_menu_suite_finalize;
00506 }
00507 
00508 
00509 static void unity_test_sound_menu_suite_instance_init (UnityTestSoundMenuSuite * self) {
00510        self->ref_count = 1;
00511 }
00512 
00513 
00514 static void unity_test_sound_menu_suite_finalize (UnityTestSoundMenuSuite* obj) {
00515        UnityTestSoundMenuSuite * self;
00516        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TEST_TYPE_SOUND_MENU_SUITE, UnityTestSoundMenuSuite);
00517 }
00518 
00519 
00520 GType unity_test_sound_menu_suite_get_type (void) {
00521        static volatile gsize unity_test_sound_menu_suite_type_id__volatile = 0;
00522        if (g_once_init_enter (&unity_test_sound_menu_suite_type_id__volatile)) {
00523               static const GTypeValueTable g_define_type_value_table = { unity_test_value_sound_menu_suite_init, unity_test_value_sound_menu_suite_free_value, unity_test_value_sound_menu_suite_copy_value, unity_test_value_sound_menu_suite_peek_pointer, "p", unity_test_value_sound_menu_suite_collect_value, "p", unity_test_value_sound_menu_suite_lcopy_value };
00524               static const GTypeInfo g_define_type_info = { sizeof (UnityTestSoundMenuSuiteClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_test_sound_menu_suite_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityTestSoundMenuSuite), 0, (GInstanceInitFunc) unity_test_sound_menu_suite_instance_init, &g_define_type_value_table };
00525               static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
00526               GType unity_test_sound_menu_suite_type_id;
00527               unity_test_sound_menu_suite_type_id = g_type_register_fundamental (g_type_fundamental_next (), "UnityTestSoundMenuSuite", &g_define_type_info, &g_define_type_fundamental_info, 0);
00528               g_once_init_leave (&unity_test_sound_menu_suite_type_id__volatile, unity_test_sound_menu_suite_type_id);
00529        }
00530        return unity_test_sound_menu_suite_type_id__volatile;
00531 }
00532 
00533 
00534 gpointer unity_test_sound_menu_suite_ref (gpointer instance) {
00535        UnityTestSoundMenuSuite* self;
00536        self = instance;
00537        g_atomic_int_inc (&self->ref_count);
00538        return instance;
00539 }
00540 
00541 
00542 void unity_test_sound_menu_suite_unref (gpointer instance) {
00543        UnityTestSoundMenuSuite* self;
00544        self = instance;
00545        if (g_atomic_int_dec_and_test (&self->ref_count)) {
00546               UNITY_TEST_SOUND_MENU_SUITE_GET_CLASS (self)->finalize (self);
00547               g_type_free_instance ((GTypeInstance *) self);
00548        }
00549 }
00550 
00551 
00552 gint unity_test_main (gchar** args, int args_length1) {
00553        gint result = 0;
00554        UnityTestSoundMenuSuite* sound_menu_test_suite = NULL;
00555        UnityTestSoundMenuSuite* _tmp0_;
00556        g_setenv ("XDG_DATA_HOME", TESTDIR "/data", TRUE);
00557        g_test_init (&args_length1, &args, NULL);
00558        _tmp0_ = unity_test_sound_menu_suite_new ();
00559        _unity_test_sound_menu_suite_unref0 (sound_menu_test_suite);
00560        sound_menu_test_suite = _tmp0_;
00561        g_test_run ();
00562        result = 0;
00563        _unity_test_sound_menu_suite_unref0 (sound_menu_test_suite);
00564        return result;
00565 }
00566 
00567 
00568 int main (int argc, char ** argv) {
00569        g_type_init ();
00570        return unity_test_main (argv, argc);
00571 }
00572 
00573 
00574