Back to index

libunity  5.92.0
test-appinfo-manager.c
Go to the documentation of this file.
00001 /* test-appinfo-manager.c generated by valac 0.17.2, the Vala compiler
00002  * generated from test-appinfo-manager.vala, do not modify */
00003 
00004 /* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
00005 /*
00006  * Copyright (C) 2010 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 Mikkel Kamstrup Erlandsen <mikkel.kamstrup@canonical.com>
00021  *
00022  */
00023 
00024 #include <glib.h>
00025 #include <glib-object.h>
00026 #include <unity-internal.h>
00027 #include <stdlib.h>
00028 #include <string.h>
00029 #include <gio/gio.h>
00030 #include <config.h>
00031 #include <gobject/gvaluecollector.h>
00032 
00033 
00034 #define UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE (unity_test_app_info_manager_suite_get_type ())
00035 #define UNITY_TEST_APP_INFO_MANAGER_SUITE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE, UnityTestAppInfoManagerSuite))
00036 #define UNITY_TEST_APP_INFO_MANAGER_SUITE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE, UnityTestAppInfoManagerSuiteClass))
00037 #define UNITY_TEST_IS_APP_INFO_MANAGER_SUITE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE))
00038 #define UNITY_TEST_IS_APP_INFO_MANAGER_SUITE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE))
00039 #define UNITY_TEST_APP_INFO_MANAGER_SUITE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE, UnityTestAppInfoManagerSuiteClass))
00040 
00041 typedef struct _UnityTestAppInfoManagerSuite UnityTestAppInfoManagerSuite;
00042 typedef struct _UnityTestAppInfoManagerSuiteClass UnityTestAppInfoManagerSuiteClass;
00043 typedef struct _UnityTestAppInfoManagerSuitePrivate UnityTestAppInfoManagerSuitePrivate;
00044 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00045 #define _g_free0(var) (var = (g_free (var), NULL))
00046 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
00047 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00048 typedef struct _UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData;
00049 typedef struct _UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData;
00050 typedef struct _UnityTestParamSpecAppInfoManagerSuite UnityTestParamSpecAppInfoManagerSuite;
00051 #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
00052 
00053 struct _UnityTestAppInfoManagerSuite {
00054        GTypeInstance parent_instance;
00055        volatile int ref_count;
00056        UnityTestAppInfoManagerSuitePrivate * priv;
00057 };
00058 
00059 struct _UnityTestAppInfoManagerSuiteClass {
00060        GTypeClass parent_class;
00061        void (*finalize) (UnityTestAppInfoManagerSuite *self);
00062 };
00063 
00064 struct _UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData {
00065        int _state_;
00066        GObject* _source_object_;
00067        GAsyncResult* _res_;
00068        GSimpleAsyncResult* _async_result;
00069        GMainLoop* mainloop;
00070        UnityAppInfoManager* _tmp0_;
00071        UnityAppInfoManager* manager;
00072        GAppInfo* _tmp1_;
00073        GAppInfo* appinfo;
00074        gint _tmp2_;
00075        gchar** _tmp3_;
00076        gint _tmp4_;
00077        gchar** _tmp5_;
00078        gchar* _tmp6_;
00079        gchar* _tmp7_;
00080        GError* e;
00081        const gchar* _tmp8_;
00082        GMainLoop* _tmp9_;
00083        GError * _inner_error_;
00084 };
00085 
00086 struct _UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData {
00087        int _state_;
00088        GObject* _source_object_;
00089        GAsyncResult* _res_;
00090        GSimpleAsyncResult* _async_result;
00091        GMainLoop* mainloop;
00092        UnityAppInfoManager* _tmp0_;
00093        UnityAppInfoManager* manager;
00094        GAppInfo* _tmp1_;
00095        GAppInfo* info;
00096        const gchar* _tmp2_;
00097        GError* e;
00098        const gchar* _tmp3_;
00099        gint _tmp4_;
00100        gchar** _tmp5_;
00101        gchar** _tmp6_;
00102        gint _tmp6__length1;
00103        gchar** categories;
00104        gint categories_length1;
00105        gint _categories_size_;
00106        const gchar* _tmp7_;
00107        const gchar* _tmp8_;
00108        const gchar* _tmp9_;
00109        gint _tmp10_;
00110        gchar** _tmp11_;
00111        gchar** _tmp12_;
00112        gint _tmp12__length1;
00113        gchar** keywords;
00114        gint keywords_length1;
00115        gint _keywords_size_;
00116        const gchar* _tmp13_;
00117        const gchar* _tmp14_;
00118        const gchar* _tmp15_;
00119        const gchar* _tmp16_;
00120        const gchar* _tmp17_;
00121        const gchar* _tmp18_;
00122        gchar* _tmp19_;
00123        gchar* path;
00124        GFile* _tmp20_;
00125        GFile* _tmp21_;
00126        GFile* _tmp22_;
00127        GFile* _tmp23_;
00128        gchar* _tmp24_;
00129        gchar* _tmp25_;
00130        gchar* abs_path;
00131        GMainLoop* _tmp26_;
00132        GError * _inner_error_;
00133 };
00134 
00135 struct _UnityTestParamSpecAppInfoManagerSuite {
00136        GParamSpec parent_instance;
00137 };
00138 
00139 
00140 static gpointer unity_test_app_info_manager_suite_parent_class = NULL;
00141 
00142 gpointer unity_test_app_info_manager_suite_ref (gpointer instance);
00143 void unity_test_app_info_manager_suite_unref (gpointer instance);
00144 GParamSpec* unity_test_param_spec_app_info_manager_suite (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
00145 void unity_test_value_set_app_info_manager_suite (GValue* value, gpointer v_object);
00146 void unity_test_value_take_app_info_manager_suite (GValue* value, gpointer v_object);
00147 gpointer unity_test_value_get_app_info_manager_suite (const GValue* value);
00148 GType unity_test_app_info_manager_suite_get_type (void) G_GNUC_CONST;
00149 enum  {
00150        UNITY_TEST_APP_INFO_MANAGER_SUITE_DUMMY_PROPERTY
00151 };
00152 UnityTestAppInfoManagerSuite* unity_test_app_info_manager_suite_new (void);
00153 UnityTestAppInfoManagerSuite* unity_test_app_info_manager_suite_construct (GType object_type);
00154 void unity_test_app_info_manager_suite_test_allocation (void);
00155 static void _unity_test_app_info_manager_suite_test_allocation_gtest_data_func (gpointer self);
00156 void unity_test_app_info_manager_suite_test_clear_empty (void);
00157 static void _unity_test_app_info_manager_suite_test_clear_empty_gtest_data_func (gpointer self);
00158 void unity_test_app_info_manager_suite_test_sync_lookup_missing (void);
00159 static void _unity_test_app_info_manager_suite_test_sync_lookup_missing_gtest_data_func (gpointer self);
00160 void unity_test_app_info_manager_suite_test_async_lookup_missing (void);
00161 static void _unity_test_app_info_manager_suite_test_async_lookup_missing_gtest_data_func (gpointer self);
00162 void unity_test_app_info_manager_suite_test_sync_lookup_ok (void);
00163 static void _unity_test_app_info_manager_suite_test_sync_lookup_ok_gtest_data_func (gpointer self);
00164 void unity_test_app_info_manager_suite_test_async_lookup_ok (void);
00165 static void _unity_test_app_info_manager_suite_test_async_lookup_ok_gtest_data_func (gpointer self);
00166 void unity_test_app_info_manager_suite_do_test_async_lookup_missing (GMainLoop* mainloop, GAsyncReadyCallback _callback_, gpointer _user_data_);
00167 void unity_test_app_info_manager_suite_do_test_async_lookup_missing_finish (GAsyncResult* _res_);
00168 static void unity_test_app_info_manager_suite_do_test_async_lookup_missing_data_free (gpointer _data);
00169 static gboolean unity_test_app_info_manager_suite_do_test_async_lookup_missing_co (UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData* _data_);
00170 static void unity_test_app_info_manager_suite_do_test_async_lookup_missing_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00171 static gchar** _vala_array_dup1 (gchar** self, int length);
00172 static gchar** _vala_array_dup2 (gchar** self, int length);
00173 void unity_test_app_info_manager_suite_do_test_async_lookup_ok (GMainLoop* mainloop, GAsyncReadyCallback _callback_, gpointer _user_data_);
00174 void unity_test_app_info_manager_suite_do_test_async_lookup_ok_finish (GAsyncResult* _res_);
00175 static void unity_test_app_info_manager_suite_do_test_async_lookup_ok_data_free (gpointer _data);
00176 static gboolean unity_test_app_info_manager_suite_do_test_async_lookup_ok_co (UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData* _data_);
00177 static void unity_test_app_info_manager_suite_do_test_async_lookup_ok_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00178 static gchar** _vala_array_dup3 (gchar** self, int length);
00179 static gchar** _vala_array_dup4 (gchar** self, int length);
00180 static void unity_test_app_info_manager_suite_finalize (UnityTestAppInfoManagerSuite* obj);
00181 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
00182 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
00183 
00184 
00185 static void _unity_test_app_info_manager_suite_test_allocation_gtest_data_func (gpointer self) {
00186        unity_test_app_info_manager_suite_test_allocation ();
00187 }
00188 
00189 
00190 static void _unity_test_app_info_manager_suite_test_clear_empty_gtest_data_func (gpointer self) {
00191        unity_test_app_info_manager_suite_test_clear_empty ();
00192 }
00193 
00194 
00195 static void _unity_test_app_info_manager_suite_test_sync_lookup_missing_gtest_data_func (gpointer self) {
00196        unity_test_app_info_manager_suite_test_sync_lookup_missing ();
00197 }
00198 
00199 
00200 static void _unity_test_app_info_manager_suite_test_async_lookup_missing_gtest_data_func (gpointer self) {
00201        unity_test_app_info_manager_suite_test_async_lookup_missing ();
00202 }
00203 
00204 
00205 static void _unity_test_app_info_manager_suite_test_sync_lookup_ok_gtest_data_func (gpointer self) {
00206        unity_test_app_info_manager_suite_test_sync_lookup_ok ();
00207 }
00208 
00209 
00210 static void _unity_test_app_info_manager_suite_test_async_lookup_ok_gtest_data_func (gpointer self) {
00211        unity_test_app_info_manager_suite_test_async_lookup_ok ();
00212 }
00213 
00214 
00215 UnityTestAppInfoManagerSuite* unity_test_app_info_manager_suite_construct (GType object_type) {
00216        UnityTestAppInfoManagerSuite* self = NULL;
00217        self = (UnityTestAppInfoManagerSuite*) g_type_create_instance (object_type);
00218        g_test_add_data_func ("/Unit/AppInfoManager/Allocation", NULL, _unity_test_app_info_manager_suite_test_allocation_gtest_data_func);
00219        g_test_add_data_func ("/Unit/AppInfoManager/ClearEmpty", NULL, _unity_test_app_info_manager_suite_test_clear_empty_gtest_data_func);
00220        g_test_add_data_func ("/Unit/AppInfoManager/SyncLookupMissing", NULL, _unity_test_app_info_manager_suite_test_sync_lookup_missing_gtest_data_func);
00221        g_test_add_data_func ("/Unit/AppInfoManager/AsyncLookupMissing", NULL, _unity_test_app_info_manager_suite_test_async_lookup_missing_gtest_data_func);
00222        g_test_add_data_func ("/Unit/AppInfoManager/SyncLookupOk", NULL, _unity_test_app_info_manager_suite_test_sync_lookup_ok_gtest_data_func);
00223        g_test_add_data_func ("/Unit/AppInfoManager/AsyncLookupOk", NULL, _unity_test_app_info_manager_suite_test_async_lookup_ok_gtest_data_func);
00224        return self;
00225 }
00226 
00227 
00228 UnityTestAppInfoManagerSuite* unity_test_app_info_manager_suite_new (void) {
00229        return unity_test_app_info_manager_suite_construct (UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE);
00230 }
00231 
00232 
00233 void unity_test_app_info_manager_suite_test_allocation (void) {
00234        UnityAppInfoManager* _tmp0_ = NULL;
00235        UnityAppInfoManager* manager;
00236        _tmp0_ = unity_app_info_manager_get_default ();
00237        manager = _tmp0_;
00238        _vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (manager, UNITY_TYPE_APP_INFO_MANAGER), "manager is AppInfoManager");
00239        _g_object_unref0 (manager);
00240 }
00241 
00242 
00243 void unity_test_app_info_manager_suite_test_clear_empty (void) {
00244        UnityAppInfoManager* _tmp0_ = NULL;
00245        UnityAppInfoManager* manager;
00246        _tmp0_ = unity_app_info_manager_get_default ();
00247        manager = _tmp0_;
00248        unity_app_info_manager_clear (manager);
00249        unity_app_info_manager_clear (manager);
00250        _g_object_unref0 (manager);
00251 }
00252 
00253 
00254 void unity_test_app_info_manager_suite_test_sync_lookup_missing (void) {
00255        UnityAppInfoManager* _tmp0_ = NULL;
00256        UnityAppInfoManager* manager;
00257        GAppInfo* _tmp1_ = NULL;
00258        GAppInfo* _tmp2_;
00259        gint _tmp3_ = 0;
00260        gchar** _tmp4_ = NULL;
00261        gint _tmp5_ = 0;
00262        gchar** _tmp6_ = NULL;
00263        gchar* _tmp7_ = NULL;
00264        gchar* _tmp8_;
00265        _tmp0_ = unity_app_info_manager_get_default ();
00266        manager = _tmp0_;
00267        _tmp1_ = unity_app_info_manager_lookup (manager, "_foobar.desktop");
00268        _tmp2_ = _tmp1_;
00269        _vala_assert (_tmp2_ == NULL, "manager.lookup (\"_foobar.desktop\") == null");
00270        _g_object_unref0 (_tmp2_);
00271        _tmp4_ = unity_app_info_manager_get_categories (manager, "_foobar.desktop", &_tmp3_);
00272        _vala_assert (_tmp4_ == NULL, "manager.get_categories (\"_foobar.desktop\") == null");
00273        _tmp6_ = unity_app_info_manager_get_keywords (manager, "_foobar.desktop", &_tmp5_);
00274        _vala_assert (_tmp6_ == NULL, "manager.get_keywords (\"_foobar.desktop\") == null");
00275        _tmp7_ = unity_app_info_manager_get_path (manager, "_foobar.desktop");
00276        _tmp8_ = _tmp7_;
00277        _vala_assert (_tmp8_ == NULL, "manager.get_path (\"_foobar.desktop\") == null");
00278        _g_free0 (_tmp8_);
00279        _g_object_unref0 (manager);
00280 }
00281 
00282 
00283 void unity_test_app_info_manager_suite_test_async_lookup_missing (void) {
00284        GMainLoop* _tmp0_;
00285        GMainLoop* mainloop;
00286        _tmp0_ = g_main_loop_new (NULL, FALSE);
00287        mainloop = _tmp0_;
00288        unity_test_app_info_manager_suite_do_test_async_lookup_missing (mainloop, NULL, NULL);
00289        g_main_loop_run (mainloop);
00290        _g_main_loop_unref0 (mainloop);
00291 }
00292 
00293 
00294 static void unity_test_app_info_manager_suite_do_test_async_lookup_missing_data_free (gpointer _data) {
00295        UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData* _data_;
00296        _data_ = _data;
00297        _g_main_loop_unref0 (_data_->mainloop);
00298        g_slice_free (UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData, _data_);
00299 }
00300 
00301 
00302 static gpointer _g_main_loop_ref0 (gpointer self) {
00303        return self ? g_main_loop_ref (self) : NULL;
00304 }
00305 
00306 
00307 void unity_test_app_info_manager_suite_do_test_async_lookup_missing (GMainLoop* mainloop, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00308        UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData* _data_;
00309        GMainLoop* _tmp0_;
00310        GMainLoop* _tmp1_;
00311        _data_ = g_slice_new0 (UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData);
00312        _data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, unity_test_app_info_manager_suite_do_test_async_lookup_missing);
00313        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_test_app_info_manager_suite_do_test_async_lookup_missing_data_free);
00314        _tmp0_ = mainloop;
00315        _tmp1_ = _g_main_loop_ref0 (_tmp0_);
00316        _data_->mainloop = _tmp1_;
00317        unity_test_app_info_manager_suite_do_test_async_lookup_missing_co (_data_);
00318 }
00319 
00320 
00321 void unity_test_app_info_manager_suite_do_test_async_lookup_missing_finish (GAsyncResult* _res_) {
00322        UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData* _data_;
00323        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00324 }
00325 
00326 
00327 static void unity_test_app_info_manager_suite_do_test_async_lookup_missing_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00328        UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData* _data_;
00329        _data_ = _user_data_;
00330        _data_->_source_object_ = source_object;
00331        _data_->_res_ = _res_;
00332        unity_test_app_info_manager_suite_do_test_async_lookup_missing_co (_data_);
00333 }
00334 
00335 
00336 static gboolean unity_test_app_info_manager_suite_do_test_async_lookup_missing_co (UnityTestAppInfoManagerSuiteDoTestAsyncLookupMissingData* _data_) {
00337        switch (_data_->_state_) {
00338               case 0:
00339               goto _state_0;
00340               case 1:
00341               goto _state_1;
00342               default:
00343               g_assert_not_reached ();
00344        }
00345        _state_0:
00346        _data_->_tmp0_ = NULL;
00347        _data_->_tmp0_ = unity_app_info_manager_get_default ();
00348        _data_->manager = _data_->_tmp0_;
00349        {
00350               _data_->_state_ = 1;
00351               unity_app_info_manager_lookup_async (_data_->manager, "_foobar.desktop", unity_test_app_info_manager_suite_do_test_async_lookup_missing_ready, _data_);
00352               return FALSE;
00353               _state_1:
00354               _data_->_tmp1_ = NULL;
00355               _data_->_tmp1_ = unity_app_info_manager_lookup_finish (_data_->manager, _data_->_res_, &_data_->_inner_error_);
00356               _data_->appinfo = _data_->_tmp1_;
00357               if (_data_->_inner_error_ != NULL) {
00358                      goto __catch0_g_error;
00359               }
00360               _vala_assert (_data_->appinfo == NULL, "appinfo == null");
00361               _data_->_tmp2_ = 0;
00362               _data_->_tmp3_ = NULL;
00363               _data_->_tmp3_ = unity_app_info_manager_get_categories (_data_->manager, "_foobar.desktop", &_data_->_tmp2_);
00364               _vala_assert (_data_->_tmp3_ == NULL, "manager.get_categories (\"_foobar.desktop\") == null");
00365               _data_->_tmp4_ = 0;
00366               _data_->_tmp5_ = NULL;
00367               _data_->_tmp5_ = unity_app_info_manager_get_keywords (_data_->manager, "_foobar.desktop", &_data_->_tmp4_);
00368               _vala_assert (_data_->_tmp5_ == NULL, "manager.get_keywords (\"_foobar.desktop\") == null");
00369               _data_->_tmp6_ = NULL;
00370               _data_->_tmp6_ = unity_app_info_manager_get_path (_data_->manager, "_foobar.desktop");
00371               _data_->_tmp7_ = _data_->_tmp6_;
00372               _vala_assert (_data_->_tmp7_ == NULL, "manager.get_path (\"_foobar.desktop\") == null");
00373               _g_free0 (_data_->_tmp7_);
00374               _g_object_unref0 (_data_->appinfo);
00375        }
00376        goto __finally0;
00377        __catch0_g_error:
00378        {
00379               _data_->e = _data_->_inner_error_;
00380               _data_->_inner_error_ = NULL;
00381               _data_->_tmp8_ = _data_->e->message;
00382               g_error ("test-appinfo-manager.vala:86: Error reading desktop file: %s", _data_->_tmp8_);
00383               _g_error_free0 (_data_->e);
00384        }
00385        __finally0:
00386        if (_data_->_inner_error_ != NULL) {
00387               _g_object_unref0 (_data_->manager);
00388               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
00389               g_clear_error (&_data_->_inner_error_);
00390               return FALSE;
00391        }
00392        _data_->_tmp9_ = _data_->mainloop;
00393        g_main_loop_quit (_data_->_tmp9_);
00394        _g_object_unref0 (_data_->manager);
00395        if (_data_->_state_ == 0) {
00396               g_simple_async_result_complete_in_idle (_data_->_async_result);
00397        } else {
00398               g_simple_async_result_complete (_data_->_async_result);
00399        }
00400        g_object_unref (_data_->_async_result);
00401        return FALSE;
00402 }
00403 
00404 
00405 static gchar** _vala_array_dup1 (gchar** self, int length) {
00406        gchar** result;
00407        int i;
00408        result = g_new0 (gchar*, length + 1);
00409        for (i = 0; i < length; i++) {
00410               gchar* _tmp0_;
00411               _tmp0_ = g_strdup (self[i]);
00412               result[i] = _tmp0_;
00413        }
00414        return result;
00415 }
00416 
00417 
00418 static gchar** _vala_array_dup2 (gchar** self, int length) {
00419        gchar** result;
00420        int i;
00421        result = g_new0 (gchar*, length + 1);
00422        for (i = 0; i < length; i++) {
00423               gchar* _tmp0_;
00424               _tmp0_ = g_strdup (self[i]);
00425               result[i] = _tmp0_;
00426        }
00427        return result;
00428 }
00429 
00430 
00431 void unity_test_app_info_manager_suite_test_sync_lookup_ok (void) {
00432        UnityAppInfoManager* _tmp0_ = NULL;
00433        UnityAppInfoManager* manager;
00434        GAppInfo* _tmp1_ = NULL;
00435        GAppInfo* info;
00436        const gchar* _tmp2_ = NULL;
00437        gint _tmp3_ = 0;
00438        gchar** _tmp4_ = NULL;
00439        gchar** _tmp5_;
00440        gint _tmp5__length1;
00441        gchar** categories;
00442        gint categories_length1;
00443        gint _categories_size_;
00444        const gchar* _tmp6_;
00445        const gchar* _tmp7_;
00446        const gchar* _tmp8_;
00447        gint _tmp9_ = 0;
00448        gchar** _tmp10_ = NULL;
00449        gchar** _tmp11_;
00450        gint _tmp11__length1;
00451        gchar** keywords;
00452        gint keywords_length1;
00453        gint _keywords_size_;
00454        const gchar* _tmp12_;
00455        const gchar* _tmp13_;
00456        const gchar* _tmp14_;
00457        const gchar* _tmp15_;
00458        const gchar* _tmp16_;
00459        const gchar* _tmp17_;
00460        gchar* _tmp18_ = NULL;
00461        gchar* path;
00462        GFile* _tmp19_ = NULL;
00463        GFile* _tmp20_;
00464        GFile* _tmp21_ = NULL;
00465        GFile* _tmp22_;
00466        gchar* _tmp23_ = NULL;
00467        gchar* _tmp24_;
00468        gchar* abs_path;
00469        _tmp0_ = unity_app_info_manager_get_default ();
00470        manager = _tmp0_;
00471        _tmp1_ = unity_app_info_manager_lookup (manager, "ubuntu-about.desktop");
00472        info = _tmp1_;
00473        _vala_assert (info != NULL, "info != null");
00474        _vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (info, g_app_info_get_type ()), "info is AppInfo");
00475        _tmp2_ = g_app_info_get_name (info);
00476        _vala_assert (g_strcmp0 ("About Ubuntu", _tmp2_) == 0, "\"About Ubuntu\" == info.get_name ()");
00477        _tmp4_ = unity_app_info_manager_get_categories (manager, "ubuntu-about.desktop", &_tmp3_);
00478        _tmp5_ = (_tmp4_ != NULL) ? _vala_array_dup1 (_tmp4_, _tmp3_) : ((gpointer) _tmp4_);
00479        _tmp5__length1 = _tmp3_;
00480        categories = _tmp5_;
00481        categories_length1 = _tmp5__length1;
00482        _categories_size_ = categories_length1;
00483        _vala_assert (categories != NULL, "categories != null");
00484        _vala_assert (categories_length1 == 3, "categories.length == 3");
00485        _tmp6_ = categories[0];
00486        _vala_assert (g_strcmp0 (_tmp6_, "GNOME") == 0, "categories[0] == \"GNOME\"");
00487        _tmp7_ = categories[1];
00488        _vala_assert (g_strcmp0 (_tmp7_, "Application") == 0, "categories[1] == \"Application\"");
00489        _tmp8_ = categories[2];
00490        _vala_assert (g_strcmp0 (_tmp8_, "Core") == 0, "categories[2] == \"Core\"");
00491        _tmp10_ = unity_app_info_manager_get_keywords (manager, "ubuntu-about.desktop", &_tmp9_);
00492        _tmp11_ = (_tmp10_ != NULL) ? _vala_array_dup2 (_tmp10_, _tmp9_) : ((gpointer) _tmp10_);
00493        _tmp11__length1 = _tmp9_;
00494        keywords = _tmp11_;
00495        keywords_length1 = _tmp11__length1;
00496        _keywords_size_ = keywords_length1;
00497        _vala_assert (keywords != NULL, "keywords != null");
00498        _vala_assert (keywords_length1 == 6, "keywords.length == 6");
00499        _tmp12_ = keywords[0];
00500        _vala_assert (g_strcmp0 (_tmp12_, "about") == 0, "keywords[0] == \"about\"");
00501        _tmp13_ = keywords[1];
00502        _vala_assert (g_strcmp0 (_tmp13_, "ubuntu") == 0, "keywords[1] == \"ubuntu\"");
00503        _tmp14_ = keywords[2];
00504        _vala_assert (g_strcmp0 (_tmp14_, "help") == 0, "keywords[2] == \"help\"");
00505        _tmp15_ = keywords[3];
00506        _vala_assert (g_strcmp0 (_tmp15_, "testkeyword") == 0, "keywords[3] == \"testkeyword\"");
00507        _tmp16_ = keywords[4];
00508        _vala_assert (g_strcmp0 (_tmp16_, "thisisnotthekeywordsyourelookingfor") == 0, "keywords[4] == \"thisisnotthekeywordsyourelookingfor\"");
00509        _tmp17_ = keywords[5];
00510        _vala_assert (g_strcmp0 (_tmp17_, "neitheristhis") == 0, "keywords[5] == \"neitheristhis\"");
00511        _tmp18_ = unity_app_info_manager_get_path (manager, "ubuntu-about.desktop");
00512        path = _tmp18_;
00513        _tmp19_ = g_file_new_for_path (TESTDIR);
00514        _tmp20_ = _tmp19_;
00515        _tmp21_ = g_file_resolve_relative_path (_tmp20_, "data/applications/ubuntu-about.desktop");
00516        _tmp22_ = _tmp21_;
00517        _tmp23_ = g_file_get_path (_tmp22_);
00518        _tmp24_ = _tmp23_;
00519        _g_object_unref0 (_tmp22_);
00520        _g_object_unref0 (_tmp20_);
00521        abs_path = _tmp24_;
00522        _vala_assert (g_strcmp0 (path, abs_path) == 0, "path == abs_path");
00523        _g_free0 (abs_path);
00524        _g_free0 (path);
00525        keywords = (_vala_array_free (keywords, keywords_length1, (GDestroyNotify) g_free), NULL);
00526        categories = (_vala_array_free (categories, categories_length1, (GDestroyNotify) g_free), NULL);
00527        _g_object_unref0 (info);
00528        _g_object_unref0 (manager);
00529 }
00530 
00531 
00532 void unity_test_app_info_manager_suite_test_async_lookup_ok (void) {
00533        GMainLoop* _tmp0_;
00534        GMainLoop* mainloop;
00535        _tmp0_ = g_main_loop_new (NULL, FALSE);
00536        mainloop = _tmp0_;
00537        unity_test_app_info_manager_suite_do_test_async_lookup_ok (mainloop, NULL, NULL);
00538        g_main_loop_run (mainloop);
00539        _g_main_loop_unref0 (mainloop);
00540 }
00541 
00542 
00543 static void unity_test_app_info_manager_suite_do_test_async_lookup_ok_data_free (gpointer _data) {
00544        UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData* _data_;
00545        _data_ = _data;
00546        _g_main_loop_unref0 (_data_->mainloop);
00547        g_slice_free (UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData, _data_);
00548 }
00549 
00550 
00551 void unity_test_app_info_manager_suite_do_test_async_lookup_ok (GMainLoop* mainloop, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00552        UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData* _data_;
00553        GMainLoop* _tmp0_;
00554        GMainLoop* _tmp1_;
00555        _data_ = g_slice_new0 (UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData);
00556        _data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, unity_test_app_info_manager_suite_do_test_async_lookup_ok);
00557        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_test_app_info_manager_suite_do_test_async_lookup_ok_data_free);
00558        _tmp0_ = mainloop;
00559        _tmp1_ = _g_main_loop_ref0 (_tmp0_);
00560        _data_->mainloop = _tmp1_;
00561        unity_test_app_info_manager_suite_do_test_async_lookup_ok_co (_data_);
00562 }
00563 
00564 
00565 void unity_test_app_info_manager_suite_do_test_async_lookup_ok_finish (GAsyncResult* _res_) {
00566        UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData* _data_;
00567        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
00568 }
00569 
00570 
00571 static void unity_test_app_info_manager_suite_do_test_async_lookup_ok_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
00572        UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData* _data_;
00573        _data_ = _user_data_;
00574        _data_->_source_object_ = source_object;
00575        _data_->_res_ = _res_;
00576        unity_test_app_info_manager_suite_do_test_async_lookup_ok_co (_data_);
00577 }
00578 
00579 
00580 static gchar** _vala_array_dup3 (gchar** self, int length) {
00581        gchar** result;
00582        int i;
00583        result = g_new0 (gchar*, length + 1);
00584        for (i = 0; i < length; i++) {
00585               gchar* _tmp0_;
00586               _tmp0_ = g_strdup (self[i]);
00587               result[i] = _tmp0_;
00588        }
00589        return result;
00590 }
00591 
00592 
00593 static gchar** _vala_array_dup4 (gchar** self, int length) {
00594        gchar** result;
00595        int i;
00596        result = g_new0 (gchar*, length + 1);
00597        for (i = 0; i < length; i++) {
00598               gchar* _tmp0_;
00599               _tmp0_ = g_strdup (self[i]);
00600               result[i] = _tmp0_;
00601        }
00602        return result;
00603 }
00604 
00605 
00606 static gboolean unity_test_app_info_manager_suite_do_test_async_lookup_ok_co (UnityTestAppInfoManagerSuiteDoTestAsyncLookupOkData* _data_) {
00607        switch (_data_->_state_) {
00608               case 0:
00609               goto _state_0;
00610               case 1:
00611               goto _state_1;
00612               default:
00613               g_assert_not_reached ();
00614        }
00615        _state_0:
00616        _data_->_tmp0_ = NULL;
00617        _data_->_tmp0_ = unity_app_info_manager_get_default ();
00618        _data_->manager = _data_->_tmp0_;
00619        {
00620               _data_->_state_ = 1;
00621               unity_app_info_manager_lookup_async (_data_->manager, "ubuntu-about.desktop", unity_test_app_info_manager_suite_do_test_async_lookup_ok_ready, _data_);
00622               return FALSE;
00623               _state_1:
00624               _data_->_tmp1_ = NULL;
00625               _data_->_tmp1_ = unity_app_info_manager_lookup_finish (_data_->manager, _data_->_res_, &_data_->_inner_error_);
00626               _data_->info = _data_->_tmp1_;
00627               if (_data_->_inner_error_ != NULL) {
00628                      goto __catch1_g_error;
00629               }
00630               _vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_data_->info, g_app_info_get_type ()), "info is AppInfo");
00631               _data_->_tmp2_ = NULL;
00632               _data_->_tmp2_ = g_app_info_get_name (_data_->info);
00633               _vala_assert (g_strcmp0 ("About Ubuntu", _data_->_tmp2_) == 0, "\"About Ubuntu\" == info.get_name ()");
00634               _g_object_unref0 (_data_->info);
00635        }
00636        goto __finally1;
00637        __catch1_g_error:
00638        {
00639               _data_->e = _data_->_inner_error_;
00640               _data_->_inner_error_ = NULL;
00641               _data_->_tmp3_ = _data_->e->message;
00642               g_error ("test-appinfo-manager.vala:140: Error reading desktop file: %s", _data_->_tmp3_);
00643               _g_error_free0 (_data_->e);
00644        }
00645        __finally1:
00646        if (_data_->_inner_error_ != NULL) {
00647               _g_object_unref0 (_data_->manager);
00648               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
00649               g_clear_error (&_data_->_inner_error_);
00650               return FALSE;
00651        }
00652        _data_->_tmp4_ = 0;
00653        _data_->_tmp5_ = NULL;
00654        _data_->_tmp5_ = unity_app_info_manager_get_categories (_data_->manager, "ubuntu-about.desktop", &_data_->_tmp4_);
00655        _data_->_tmp6_ = (_data_->_tmp5_ != NULL) ? _vala_array_dup3 (_data_->_tmp5_, _data_->_tmp4_) : ((gpointer) _data_->_tmp5_);
00656        _data_->_tmp6__length1 = _data_->_tmp4_;
00657        _data_->categories = _data_->_tmp6_;
00658        _data_->categories_length1 = _data_->_tmp6__length1;
00659        _data_->_categories_size_ = _data_->categories_length1;
00660        _vala_assert (_data_->categories != NULL, "categories != null");
00661        _vala_assert (_data_->categories_length1 == 3, "categories.length == 3");
00662        _data_->_tmp7_ = _data_->categories[0];
00663        _vala_assert (g_strcmp0 (_data_->_tmp7_, "GNOME") == 0, "categories[0] == \"GNOME\"");
00664        _data_->_tmp8_ = _data_->categories[1];
00665        _vala_assert (g_strcmp0 (_data_->_tmp8_, "Application") == 0, "categories[1] == \"Application\"");
00666        _data_->_tmp9_ = _data_->categories[2];
00667        _vala_assert (g_strcmp0 (_data_->_tmp9_, "Core") == 0, "categories[2] == \"Core\"");
00668        _data_->_tmp10_ = 0;
00669        _data_->_tmp11_ = NULL;
00670        _data_->_tmp11_ = unity_app_info_manager_get_keywords (_data_->manager, "ubuntu-about.desktop", &_data_->_tmp10_);
00671        _data_->_tmp12_ = (_data_->_tmp11_ != NULL) ? _vala_array_dup4 (_data_->_tmp11_, _data_->_tmp10_) : ((gpointer) _data_->_tmp11_);
00672        _data_->_tmp12__length1 = _data_->_tmp10_;
00673        _data_->keywords = _data_->_tmp12_;
00674        _data_->keywords_length1 = _data_->_tmp12__length1;
00675        _data_->_keywords_size_ = _data_->keywords_length1;
00676        _vala_assert (_data_->keywords != NULL, "keywords != null");
00677        _vala_assert (_data_->keywords_length1 == 6, "keywords.length == 6");
00678        _data_->_tmp13_ = _data_->keywords[0];
00679        _vala_assert (g_strcmp0 (_data_->_tmp13_, "about") == 0, "keywords[0] == \"about\"");
00680        _data_->_tmp14_ = _data_->keywords[1];
00681        _vala_assert (g_strcmp0 (_data_->_tmp14_, "ubuntu") == 0, "keywords[1] == \"ubuntu\"");
00682        _data_->_tmp15_ = _data_->keywords[2];
00683        _vala_assert (g_strcmp0 (_data_->_tmp15_, "help") == 0, "keywords[2] == \"help\"");
00684        _data_->_tmp16_ = _data_->keywords[3];
00685        _vala_assert (g_strcmp0 (_data_->_tmp16_, "testkeyword") == 0, "keywords[3] == \"testkeyword\"");
00686        _data_->_tmp17_ = _data_->keywords[4];
00687        _vala_assert (g_strcmp0 (_data_->_tmp17_, "thisisnotthekeywordsyourelookingfor") == 0, "keywords[4] == \"thisisnotthekeywordsyourelookingfor\"");
00688        _data_->_tmp18_ = _data_->keywords[5];
00689        _vala_assert (g_strcmp0 (_data_->_tmp18_, "neitheristhis") == 0, "keywords[5] == \"neitheristhis\"");
00690        _data_->_tmp19_ = NULL;
00691        _data_->_tmp19_ = unity_app_info_manager_get_path (_data_->manager, "ubuntu-about.desktop");
00692        _data_->path = _data_->_tmp19_;
00693        _data_->_tmp20_ = NULL;
00694        _data_->_tmp20_ = g_file_new_for_path (TESTDIR);
00695        _data_->_tmp21_ = _data_->_tmp20_;
00696        _data_->_tmp22_ = NULL;
00697        _data_->_tmp22_ = g_file_resolve_relative_path (_data_->_tmp21_, "data/applications/ubuntu-about.desktop");
00698        _data_->_tmp23_ = _data_->_tmp22_;
00699        _data_->_tmp24_ = NULL;
00700        _data_->_tmp24_ = g_file_get_path (_data_->_tmp23_);
00701        _data_->_tmp25_ = _data_->_tmp24_;
00702        _g_object_unref0 (_data_->_tmp23_);
00703        _g_object_unref0 (_data_->_tmp21_);
00704        _data_->abs_path = _data_->_tmp25_;
00705        _vala_assert (g_strcmp0 (_data_->path, _data_->abs_path) == 0, "path == abs_path");
00706        _data_->_tmp26_ = _data_->mainloop;
00707        g_main_loop_quit (_data_->_tmp26_);
00708        _g_free0 (_data_->abs_path);
00709        _g_free0 (_data_->path);
00710        _data_->keywords = (_vala_array_free (_data_->keywords, _data_->keywords_length1, (GDestroyNotify) g_free), NULL);
00711        _data_->categories = (_vala_array_free (_data_->categories, _data_->categories_length1, (GDestroyNotify) g_free), NULL);
00712        _g_object_unref0 (_data_->manager);
00713        if (_data_->_state_ == 0) {
00714               g_simple_async_result_complete_in_idle (_data_->_async_result);
00715        } else {
00716               g_simple_async_result_complete (_data_->_async_result);
00717        }
00718        g_object_unref (_data_->_async_result);
00719        return FALSE;
00720 }
00721 
00722 
00723 static void unity_test_value_app_info_manager_suite_init (GValue* value) {
00724        value->data[0].v_pointer = NULL;
00725 }
00726 
00727 
00728 static void unity_test_value_app_info_manager_suite_free_value (GValue* value) {
00729        if (value->data[0].v_pointer) {
00730               unity_test_app_info_manager_suite_unref (value->data[0].v_pointer);
00731        }
00732 }
00733 
00734 
00735 static void unity_test_value_app_info_manager_suite_copy_value (const GValue* src_value, GValue* dest_value) {
00736        if (src_value->data[0].v_pointer) {
00737               dest_value->data[0].v_pointer = unity_test_app_info_manager_suite_ref (src_value->data[0].v_pointer);
00738        } else {
00739               dest_value->data[0].v_pointer = NULL;
00740        }
00741 }
00742 
00743 
00744 static gpointer unity_test_value_app_info_manager_suite_peek_pointer (const GValue* value) {
00745        return value->data[0].v_pointer;
00746 }
00747 
00748 
00749 static gchar* unity_test_value_app_info_manager_suite_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
00750        if (collect_values[0].v_pointer) {
00751               UnityTestAppInfoManagerSuite* object;
00752               object = collect_values[0].v_pointer;
00753               if (object->parent_instance.g_class == NULL) {
00754                      return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
00755               } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
00756                      return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
00757               }
00758               value->data[0].v_pointer = unity_test_app_info_manager_suite_ref (object);
00759        } else {
00760               value->data[0].v_pointer = NULL;
00761        }
00762        return NULL;
00763 }
00764 
00765 
00766 static gchar* unity_test_value_app_info_manager_suite_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
00767        UnityTestAppInfoManagerSuite** object_p;
00768        object_p = collect_values[0].v_pointer;
00769        if (!object_p) {
00770               return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
00771        }
00772        if (!value->data[0].v_pointer) {
00773               *object_p = NULL;
00774        } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
00775               *object_p = value->data[0].v_pointer;
00776        } else {
00777               *object_p = unity_test_app_info_manager_suite_ref (value->data[0].v_pointer);
00778        }
00779        return NULL;
00780 }
00781 
00782 
00783 GParamSpec* unity_test_param_spec_app_info_manager_suite (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
00784        UnityTestParamSpecAppInfoManagerSuite* spec;
00785        g_return_val_if_fail (g_type_is_a (object_type, UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE), NULL);
00786        spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
00787        G_PARAM_SPEC (spec)->value_type = object_type;
00788        return G_PARAM_SPEC (spec);
00789 }
00790 
00791 
00792 gpointer unity_test_value_get_app_info_manager_suite (const GValue* value) {
00793        g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE), NULL);
00794        return value->data[0].v_pointer;
00795 }
00796 
00797 
00798 void unity_test_value_set_app_info_manager_suite (GValue* value, gpointer v_object) {
00799        UnityTestAppInfoManagerSuite* old;
00800        g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE));
00801        old = value->data[0].v_pointer;
00802        if (v_object) {
00803               g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE));
00804               g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
00805               value->data[0].v_pointer = v_object;
00806               unity_test_app_info_manager_suite_ref (value->data[0].v_pointer);
00807        } else {
00808               value->data[0].v_pointer = NULL;
00809        }
00810        if (old) {
00811               unity_test_app_info_manager_suite_unref (old);
00812        }
00813 }
00814 
00815 
00816 void unity_test_value_take_app_info_manager_suite (GValue* value, gpointer v_object) {
00817        UnityTestAppInfoManagerSuite* old;
00818        g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE));
00819        old = value->data[0].v_pointer;
00820        if (v_object) {
00821               g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE));
00822               g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
00823               value->data[0].v_pointer = v_object;
00824        } else {
00825               value->data[0].v_pointer = NULL;
00826        }
00827        if (old) {
00828               unity_test_app_info_manager_suite_unref (old);
00829        }
00830 }
00831 
00832 
00833 static void unity_test_app_info_manager_suite_class_init (UnityTestAppInfoManagerSuiteClass * klass) {
00834        unity_test_app_info_manager_suite_parent_class = g_type_class_peek_parent (klass);
00835        UNITY_TEST_APP_INFO_MANAGER_SUITE_CLASS (klass)->finalize = unity_test_app_info_manager_suite_finalize;
00836 }
00837 
00838 
00839 static void unity_test_app_info_manager_suite_instance_init (UnityTestAppInfoManagerSuite * self) {
00840        self->ref_count = 1;
00841 }
00842 
00843 
00844 static void unity_test_app_info_manager_suite_finalize (UnityTestAppInfoManagerSuite* obj) {
00845        UnityTestAppInfoManagerSuite * self;
00846        self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TEST_TYPE_APP_INFO_MANAGER_SUITE, UnityTestAppInfoManagerSuite);
00847 }
00848 
00849 
00850 GType unity_test_app_info_manager_suite_get_type (void) {
00851        static volatile gsize unity_test_app_info_manager_suite_type_id__volatile = 0;
00852        if (g_once_init_enter (&unity_test_app_info_manager_suite_type_id__volatile)) {
00853               static const GTypeValueTable g_define_type_value_table = { unity_test_value_app_info_manager_suite_init, unity_test_value_app_info_manager_suite_free_value, unity_test_value_app_info_manager_suite_copy_value, unity_test_value_app_info_manager_suite_peek_pointer, "p", unity_test_value_app_info_manager_suite_collect_value, "p", unity_test_value_app_info_manager_suite_lcopy_value };
00854               static const GTypeInfo g_define_type_info = { sizeof (UnityTestAppInfoManagerSuiteClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_test_app_info_manager_suite_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityTestAppInfoManagerSuite), 0, (GInstanceInitFunc) unity_test_app_info_manager_suite_instance_init, &g_define_type_value_table };
00855               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) };
00856               GType unity_test_app_info_manager_suite_type_id;
00857               unity_test_app_info_manager_suite_type_id = g_type_register_fundamental (g_type_fundamental_next (), "UnityTestAppInfoManagerSuite", &g_define_type_info, &g_define_type_fundamental_info, 0);
00858               g_once_init_leave (&unity_test_app_info_manager_suite_type_id__volatile, unity_test_app_info_manager_suite_type_id);
00859        }
00860        return unity_test_app_info_manager_suite_type_id__volatile;
00861 }
00862 
00863 
00864 gpointer unity_test_app_info_manager_suite_ref (gpointer instance) {
00865        UnityTestAppInfoManagerSuite* self;
00866        self = instance;
00867        g_atomic_int_inc (&self->ref_count);
00868        return instance;
00869 }
00870 
00871 
00872 void unity_test_app_info_manager_suite_unref (gpointer instance) {
00873        UnityTestAppInfoManagerSuite* self;
00874        self = instance;
00875        if (g_atomic_int_dec_and_test (&self->ref_count)) {
00876               UNITY_TEST_APP_INFO_MANAGER_SUITE_GET_CLASS (self)->finalize (self);
00877               g_type_free_instance ((GTypeInstance *) self);
00878        }
00879 }
00880 
00881 
00882 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
00883        if ((array != NULL) && (destroy_func != NULL)) {
00884               int i;
00885               for (i = 0; i < array_length; i = i + 1) {
00886                      if (((gpointer*) array)[i] != NULL) {
00887                             destroy_func (((gpointer*) array)[i]);
00888                      }
00889               }
00890        }
00891 }
00892 
00893 
00894 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
00895        _vala_array_destroy (array, array_length, destroy_func);
00896        g_free (array);
00897 }
00898 
00899 
00900