Back to index

libunity  5.92.0
unity-tool.c
Go to the documentation of this file.
00001 /* unity-tool.c generated by valac 0.17.2, the Vala compiler
00002  * generated from unity-tool.vala, do not modify */
00003 
00004 /*
00005  * Copyright (C) 2012 Canonical Ltd
00006  *
00007  * This program is free software: you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License version 3 as
00009  * published by the Free Software Foundation.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  * Authored by Michal Hruby <michal.hruby@canonical.com>
00020  *
00021  */
00022 
00023 #include <glib.h>
00024 #include <glib-object.h>
00025 #include <stdlib.h>
00026 #include <string.h>
00027 #include <stdarg.h>
00028 #include <gtk/gtk.h>
00029 #include <dee.h>
00030 #include <glib/gstdio.h>
00031 #include <gio/gio.h>
00032 
00033 
00034 #define UNITY_TESTER_TYPE_LENS_INFO (unity_tester_lens_info_get_type ())
00035 typedef struct _UnityTesterLensInfo UnityTesterLensInfo;
00036 #define _g_free0(var) (var = (g_free (var), NULL))
00037 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
00038 
00039 #define UNITY_TESTER_TYPE_UNITY_TOOL_UI (unity_tester_unity_tool_ui_get_type ())
00040 #define UNITY_TESTER_UNITY_TOOL_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TESTER_TYPE_UNITY_TOOL_UI, UnityTesterUnityToolUi))
00041 #define UNITY_TESTER_UNITY_TOOL_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TESTER_TYPE_UNITY_TOOL_UI, UnityTesterUnityToolUiClass))
00042 #define UNITY_TESTER_IS_UNITY_TOOL_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TESTER_TYPE_UNITY_TOOL_UI))
00043 #define UNITY_TESTER_IS_UNITY_TOOL_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TESTER_TYPE_UNITY_TOOL_UI))
00044 #define UNITY_TESTER_UNITY_TOOL_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TESTER_TYPE_UNITY_TOOL_UI, UnityTesterUnityToolUiClass))
00045 
00046 typedef struct _UnityTesterUnityToolUi UnityTesterUnityToolUi;
00047 typedef struct _UnityTesterUnityToolUiClass UnityTesterUnityToolUiClass;
00048 #define _g_key_file_free0(var) ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL)))
00049 #define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
00050 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00051 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00052 typedef struct _Block1Data Block1Data;
00053 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
00054 #define _g_dir_close0(var) ((var == NULL) ? NULL : (var = (g_dir_close (var), NULL)))
00055 typedef struct _Block2Data Block2Data;
00056 typedef struct _Block3Data Block3Data;
00057 typedef struct _Block4Data Block4Data;
00058 typedef struct _Block5Data Block5Data;
00059 typedef struct _Block6Data Block6Data;
00060 typedef struct _Block7Data Block7Data;
00061 typedef struct _Block8Data Block8Data;
00062 typedef struct _Block9Data Block9Data;
00063 #define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
00064 typedef struct _Block10Data Block10Data;
00065 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
00066 #define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))
00067 typedef struct _Block11Data Block11Data;
00068 typedef struct _Block12Data Block12Data;
00069 #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
00070 
00071 typedef enum  {
00072        UNITY_TESTER_TESTER_ERROR_INVALID_ARGS
00073 } UnityTesterTesterError;
00074 #define UNITY_TESTER_TESTER_ERROR unity_tester_tester_error_quark ()
00075 struct _UnityTesterLensInfo {
00076        gchar* dbus_path;
00077        gboolean search_in_global;
00078        gboolean visible;
00079        gchar* search_hint;
00080        gchar* private_connection_name;
00081        gchar* results_model_name;
00082        gchar* global_results_model_name;
00083        gchar* categories_model_name;
00084        gchar* filters_model_name;
00085        GHashTable* hints;
00086 };
00087 
00088 struct _Block1Data {
00089        int _ref_count_;
00090        GMainLoop* ml;
00091 };
00092 
00093 struct _Block2Data {
00094        int _ref_count_;
00095        gboolean timeout_reached;
00096        GMainLoop* ml;
00097 };
00098 
00099 struct _Block3Data {
00100        int _ref_count_;
00101        GMainLoop* ml;
00102 };
00103 
00104 struct _Block4Data {
00105        int _ref_count_;
00106        GMainLoop* ml;
00107 };
00108 
00109 struct _Block5Data {
00110        int _ref_count_;
00111        GMainLoop* ml;
00112 };
00113 
00114 struct _Block6Data {
00115        int _ref_count_;
00116        GMainLoop* ml;
00117 };
00118 
00119 struct _Block7Data {
00120        int _ref_count_;
00121        GMainLoop* ml;
00122 };
00123 
00124 struct _Block8Data {
00125        int _ref_count_;
00126        GMainLoop* ml;
00127 };
00128 
00129 struct _Block9Data {
00130        int _ref_count_;
00131        GFunc cb;
00132        gpointer cb_target;
00133        GFunc error_cb;
00134        gpointer error_cb_target;
00135 };
00136 
00137 struct _Block10Data {
00138        int _ref_count_;
00139        Block9Data * _data9_;
00140        GDBusConnection* bus;
00141 };
00142 
00143 struct _Block11Data {
00144        int _ref_count_;
00145        GMainLoop* ml;
00146        UnityTesterLensInfo info;
00147 };
00148 
00149 struct _Block12Data {
00150        int _ref_count_;
00151        GMainLoop* ml;
00152 };
00153 
00154 
00155 extern gboolean unity_tester_options_gui;
00156 gboolean unity_tester_options_gui = FALSE;
00157 extern gchar* unity_tester_options_lens_dbus_name;
00158 gchar* unity_tester_options_lens_dbus_name = NULL;
00159 extern gchar* unity_tester_options_lens_dbus_path;
00160 gchar* unity_tester_options_lens_dbus_path = NULL;
00161 extern gchar* unity_tester_options_lens_file;
00162 gchar* unity_tester_options_lens_file = NULL;
00163 extern gchar* unity_tester_options_search_string;
00164 gchar* unity_tester_options_search_string = NULL;
00165 extern gint unity_tester_options_search_type;
00166 gint unity_tester_options_search_type = 0;
00167 extern gboolean unity_tester_options_common_tests;
00168 gboolean unity_tester_options_common_tests = FALSE;
00169 extern gboolean unity_tester_options_no_search_reply;
00170 gboolean unity_tester_options_no_search_reply = FALSE;
00171 extern gboolean unity_tester_options_dump_results;
00172 gboolean unity_tester_options_dump_results = FALSE;
00173 extern gboolean unity_tester_options_dump_filters;
00174 gboolean unity_tester_options_dump_filters = FALSE;
00175 extern gboolean unity_tester_options_test_server_mode;
00176 gboolean unity_tester_options_test_server_mode = FALSE;
00177 extern gchar** unity_tester_options_test_cases;
00178 extern gint unity_tester_options_test_cases_length1;
00179 gchar** unity_tester_options_test_cases = NULL;
00180 gint unity_tester_options_test_cases_length1 = 0;
00181 extern gchar** unity_tester_test_runner_test_cases;
00182 extern gint unity_tester_test_runner_test_cases_length1;
00183 gchar** unity_tester_test_runner_test_cases = NULL;
00184 gint unity_tester_test_runner_test_cases_length1 = 0;
00185 extern gint unity_tester_test_runner_test_index;
00186 gint unity_tester_test_runner_test_index = 0;
00187 extern UnityTesterUnityToolUi* unity_tester_ui;
00188 UnityTesterUnityToolUi* unity_tester_ui = NULL;
00189 
00190 GQuark unity_tester_tester_error_quark (void);
00191 GType unity_tester_lens_info_get_type (void) G_GNUC_CONST;
00192 UnityTesterLensInfo* unity_tester_lens_info_dup (const UnityTesterLensInfo* self);
00193 void unity_tester_lens_info_free (UnityTesterLensInfo* self);
00194 void unity_tester_lens_info_copy (const UnityTesterLensInfo* self, UnityTesterLensInfo* dest);
00195 void unity_tester_lens_info_destroy (UnityTesterLensInfo* self);
00196 GType unity_tester_unity_tool_ui_get_type (void) G_GNUC_CONST;
00197 void unity_tester_get_lens_params_from_file (const gchar* filename, GError** error);
00198 void unity_tester_warn (const gchar* format, ...);
00199 gint unity_tester_main (gchar** args, int args_length1);
00200 gchar** unity_tester_get_test_cases (int* result_length1);
00201 static gchar** _vala_array_dup1 (gchar** self, int length);
00202 static void ______lambda10_ (void);
00203 static void _______lambda10__gtest_data_func (gpointer self);
00204 UnityTesterUnityToolUi* unity_tester_unity_tool_ui_new (void);
00205 UnityTesterUnityToolUi* unity_tester_unity_tool_ui_construct (GType object_type);
00206 gboolean unity_tester_unity_tool_ui_init_gui (UnityTesterUnityToolUi* self);
00207 gint unity_tester_run_common_tests (void);
00208 static Block1Data* block1_data_ref (Block1Data* _data1_);
00209 static void block1_data_unref (void * _userdata_);
00210 void unity_tester_call_lens_search (const gchar* search_string, gint search_type, GFunc cb, void* cb_target, GFunc error_cb, void* error_cb_target);
00211 static void _____lambda23_ (Block1Data* _data1_, GVariant* _result_);
00212 static void ______lambda23__gfunc (gconstpointer data, gpointer self);
00213 gboolean unity_tester_run_with_timeout (GMainLoop* ml, guint timeout_ms);
00214 void unity_tester_get_lens_info (GFunc error_cb, void* error_cb_target, UnityTesterLensInfo* result);
00215 void unity_tester_sync_model (DeeSharedModel* model);
00216 void unity_tester_dump_results_model (DeeModel* model);
00217 void unity_tester_dump_filters_model (DeeModel* model);
00218 static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value);
00219 static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
00220 static Block2Data* block2_data_ref (Block2Data* _data2_);
00221 static void block2_data_unref (void * _userdata_);
00222 static gboolean __lambda5_ (Block2Data* _data2_);
00223 static gboolean ___lambda5__gsource_func (gpointer self);
00224 static void __lambda11_ (void);
00225 static Block3Data* block3_data_ref (Block3Data* _data3_);
00226 static void block3_data_unref (void * _userdata_);
00227 static void __lambda12_ (Block3Data* _data3_);
00228 static void ___lambda12__gfunc (gconstpointer data, gpointer self);
00229 static void ___lambda11__gtest_data_func (gpointer self);
00230 static void __lambda13_ (void);
00231 static Block4Data* block4_data_ref (Block4Data* _data4_);
00232 static void block4_data_unref (void * _userdata_);
00233 static void __lambda14_ (Block4Data* _data4_);
00234 static void ___lambda14__gfunc (gconstpointer data, gpointer self);
00235 static void ___lambda13__gtest_data_func (gpointer self);
00236 static void __lambda15_ (void);
00237 static Block5Data* block5_data_ref (Block5Data* _data5_);
00238 static void block5_data_unref (void * _userdata_);
00239 static void __lambda16_ (Block5Data* _data5_);
00240 static void ___lambda16__gfunc (gconstpointer data, gpointer self);
00241 static void ___lambda15__gtest_data_func (gpointer self);
00242 static void __lambda17_ (void);
00243 static Block6Data* block6_data_ref (Block6Data* _data6_);
00244 static void block6_data_unref (void * _userdata_);
00245 static void __lambda18_ (Block6Data* _data6_);
00246 static void ___lambda18__gfunc (gconstpointer data, gpointer self);
00247 static void ___lambda17__gtest_data_func (gpointer self);
00248 static void __lambda19_ (void);
00249 static Block7Data* block7_data_ref (Block7Data* _data7_);
00250 static void block7_data_unref (void * _userdata_);
00251 static void __lambda20_ (Block7Data* _data7_);
00252 static void ___lambda20__gfunc (gconstpointer data, gpointer self);
00253 static void ___lambda19__gtest_data_func (gpointer self);
00254 static void __lambda21_ (void);
00255 static Block8Data* block8_data_ref (Block8Data* _data8_);
00256 static void block8_data_unref (void * _userdata_);
00257 static void __lambda22_ (Block8Data* _data8_);
00258 static void ___lambda22__gfunc (gconstpointer data, gpointer self);
00259 static void ___lambda21__gtest_data_func (gpointer self);
00260 static Block9Data* block9_data_ref (Block9Data* _data9_);
00261 static void block9_data_unref (void * _userdata_);
00262 static Block10Data* block10_data_ref (Block10Data* _data10_);
00263 static void block10_data_unref (void * _userdata_);
00264 static void ___lambda7_ (Block10Data* _data10_, GObject* obj, GAsyncResult* res);
00265 static void ____lambda7__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
00266 static Block11Data* block11_data_ref (Block11Data* _data11_);
00267 static void block11_data_unref (void * _userdata_);
00268 static void ___lambda4_ (Block11Data* _data11_, GDBusConnection* conn, const gchar* sender, const gchar* obj_path, const gchar* ifc_name, const gchar* sig_name, GVariant* parameters);
00269 static void _variant_get1 (GVariant* value, UnityTesterLensInfo* result);
00270 static void ____lambda4__gd_bus_signal_callback (GDBusConnection* connection, const gchar* sender_name, const gchar* object_path, const gchar* interface_name, const gchar* signal_name, GVariant* parameters, gpointer self);
00271 static Block12Data* block12_data_ref (Block12Data* _data12_);
00272 static void block12_data_unref (void * _userdata_);
00273 static void ___lambda24_ (Block12Data* _data12_);
00274 static void ____lambda24__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
00275 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
00276 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
00277 static gint _vala_array_length (gpointer array);
00278 
00279 const GOptionEntry UNITY_TESTER_options[13] = {{"gui", 'g', 0, G_OPTION_ARG_NONE, &unity_tester_options_gui, "Run GUI", NULL}, {"dbus-name", 'n', 0, G_OPTION_ARG_STRING, &unity_tester_options_lens_dbus_name, "Unique dbus name of the tested lens", NULL}, {"dbus-path", 'p', 0, G_OPTION_ARG_STRING, &unity_tester_options_lens_dbus_path, "Object path of the lens", NULL}, {"lens-file", 'l', 0, G_OPTION_ARG_STRING, &unity_tester_options_lens_file, "Path to the lens file (to read out dbus name and path)", NULL}, {"common-tests", 'c', 0, G_OPTION_ARG_NONE, &unity_tester_options_common_tests, "Perform common tests each lens should conform to", NULL}, {"search", 's', 0, G_OPTION_ARG_STRING, &unity_tester_options_search_string, "Search string to send to the lens", NULL}, {"search-type", 't', 0, G_OPTION_ARG_INT, &unity_tester_options_search_type, "Type of the search (value from Unity.SearchType enum)", NULL}, {"dump-results", 'r', 0, G_OPTION_ARG_NONE, &unity_tester_options_dump_results, "Output the results model on stdout", NULL}, {"dump-filters", 'f', 0, G_OPTION_ARG_NONE, &unity_tester_options_dump_filters, "Output the filter model on stdout", NULL}, {"no-search-reply", (gchar) 0, 0, G_OPTION_ARG_NONE, &unity_tester_options_no_search_reply, "Don't output reply of the search call", NULL}, {"test-server-mode", (gchar) 0, 0, G_OPTION_ARG_NONE, &unity_tester_options_test_server_mode, "Run a collection of test scripts", NULL}, {"", (gchar) 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &unity_tester_options_test_cases, "Invididual test cases", "<test-scripts>"}, {NULL}};
00280 
00281 GQuark unity_tester_tester_error_quark (void) {
00282        return g_quark_from_static_string ("unity_tester_tester_error-quark");
00283 }
00284 
00285 
00286 static gpointer _g_hash_table_ref0 (gpointer self) {
00287        return self ? g_hash_table_ref (self) : NULL;
00288 }
00289 
00290 
00291 void unity_tester_lens_info_copy (const UnityTesterLensInfo* self, UnityTesterLensInfo* dest) {
00292        const gchar* _tmp0_;
00293        gchar* _tmp1_;
00294        gboolean _tmp2_;
00295        gboolean _tmp3_;
00296        const gchar* _tmp4_;
00297        gchar* _tmp5_;
00298        const gchar* _tmp6_;
00299        gchar* _tmp7_;
00300        const gchar* _tmp8_;
00301        gchar* _tmp9_;
00302        const gchar* _tmp10_;
00303        gchar* _tmp11_;
00304        const gchar* _tmp12_;
00305        gchar* _tmp13_;
00306        const gchar* _tmp14_;
00307        gchar* _tmp15_;
00308        GHashTable* _tmp16_;
00309        GHashTable* _tmp17_;
00310        _tmp0_ = (*self).dbus_path;
00311        _tmp1_ = g_strdup (_tmp0_);
00312        _g_free0 ((*dest).dbus_path);
00313        (*dest).dbus_path = _tmp1_;
00314        _tmp2_ = (*self).search_in_global;
00315        (*dest).search_in_global = _tmp2_;
00316        _tmp3_ = (*self).visible;
00317        (*dest).visible = _tmp3_;
00318        _tmp4_ = (*self).search_hint;
00319        _tmp5_ = g_strdup (_tmp4_);
00320        _g_free0 ((*dest).search_hint);
00321        (*dest).search_hint = _tmp5_;
00322        _tmp6_ = (*self).private_connection_name;
00323        _tmp7_ = g_strdup (_tmp6_);
00324        _g_free0 ((*dest).private_connection_name);
00325        (*dest).private_connection_name = _tmp7_;
00326        _tmp8_ = (*self).results_model_name;
00327        _tmp9_ = g_strdup (_tmp8_);
00328        _g_free0 ((*dest).results_model_name);
00329        (*dest).results_model_name = _tmp9_;
00330        _tmp10_ = (*self).global_results_model_name;
00331        _tmp11_ = g_strdup (_tmp10_);
00332        _g_free0 ((*dest).global_results_model_name);
00333        (*dest).global_results_model_name = _tmp11_;
00334        _tmp12_ = (*self).categories_model_name;
00335        _tmp13_ = g_strdup (_tmp12_);
00336        _g_free0 ((*dest).categories_model_name);
00337        (*dest).categories_model_name = _tmp13_;
00338        _tmp14_ = (*self).filters_model_name;
00339        _tmp15_ = g_strdup (_tmp14_);
00340        _g_free0 ((*dest).filters_model_name);
00341        (*dest).filters_model_name = _tmp15_;
00342        _tmp16_ = (*self).hints;
00343        _tmp17_ = _g_hash_table_ref0 (_tmp16_);
00344        _g_hash_table_unref0 ((*dest).hints);
00345        (*dest).hints = _tmp17_;
00346 }
00347 
00348 
00349 void unity_tester_lens_info_destroy (UnityTesterLensInfo* self) {
00350        _g_free0 ((*self).dbus_path);
00351        _g_free0 ((*self).search_hint);
00352        _g_free0 ((*self).private_connection_name);
00353        _g_free0 ((*self).results_model_name);
00354        _g_free0 ((*self).global_results_model_name);
00355        _g_free0 ((*self).categories_model_name);
00356        _g_free0 ((*self).filters_model_name);
00357        _g_hash_table_unref0 ((*self).hints);
00358 }
00359 
00360 
00361 UnityTesterLensInfo* unity_tester_lens_info_dup (const UnityTesterLensInfo* self) {
00362        UnityTesterLensInfo* dup;
00363        dup = g_new0 (UnityTesterLensInfo, 1);
00364        unity_tester_lens_info_copy (self, dup);
00365        return dup;
00366 }
00367 
00368 
00369 void unity_tester_lens_info_free (UnityTesterLensInfo* self) {
00370        unity_tester_lens_info_destroy (self);
00371        g_free (self);
00372 }
00373 
00374 
00375 GType unity_tester_lens_info_get_type (void) {
00376        static volatile gsize unity_tester_lens_info_type_id__volatile = 0;
00377        if (g_once_init_enter (&unity_tester_lens_info_type_id__volatile)) {
00378               GType unity_tester_lens_info_type_id;
00379               unity_tester_lens_info_type_id = g_boxed_type_register_static ("UnityTesterLensInfo", (GBoxedCopyFunc) unity_tester_lens_info_dup, (GBoxedFreeFunc) unity_tester_lens_info_free);
00380               g_once_init_leave (&unity_tester_lens_info_type_id__volatile, unity_tester_lens_info_type_id);
00381        }
00382        return unity_tester_lens_info_type_id__volatile;
00383 }
00384 
00385 
00386 void unity_tester_get_lens_params_from_file (const gchar* filename, GError** error) {
00387        GKeyFile* _tmp0_;
00388        GKeyFile* keyfile;
00389        GKeyFile* _tmp1_;
00390        const gchar* _tmp2_;
00391        GKeyFile* _tmp3_;
00392        gchar* _tmp4_ = NULL;
00393        gchar* _tmp5_;
00394        GKeyFile* _tmp6_;
00395        gchar* _tmp7_ = NULL;
00396        gchar* _tmp8_;
00397        GError * _inner_error_ = NULL;
00398        g_return_if_fail (filename != NULL);
00399        _tmp0_ = g_key_file_new ();
00400        keyfile = _tmp0_;
00401        _tmp1_ = keyfile;
00402        _tmp2_ = filename;
00403        g_key_file_load_from_file (_tmp1_, _tmp2_, 0, &_inner_error_);
00404        if (_inner_error_ != NULL) {
00405               if ((_inner_error_->domain == G_KEY_FILE_ERROR) || (_inner_error_->domain == G_FILE_ERROR)) {
00406                      g_propagate_error (error, _inner_error_);
00407                      _g_key_file_free0 (keyfile);
00408                      return;
00409               } else {
00410                      _g_key_file_free0 (keyfile);
00411                      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);
00412                      g_clear_error (&_inner_error_);
00413                      return;
00414               }
00415        }
00416        _tmp3_ = keyfile;
00417        _tmp4_ = g_key_file_get_string (_tmp3_, "Lens", "DBusName", &_inner_error_);
00418        _tmp5_ = _tmp4_;
00419        if (_inner_error_ != NULL) {
00420               if ((_inner_error_->domain == G_KEY_FILE_ERROR) || (_inner_error_->domain == G_FILE_ERROR)) {
00421                      g_propagate_error (error, _inner_error_);
00422                      _g_key_file_free0 (keyfile);
00423                      return;
00424               } else {
00425                      _g_key_file_free0 (keyfile);
00426                      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);
00427                      g_clear_error (&_inner_error_);
00428                      return;
00429               }
00430        }
00431        _g_free0 (unity_tester_options_lens_dbus_name);
00432        unity_tester_options_lens_dbus_name = _tmp5_;
00433        _tmp6_ = keyfile;
00434        _tmp7_ = g_key_file_get_string (_tmp6_, "Lens", "DBusPath", &_inner_error_);
00435        _tmp8_ = _tmp7_;
00436        if (_inner_error_ != NULL) {
00437               if ((_inner_error_->domain == G_KEY_FILE_ERROR) || (_inner_error_->domain == G_FILE_ERROR)) {
00438                      g_propagate_error (error, _inner_error_);
00439                      _g_key_file_free0 (keyfile);
00440                      return;
00441               } else {
00442                      _g_key_file_free0 (keyfile);
00443                      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);
00444                      g_clear_error (&_inner_error_);
00445                      return;
00446               }
00447        }
00448        _g_free0 (unity_tester_options_lens_dbus_path);
00449        unity_tester_options_lens_dbus_path = _tmp8_;
00450        _g_key_file_free0 (keyfile);
00451 }
00452 
00453 
00454 void unity_tester_warn (const gchar* format, ...) {
00455        va_list args = {0};
00456        const gchar* _tmp0_;
00457        g_return_if_fail (format != NULL);
00458        va_start (args, format);
00459        _tmp0_ = format;
00460        g_logv ("libunity-tool", G_LOG_LEVEL_WARNING, _tmp0_, args);
00461        va_end (args);
00462 }
00463 
00464 
00465 static gchar** _vala_array_dup1 (gchar** self, int length) {
00466        gchar** result;
00467        int i;
00468        result = g_new0 (gchar*, length + 1);
00469        for (i = 0; i < length; i++) {
00470               gchar* _tmp0_;
00471               _tmp0_ = g_strdup (self[i]);
00472               result[i] = _tmp0_;
00473        }
00474        return result;
00475 }
00476 
00477 
00478 static void ______lambda10_ (void) {
00479        gchar** _tmp0_;
00480        gint _tmp0__length1;
00481        gint _tmp1_;
00482        const gchar* _tmp2_;
00483        gchar* _tmp3_;
00484        gchar* test;
00485        gint status = 0;
00486        gint _tmp7_;
00487        GError * _inner_error_ = NULL;
00488        _tmp0_ = unity_tester_test_runner_test_cases;
00489        _tmp0__length1 = unity_tester_test_runner_test_cases_length1;
00490        _tmp1_ = unity_tester_test_runner_test_index;
00491        unity_tester_test_runner_test_index = _tmp1_ + 1;
00492        _tmp2_ = _tmp0_[_tmp1_];
00493        _tmp3_ = g_strdup (_tmp2_);
00494        test = _tmp3_;
00495        {
00496               gint _tmp4_ = 0;
00497               g_spawn_command_line_sync (test, NULL, NULL, &_tmp4_, &_inner_error_);
00498               status = _tmp4_;
00499               if (_inner_error_ != NULL) {
00500                      goto __catch1_g_error;
00501               }
00502        }
00503        goto __finally1;
00504        __catch1_g_error:
00505        {
00506               GError* e = NULL;
00507               GError* _tmp5_;
00508               const gchar* _tmp6_;
00509               e = _inner_error_;
00510               _inner_error_ = NULL;
00511               _tmp5_ = e;
00512               _tmp6_ = _tmp5_->message;
00513               unity_tester_warn ("%s", _tmp6_, NULL);
00514               status = -1;
00515               _g_error_free0 (e);
00516        }
00517        __finally1:
00518        if (_inner_error_ != NULL) {
00519               _g_free0 (test);
00520               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);
00521               g_clear_error (&_inner_error_);
00522               return;
00523        }
00524        _tmp7_ = status;
00525        _vala_assert (_tmp7_ == 0, "status == 0");
00526        _g_free0 (test);
00527 }
00528 
00529 
00530 static void _______lambda10__gtest_data_func (gpointer self) {
00531        ______lambda10_ ();
00532 }
00533 
00534 
00535 static Block1Data* block1_data_ref (Block1Data* _data1_) {
00536        g_atomic_int_inc (&_data1_->_ref_count_);
00537        return _data1_;
00538 }
00539 
00540 
00541 static void block1_data_unref (void * _userdata_) {
00542        Block1Data* _data1_;
00543        _data1_ = (Block1Data*) _userdata_;
00544        if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
00545               _g_main_loop_unref0 (_data1_->ml);
00546               g_slice_free (Block1Data, _data1_);
00547        }
00548 }
00549 
00550 
00551 static void _____lambda23_ (Block1Data* _data1_, GVariant* _result_) {
00552        gboolean _tmp0_;
00553        GMainLoop* _tmp4_;
00554        _tmp0_ = unity_tester_options_no_search_reply;
00555        if (!_tmp0_) {
00556               GVariant* _tmp1_;
00557               gchar* _tmp2_ = NULL;
00558               gchar* _tmp3_;
00559               _tmp1_ = _result_;
00560               _tmp2_ = g_variant_print (_tmp1_, TRUE);
00561               _tmp3_ = _tmp2_;
00562               g_print ("%s\n", _tmp3_);
00563               _g_free0 (_tmp3_);
00564        }
00565        _tmp4_ = _data1_->ml;
00566        g_main_loop_quit (_tmp4_);
00567 }
00568 
00569 
00570 static void ______lambda23__gfunc (gconstpointer data, gpointer self) {
00571        _____lambda23_ (self, data);
00572 }
00573 
00574 
00575 gint unity_tester_main (gchar** args, int args_length1) {
00576        gint result = 0;
00577        GOptionContext* _tmp0_;
00578        GOptionContext* opt_context;
00579        GOptionContext* _tmp1_;
00580        GError * _inner_error_ = NULL;
00581        g_set_prgname ("libunity-tool");
00582        _tmp0_ = g_option_context_new (" - libunity tool");
00583        opt_context = _tmp0_;
00584        _tmp1_ = opt_context;
00585        g_option_context_add_main_entries (_tmp1_, UNITY_TESTER_options, NULL);
00586        {
00587               gchar** _tmp2_;
00588               gint _tmp2__length1;
00589               GOptionContext* _tmp6_;
00590               gboolean _tmp7_;
00591               _tmp2_ = args;
00592               _tmp2__length1 = args_length1;
00593               if (_tmp2__length1 <= 1) {
00594                      GOptionContext* _tmp3_;
00595                      gchar* _tmp4_ = NULL;
00596                      gchar* _tmp5_;
00597                      _tmp3_ = opt_context;
00598                      _tmp4_ = g_option_context_get_help (_tmp3_, TRUE, NULL);
00599                      _tmp5_ = _tmp4_;
00600                      g_print ("%s\n", _tmp5_);
00601                      _g_free0 (_tmp5_);
00602                      result = 0;
00603                      _g_option_context_free0 (opt_context);
00604                      return result;
00605               }
00606               _tmp6_ = opt_context;
00607               g_option_context_parse (_tmp6_, &args_length1, &args, &_inner_error_);
00608               if (_inner_error_ != NULL) {
00609                      goto __catch0_g_error;
00610               }
00611               _tmp7_ = unity_tester_options_test_server_mode;
00612               if (_tmp7_) {
00613                      gboolean _tmp8_ = FALSE;
00614                      gchar** _tmp9_;
00615                      gint _tmp9__length1;
00616                      gboolean _tmp13_;
00617                      gint _tmp15_ = 0;
00618                      gchar** _tmp16_ = NULL;
00619                      gchar** test_scripts;
00620                      gint test_scripts_length1;
00621                      gint _test_scripts_size_;
00622                      gchar** _tmp17_;
00623                      gint _tmp17__length1;
00624                      gchar** _tmp18_;
00625                      gint _tmp18__length1;
00626                      gchar** _tmp19_;
00627                      gint _tmp19__length1;
00628                      gint _tmp25_ = 0;
00629                      _tmp9_ = unity_tester_options_test_cases;
00630                      _tmp9__length1 = unity_tester_options_test_cases_length1;
00631                      if (_tmp9_ == NULL) {
00632                             _tmp8_ = TRUE;
00633                      } else {
00634                             gchar** _tmp10_;
00635                             gint _tmp10__length1;
00636                             guint _tmp11_ = 0U;
00637                             gint _tmp12_;
00638                             _tmp10_ = unity_tester_options_test_cases;
00639                             _tmp10__length1 = unity_tester_options_test_cases_length1;
00640                             _tmp11_ = g_strv_length (_tmp10_);
00641                             unity_tester_options_test_cases_length1 = (gint) _tmp11_;
00642                             _tmp12_ = unity_tester_options_test_cases_length1;
00643                             _tmp8_ = _tmp12_ == 0;
00644                      }
00645                      _tmp13_ = _tmp8_;
00646                      if (_tmp13_) {
00647                             GError* _tmp14_;
00648                             _tmp14_ = g_error_new_literal (UNITY_TESTER_TESTER_ERROR, UNITY_TESTER_TESTER_ERROR_INVALID_ARGS, "No test cases specified");
00649                             _inner_error_ = _tmp14_;
00650                             goto __catch0_g_error;
00651                      }
00652                      _tmp16_ = unity_tester_get_test_cases (&_tmp15_);
00653                      test_scripts = _tmp16_;
00654                      test_scripts_length1 = _tmp15_;
00655                      _test_scripts_size_ = test_scripts_length1;
00656                      _tmp17_ = test_scripts;
00657                      _tmp17__length1 = test_scripts_length1;
00658                      _tmp18_ = (_tmp17_ != NULL) ? _vala_array_dup1 (_tmp17_, _tmp17__length1) : ((gpointer) _tmp17_);
00659                      _tmp18__length1 = _tmp17__length1;
00660                      unity_tester_test_runner_test_cases = (_vala_array_free (unity_tester_test_runner_test_cases, unity_tester_test_runner_test_cases_length1, (GDestroyNotify) g_free), NULL);
00661                      unity_tester_test_runner_test_cases = _tmp18_;
00662                      unity_tester_test_runner_test_cases_length1 = _tmp18__length1;
00663                      g_test_init (&args_length1, &args, NULL);
00664                      _tmp19_ = test_scripts;
00665                      _tmp19__length1 = test_scripts_length1;
00666                      {
00667                             gchar** test_case_collection = NULL;
00668                             gint test_case_collection_length1 = 0;
00669                             gint _test_case_collection_size_ = 0;
00670                             gint test_case_it = 0;
00671                             test_case_collection = _tmp19_;
00672                             test_case_collection_length1 = _tmp19__length1;
00673                             for (test_case_it = 0; test_case_it < _tmp19__length1; test_case_it = test_case_it + 1) {
00674                                    const gchar* test_case = NULL;
00675                                    test_case = test_case_collection[test_case_it];
00676                                    {
00677                                           const gchar* _tmp20_;
00678                                           gchar* _tmp21_ = NULL;
00679                                           gchar* _tmp22_;
00680                                           gchar* _tmp23_;
00681                                           gchar* _tmp24_;
00682                                           _tmp20_ = test_case;
00683                                           _tmp21_ = g_path_get_basename (_tmp20_);
00684                                           _tmp22_ = _tmp21_;
00685                                           _tmp23_ = g_strconcat ("/Integration/LensTest/", _tmp22_, NULL);
00686                                           _tmp24_ = _tmp23_;
00687                                           g_test_add_data_func (_tmp24_, NULL, _______lambda10__gtest_data_func);
00688                                           _g_free0 (_tmp24_);
00689                                           _g_free0 (_tmp22_);
00690                                    }
00691                             }
00692                      }
00693                      _tmp25_ = g_test_run ();
00694                      result = _tmp25_;
00695                      test_scripts = (_vala_array_free (test_scripts, test_scripts_length1, (GDestroyNotify) g_free), NULL);
00696                      _g_option_context_free0 (opt_context);
00697                      return result;
00698               } else {
00699                      const gchar* _tmp26_;
00700                      gboolean _tmp28_;
00701                      gboolean _tmp32_ = FALSE;
00702                      const gchar* _tmp33_;
00703                      gboolean _tmp35_;
00704                      gboolean _tmp37_;
00705                      const gchar* _tmp40_;
00706                      gboolean _tmp46_ = FALSE;
00707                      gboolean _tmp47_;
00708                      gboolean _tmp49_;
00709                      _tmp26_ = unity_tester_options_lens_file;
00710                      if (_tmp26_ != NULL) {
00711                             const gchar* _tmp27_;
00712                             _tmp27_ = unity_tester_options_lens_file;
00713                             unity_tester_get_lens_params_from_file (_tmp27_, &_inner_error_);
00714                             if (_inner_error_ != NULL) {
00715                                    goto __catch0_g_error;
00716                             }
00717                      }
00718                      _tmp28_ = unity_tester_options_gui;
00719                      if (_tmp28_) {
00720                             UnityTesterUnityToolUi* _tmp29_;
00721                             UnityTesterUnityToolUi* _tmp30_;
00722                             gboolean _tmp31_ = FALSE;
00723                             gtk_init (&args_length1, &args);
00724                             _tmp29_ = unity_tester_unity_tool_ui_new ();
00725                             _g_object_unref0 (unity_tester_ui);
00726                             unity_tester_ui = _tmp29_;
00727                             _tmp30_ = unity_tester_ui;
00728                             _tmp31_ = unity_tester_unity_tool_ui_init_gui (_tmp30_);
00729                             if (_tmp31_) {
00730                                    gtk_main ();
00731                             }
00732                             result = 0;
00733                             _g_option_context_free0 (opt_context);
00734                             return result;
00735                      }
00736                      _tmp33_ = unity_tester_options_lens_dbus_name;
00737                      if (_tmp33_ == NULL) {
00738                             _tmp32_ = TRUE;
00739                      } else {
00740                             const gchar* _tmp34_;
00741                             _tmp34_ = unity_tester_options_lens_dbus_path;
00742                             _tmp32_ = _tmp34_ == NULL;
00743                      }
00744                      _tmp35_ = _tmp32_;
00745                      if (_tmp35_) {
00746                             GError* _tmp36_;
00747                             _tmp36_ = g_error_new_literal (UNITY_TESTER_TESTER_ERROR, UNITY_TESTER_TESTER_ERROR_INVALID_ARGS, "Lens DBus name and path not specified!");
00748                             _inner_error_ = _tmp36_;
00749                             goto __catch0_g_error;
00750                      }
00751                      _tmp37_ = unity_tester_options_common_tests;
00752                      if (_tmp37_) {
00753                             gint _tmp38_ = 0;
00754                             gint status;
00755                             gint _tmp39_;
00756                             _tmp38_ = unity_tester_run_common_tests ();
00757                             status = _tmp38_;
00758                             _tmp39_ = status;
00759                             _vala_assert (_tmp39_ == 0, "status == 0");
00760                      }
00761                      _tmp40_ = unity_tester_options_search_string;
00762                      if (_tmp40_ != NULL) {
00763                             Block1Data* _data1_;
00764                             GMainLoop* _tmp41_;
00765                             const gchar* _tmp42_;
00766                             gint _tmp43_;
00767                             GMainLoop* _tmp44_;
00768                             gboolean _tmp45_ = FALSE;
00769                             _data1_ = g_slice_new0 (Block1Data);
00770                             _data1_->_ref_count_ = 1;
00771                             _tmp41_ = g_main_loop_new (NULL, FALSE);
00772                             _data1_->ml = _tmp41_;
00773                             _tmp42_ = unity_tester_options_search_string;
00774                             _tmp43_ = unity_tester_options_search_type;
00775                             unity_tester_call_lens_search (_tmp42_, _tmp43_, ______lambda23__gfunc, _data1_, NULL, NULL);
00776                             _tmp44_ = _data1_->ml;
00777                             _tmp45_ = unity_tester_run_with_timeout (_tmp44_, (guint) 15000);
00778                             _vala_assert (_tmp45_, "run_with_timeout (ml, 15000)");
00779                             block1_data_unref (_data1_);
00780                             _data1_ = NULL;
00781                      }
00782                      _tmp47_ = unity_tester_options_dump_results;
00783                      if (_tmp47_) {
00784                             _tmp46_ = TRUE;
00785                      } else {
00786                             gboolean _tmp48_;
00787                             _tmp48_ = unity_tester_options_dump_filters;
00788                             _tmp46_ = _tmp48_;
00789                      }
00790                      _tmp49_ = _tmp46_;
00791                      if (_tmp49_) {
00792                             UnityTesterLensInfo _tmp50_ = {0};
00793                             UnityTesterLensInfo li;
00794                             gboolean _tmp51_;
00795                             gboolean _tmp64_;
00796                             unity_tester_get_lens_info (NULL, NULL, &_tmp50_);
00797                             li = _tmp50_;
00798                             _tmp51_ = unity_tester_options_dump_results;
00799                             if (_tmp51_) {
00800                                    const gchar* _tmp52_ = NULL;
00801                                    gint _tmp53_;
00802                                    const gchar* _tmp58_;
00803                                    gchar* _tmp59_;
00804                                    gchar* model_name;
00805                                    const gchar* _tmp60_;
00806                                    DeeSharedModel* _tmp61_;
00807                                    DeeSharedModel* model;
00808                                    DeeSharedModel* _tmp62_;
00809                                    DeeSharedModel* _tmp63_;
00810                                    _tmp53_ = unity_tester_options_search_type;
00811                                    if (_tmp53_ == 0) {
00812                                           UnityTesterLensInfo _tmp54_;
00813                                           const gchar* _tmp55_;
00814                                           _tmp54_ = li;
00815                                           _tmp55_ = _tmp54_.results_model_name;
00816                                           _tmp52_ = _tmp55_;
00817                                    } else {
00818                                           UnityTesterLensInfo _tmp56_;
00819                                           const gchar* _tmp57_;
00820                                           _tmp56_ = li;
00821                                           _tmp57_ = _tmp56_.global_results_model_name;
00822                                           _tmp52_ = _tmp57_;
00823                                    }
00824                                    _tmp58_ = _tmp52_;
00825                                    _tmp59_ = g_strdup (_tmp58_);
00826                                    model_name = _tmp59_;
00827                                    _tmp60_ = model_name;
00828                                    _tmp61_ = (DeeSharedModel*) dee_shared_model_new (_tmp60_);
00829                                    model = _tmp61_;
00830                                    _tmp62_ = model;
00831                                    unity_tester_sync_model (_tmp62_);
00832                                    _tmp63_ = model;
00833                                    unity_tester_dump_results_model ((DeeModel*) _tmp63_);
00834                                    _g_object_unref0 (model);
00835                                    _g_free0 (model_name);
00836                             }
00837                             _tmp64_ = unity_tester_options_dump_filters;
00838                             if (_tmp64_) {
00839                                    UnityTesterLensInfo _tmp65_;
00840                                    const gchar* _tmp66_;
00841                                    DeeSharedModel* _tmp67_;
00842                                    DeeSharedModel* model;
00843                                    DeeSharedModel* _tmp68_;
00844                                    DeeSharedModel* _tmp69_;
00845                                    _tmp65_ = li;
00846                                    _tmp66_ = _tmp65_.filters_model_name;
00847                                    _tmp67_ = (DeeSharedModel*) dee_shared_model_new (_tmp66_);
00848                                    model = _tmp67_;
00849                                    _tmp68_ = model;
00850                                    unity_tester_sync_model (_tmp68_);
00851                                    _tmp69_ = model;
00852                                    unity_tester_dump_filters_model ((DeeModel*) _tmp69_);
00853                                    _g_object_unref0 (model);
00854                             }
00855                             unity_tester_lens_info_destroy (&li);
00856                      }
00857               }
00858        }
00859        goto __finally0;
00860        __catch0_g_error:
00861        {
00862               GError* err = NULL;
00863               GError* _tmp70_;
00864               const gchar* _tmp71_;
00865               err = _inner_error_;
00866               _inner_error_ = NULL;
00867               _tmp70_ = err;
00868               _tmp71_ = _tmp70_->message;
00869               unity_tester_warn ("%s", _tmp71_, NULL);
00870               result = 1;
00871               _g_error_free0 (err);
00872               _g_option_context_free0 (opt_context);
00873               return result;
00874        }
00875        __finally0:
00876        if (_inner_error_ != NULL) {
00877               _g_option_context_free0 (opt_context);
00878               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);
00879               g_clear_error (&_inner_error_);
00880               return 0;
00881        }
00882        result = 0;
00883        _g_option_context_free0 (opt_context);
00884        return result;
00885 }
00886 
00887 
00888 int main (int argc, char ** argv) {
00889        g_type_init ();
00890        return unity_tester_main (argv, argc);
00891 }
00892 
00893 
00894 static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value) {
00895        if ((*length) == (*size)) {
00896               *size = (*size) ? (2 * (*size)) : 4;
00897               *array = g_renew (gchar*, *array, (*size) + 1);
00898        }
00899        (*array)[(*length)++] = value;
00900        (*array)[*length] = NULL;
00901 }
00902 
00903 
00904 static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value) {
00905        if ((*length) == (*size)) {
00906               *size = (*size) ? (2 * (*size)) : 4;
00907               *array = g_renew (gchar*, *array, (*size) + 1);
00908        }
00909        (*array)[(*length)++] = value;
00910        (*array)[*length] = NULL;
00911 }
00912 
00913 
00914 gchar** unity_tester_get_test_cases (int* result_length1) {
00915        gchar** result = NULL;
00916        gchar** _tmp0_ = NULL;
00917        gchar** results;
00918        gint results_length1;
00919        gint _results_size_;
00920        gchar** _tmp1_;
00921        gint _tmp1__length1;
00922        gchar** _tmp35_;
00923        gint _tmp35__length1;
00924        GError * _inner_error_ = NULL;
00925        _tmp0_ = g_new0 (gchar*, 0 + 1);
00926        results = _tmp0_;
00927        results_length1 = 0;
00928        _results_size_ = results_length1;
00929        _tmp1_ = unity_tester_options_test_cases;
00930        _tmp1__length1 = unity_tester_options_test_cases_length1;
00931        {
00932               gchar** path_collection = NULL;
00933               gint path_collection_length1 = 0;
00934               gint _path_collection_size_ = 0;
00935               gint path_it = 0;
00936               path_collection = _tmp1_;
00937               path_collection_length1 = _tmp1__length1;
00938               for (path_it = 0; path_it < _tmp1__length1; path_it = path_it + 1) {
00939                      gchar* _tmp2_;
00940                      gchar* path = NULL;
00941                      _tmp2_ = g_strdup (path_collection[path_it]);
00942                      path = _tmp2_;
00943                      {
00944                             gboolean _tmp3_ = FALSE;
00945                             const gchar* _tmp4_;
00946                             gboolean _tmp5_ = FALSE;
00947                             gboolean _tmp8_;
00948                             _tmp4_ = path;
00949                             _tmp5_ = g_file_test (_tmp4_, G_FILE_TEST_IS_REGULAR);
00950                             if (_tmp5_) {
00951                                    const gchar* _tmp6_;
00952                                    gboolean _tmp7_ = FALSE;
00953                                    _tmp6_ = path;
00954                                    _tmp7_ = g_file_test (_tmp6_, G_FILE_TEST_IS_EXECUTABLE);
00955                                    _tmp3_ = _tmp7_;
00956                             } else {
00957                                    _tmp3_ = FALSE;
00958                             }
00959                             _tmp8_ = _tmp3_;
00960                             if (_tmp8_) {
00961                                    gchar** _tmp9_;
00962                                    gint _tmp9__length1;
00963                                    const gchar* _tmp10_;
00964                                    gchar* _tmp11_;
00965                                    _tmp9_ = results;
00966                                    _tmp9__length1 = results_length1;
00967                                    _tmp10_ = path;
00968                                    _tmp11_ = g_strdup (_tmp10_);
00969                                    _vala_array_add1 (&results, &results_length1, &_results_size_, _tmp11_);
00970                             } else {
00971                                    const gchar* _tmp12_;
00972                                    gboolean _tmp13_ = FALSE;
00973                                    _tmp12_ = path;
00974                                    _tmp13_ = g_file_test (_tmp12_, G_FILE_TEST_IS_DIR);
00975                                    if (_tmp13_) {
00976                                           {
00977                                                  const gchar* _tmp14_;
00978                                                  GDir* _tmp15_ = NULL;
00979                                                  GDir* dir;
00980                                                  GDir* _tmp16_;
00981                                                  const gchar* _tmp17_ = NULL;
00982                                                  const gchar* name;
00983                                                  _tmp14_ = path;
00984                                                  _tmp15_ = g_dir_open (_tmp14_, (guint) 0, &_inner_error_);
00985                                                  dir = _tmp15_;
00986                                                  if (_inner_error_ != NULL) {
00987                                                         goto __catch2_g_error;
00988                                                  }
00989                                                  _tmp16_ = dir;
00990                                                  _tmp17_ = g_dir_read_name (_tmp16_);
00991                                                  name = _tmp17_;
00992                                                  while (TRUE) {
00993                                                         const gchar* _tmp18_;
00994                                                         const gchar* _tmp19_;
00995                                                         const gchar* _tmp20_;
00996                                                         gchar* _tmp21_ = NULL;
00997                                                         gchar* child_path;
00998                                                         gboolean _tmp22_ = FALSE;
00999                                                         const gchar* _tmp23_;
01000                                                         gboolean _tmp24_ = FALSE;
01001                                                         gboolean _tmp27_;
01002                                                         GDir* _tmp31_;
01003                                                         const gchar* _tmp32_ = NULL;
01004                                                         _tmp18_ = name;
01005                                                         if (!(_tmp18_ != NULL)) {
01006                                                                break;
01007                                                         }
01008                                                         _tmp19_ = path;
01009                                                         _tmp20_ = name;
01010                                                         _tmp21_ = g_build_filename (_tmp19_, _tmp20_, NULL, NULL);
01011                                                         child_path = _tmp21_;
01012                                                         _tmp23_ = child_path;
01013                                                         _tmp24_ = g_file_test (_tmp23_, G_FILE_TEST_IS_REGULAR);
01014                                                         if (_tmp24_) {
01015                                                                const gchar* _tmp25_;
01016                                                                gboolean _tmp26_ = FALSE;
01017                                                                _tmp25_ = child_path;
01018                                                                _tmp26_ = g_file_test (_tmp25_, G_FILE_TEST_IS_EXECUTABLE);
01019                                                                _tmp22_ = _tmp26_;
01020                                                         } else {
01021                                                                _tmp22_ = FALSE;
01022                                                         }
01023                                                         _tmp27_ = _tmp22_;
01024                                                         if (_tmp27_) {
01025                                                                gchar** _tmp28_;
01026                                                                gint _tmp28__length1;
01027                                                                const gchar* _tmp29_;
01028                                                                gchar* _tmp30_;
01029                                                                _tmp28_ = results;
01030                                                                _tmp28__length1 = results_length1;
01031                                                                _tmp29_ = child_path;
01032                                                                _tmp30_ = g_strdup (_tmp29_);
01033                                                                _vala_array_add2 (&results, &results_length1, &_results_size_, _tmp30_);
01034                                                         }
01035                                                         _tmp31_ = dir;
01036                                                         _tmp32_ = g_dir_read_name (_tmp31_);
01037                                                         name = _tmp32_;
01038                                                         _g_free0 (child_path);
01039                                                  }
01040                                                  _g_dir_close0 (dir);
01041                                           }
01042                                           goto __finally2;
01043                                           __catch2_g_error:
01044                                           {
01045                                                  GError* e = NULL;
01046                                                  GError* _tmp33_;
01047                                                  const gchar* _tmp34_;
01048                                                  e = _inner_error_;
01049                                                  _inner_error_ = NULL;
01050                                                  _tmp33_ = e;
01051                                                  _tmp34_ = _tmp33_->message;
01052                                                  unity_tester_warn ("%s", _tmp34_, NULL);
01053                                                  _g_error_free0 (e);
01054                                           }
01055                                           __finally2:
01056                                           if (_inner_error_ != NULL) {
01057                                                  _g_free0 (path);
01058                                                  results = (_vala_array_free (results, results_length1, (GDestroyNotify) g_free), NULL);
01059                                                  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);
01060                                                  g_clear_error (&_inner_error_);
01061                                                  return NULL;
01062                                           }
01063                                    }
01064                             }
01065                             _g_free0 (path);
01066                      }
01067               }
01068        }
01069        _tmp35_ = results;
01070        _tmp35__length1 = results_length1;
01071        if (result_length1) {
01072               *result_length1 = _tmp35__length1;
01073        }
01074        result = _tmp35_;
01075        return result;
01076 }
01077 
01078 
01079 static gpointer _g_main_loop_ref0 (gpointer self) {
01080        return self ? g_main_loop_ref (self) : NULL;
01081 }
01082 
01083 
01084 static Block2Data* block2_data_ref (Block2Data* _data2_) {
01085        g_atomic_int_inc (&_data2_->_ref_count_);
01086        return _data2_;
01087 }
01088 
01089 
01090 static void block2_data_unref (void * _userdata_) {
01091        Block2Data* _data2_;
01092        _data2_ = (Block2Data*) _userdata_;
01093        if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
01094               _g_main_loop_unref0 (_data2_->ml);
01095               g_slice_free (Block2Data, _data2_);
01096        }
01097 }
01098 
01099 
01100 static gboolean __lambda5_ (Block2Data* _data2_) {
01101        gboolean result = FALSE;
01102        GMainLoop* _tmp0_;
01103        _data2_->timeout_reached = TRUE;
01104        g_debug ("unity-tool.vala:311: Timeout reached");
01105        _tmp0_ = _data2_->ml;
01106        g_main_loop_quit (_tmp0_);
01107        result = FALSE;
01108        return result;
01109 }
01110 
01111 
01112 static gboolean ___lambda5__gsource_func (gpointer self) {
01113        gboolean result;
01114        result = __lambda5_ (self);
01115        return result;
01116 }
01117 
01118 
01119 gboolean unity_tester_run_with_timeout (GMainLoop* ml, guint timeout_ms) {
01120        gboolean result = FALSE;
01121        Block2Data* _data2_;
01122        GMainLoop* _tmp0_;
01123        GMainLoop* _tmp1_;
01124        guint _tmp2_;
01125        guint _tmp3_ = 0U;
01126        guint t_id;
01127        GMainLoop* _tmp4_;
01128        gboolean _tmp5_;
01129        gboolean _tmp7_;
01130        g_return_val_if_fail (ml != NULL, FALSE);
01131        _data2_ = g_slice_new0 (Block2Data);
01132        _data2_->_ref_count_ = 1;
01133        _tmp0_ = ml;
01134        _tmp1_ = _g_main_loop_ref0 (_tmp0_);
01135        _data2_->ml = _tmp1_;
01136        _data2_->timeout_reached = FALSE;
01137        _tmp2_ = timeout_ms;
01138        _tmp3_ = g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp2_, ___lambda5__gsource_func, block2_data_ref (_data2_), block2_data_unref);
01139        t_id = _tmp3_;
01140        _tmp4_ = _data2_->ml;
01141        g_main_loop_run (_tmp4_);
01142        _tmp5_ = _data2_->timeout_reached;
01143        if (!_tmp5_) {
01144               guint _tmp6_;
01145               _tmp6_ = t_id;
01146               g_source_remove (_tmp6_);
01147        }
01148        _tmp7_ = _data2_->timeout_reached;
01149        result = !_tmp7_;
01150        block2_data_unref (_data2_);
01151        _data2_ = NULL;
01152        return result;
01153 }
01154 
01155 
01156 static Block3Data* block3_data_ref (Block3Data* _data3_) {
01157        g_atomic_int_inc (&_data3_->_ref_count_);
01158        return _data3_;
01159 }
01160 
01161 
01162 static void block3_data_unref (void * _userdata_) {
01163        Block3Data* _data3_;
01164        _data3_ = (Block3Data*) _userdata_;
01165        if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
01166               _g_main_loop_unref0 (_data3_->ml);
01167               g_slice_free (Block3Data, _data3_);
01168        }
01169 }
01170 
01171 
01172 static void __lambda12_ (Block3Data* _data3_) {
01173        GMainLoop* _tmp0_;
01174        _tmp0_ = _data3_->ml;
01175        g_main_loop_quit (_tmp0_);
01176 }
01177 
01178 
01179 static void ___lambda12__gfunc (gconstpointer data, gpointer self) {
01180        __lambda12_ (self);
01181 }
01182 
01183 
01184 static void __lambda11_ (void) {
01185        Block3Data* _data3_;
01186        GMainLoop* _tmp0_;
01187        GMainLoop* _tmp1_;
01188        gboolean _tmp2_ = FALSE;
01189        _data3_ = g_slice_new0 (Block3Data);
01190        _data3_->_ref_count_ = 1;
01191        _tmp0_ = g_main_loop_new (NULL, FALSE);
01192        _data3_->ml = _tmp0_;
01193        unity_tester_call_lens_search ("", 0, ___lambda12__gfunc, _data3_, NULL, NULL);
01194        _tmp1_ = _data3_->ml;
01195        _tmp2_ = unity_tester_run_with_timeout (_tmp1_, (guint) 20000);
01196        if (!_tmp2_) {
01197               unity_tester_warn ("Lens didn't respond", NULL);
01198        }
01199        block3_data_unref (_data3_);
01200        _data3_ = NULL;
01201 }
01202 
01203 
01204 static void ___lambda11__gtest_data_func (gpointer self) {
01205        __lambda11_ ();
01206 }
01207 
01208 
01209 static Block4Data* block4_data_ref (Block4Data* _data4_) {
01210        g_atomic_int_inc (&_data4_->_ref_count_);
01211        return _data4_;
01212 }
01213 
01214 
01215 static void block4_data_unref (void * _userdata_) {
01216        Block4Data* _data4_;
01217        _data4_ = (Block4Data*) _userdata_;
01218        if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
01219               _g_main_loop_unref0 (_data4_->ml);
01220               g_slice_free (Block4Data, _data4_);
01221        }
01222 }
01223 
01224 
01225 static void __lambda14_ (Block4Data* _data4_) {
01226        GMainLoop* _tmp0_;
01227        _tmp0_ = _data4_->ml;
01228        g_main_loop_quit (_tmp0_);
01229 }
01230 
01231 
01232 static void ___lambda14__gfunc (gconstpointer data, gpointer self) {
01233        __lambda14_ (self);
01234 }
01235 
01236 
01237 static void __lambda13_ (void) {
01238        Block4Data* _data4_;
01239        GMainLoop* _tmp0_;
01240        GMainLoop* _tmp1_;
01241        gboolean _tmp2_ = FALSE;
01242        _data4_ = g_slice_new0 (Block4Data);
01243        _data4_->_ref_count_ = 1;
01244        _tmp0_ = g_main_loop_new (NULL, FALSE);
01245        _data4_->ml = _tmp0_;
01246        unity_tester_call_lens_search ("a", 0, ___lambda14__gfunc, _data4_, NULL, NULL);
01247        _tmp1_ = _data4_->ml;
01248        _tmp2_ = unity_tester_run_with_timeout (_tmp1_, (guint) 20000);
01249        if (!_tmp2_) {
01250               unity_tester_warn ("Lens didn't respond", NULL);
01251        }
01252        block4_data_unref (_data4_);
01253        _data4_ = NULL;
01254 }
01255 
01256 
01257 static void ___lambda13__gtest_data_func (gpointer self) {
01258        __lambda13_ ();
01259 }
01260 
01261 
01262 static Block5Data* block5_data_ref (Block5Data* _data5_) {
01263        g_atomic_int_inc (&_data5_->_ref_count_);
01264        return _data5_;
01265 }
01266 
01267 
01268 static void block5_data_unref (void * _userdata_) {
01269        Block5Data* _data5_;
01270        _data5_ = (Block5Data*) _userdata_;
01271        if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
01272               _g_main_loop_unref0 (_data5_->ml);
01273               g_slice_free (Block5Data, _data5_);
01274        }
01275 }
01276 
01277 
01278 static void __lambda16_ (Block5Data* _data5_) {
01279        GMainLoop* _tmp0_;
01280        _tmp0_ = _data5_->ml;
01281        g_main_loop_quit (_tmp0_);
01282 }
01283 
01284 
01285 static void ___lambda16__gfunc (gconstpointer data, gpointer self) {
01286        __lambda16_ (self);
01287 }
01288 
01289 
01290 static void __lambda15_ (void) {
01291        Block5Data* _data5_;
01292        GMainLoop* _tmp0_;
01293        GMainLoop* _tmp1_;
01294        gboolean _tmp2_ = FALSE;
01295        _data5_ = g_slice_new0 (Block5Data);
01296        _data5_->_ref_count_ = 1;
01297        _tmp0_ = g_main_loop_new (NULL, FALSE);
01298        _data5_->ml = _tmp0_;
01299        unity_tester_call_lens_search ("", 0, ___lambda16__gfunc, _data5_, NULL, NULL);
01300        _tmp1_ = _data5_->ml;
01301        _tmp2_ = unity_tester_run_with_timeout (_tmp1_, (guint) 20000);
01302        if (!_tmp2_) {
01303               unity_tester_warn ("Lens didn't respond", NULL);
01304        }
01305        block5_data_unref (_data5_);
01306        _data5_ = NULL;
01307 }
01308 
01309 
01310 static void ___lambda15__gtest_data_func (gpointer self) {
01311        __lambda15_ ();
01312 }
01313 
01314 
01315 static Block6Data* block6_data_ref (Block6Data* _data6_) {
01316        g_atomic_int_inc (&_data6_->_ref_count_);
01317        return _data6_;
01318 }
01319 
01320 
01321 static void block6_data_unref (void * _userdata_) {
01322        Block6Data* _data6_;
01323        _data6_ = (Block6Data*) _userdata_;
01324        if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
01325               _g_main_loop_unref0 (_data6_->ml);
01326               g_slice_free (Block6Data, _data6_);
01327        }
01328 }
01329 
01330 
01331 static void __lambda18_ (Block6Data* _data6_) {
01332        GMainLoop* _tmp0_;
01333        _tmp0_ = _data6_->ml;
01334        g_main_loop_quit (_tmp0_);
01335 }
01336 
01337 
01338 static void ___lambda18__gfunc (gconstpointer data, gpointer self) {
01339        __lambda18_ (self);
01340 }
01341 
01342 
01343 static void __lambda17_ (void) {
01344        Block6Data* _data6_;
01345        GMainLoop* _tmp0_;
01346        GMainLoop* _tmp1_;
01347        gboolean _tmp2_ = FALSE;
01348        _data6_ = g_slice_new0 (Block6Data);
01349        _data6_->_ref_count_ = 1;
01350        _tmp0_ = g_main_loop_new (NULL, FALSE);
01351        _data6_->ml = _tmp0_;
01352        unity_tester_call_lens_search ("", 1, ___lambda18__gfunc, _data6_, NULL, NULL);
01353        _tmp1_ = _data6_->ml;
01354        _tmp2_ = unity_tester_run_with_timeout (_tmp1_, (guint) 20000);
01355        if (!_tmp2_) {
01356               unity_tester_warn ("Lens didn't respond", NULL);
01357        }
01358        block6_data_unref (_data6_);
01359        _data6_ = NULL;
01360 }
01361 
01362 
01363 static void ___lambda17__gtest_data_func (gpointer self) {
01364        __lambda17_ ();
01365 }
01366 
01367 
01368 static Block7Data* block7_data_ref (Block7Data* _data7_) {
01369        g_atomic_int_inc (&_data7_->_ref_count_);
01370        return _data7_;
01371 }
01372 
01373 
01374 static void block7_data_unref (void * _userdata_) {
01375        Block7Data* _data7_;
01376        _data7_ = (Block7Data*) _userdata_;
01377        if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
01378               _g_main_loop_unref0 (_data7_->ml);
01379               g_slice_free (Block7Data, _data7_);
01380        }
01381 }
01382 
01383 
01384 static void __lambda20_ (Block7Data* _data7_) {
01385        GMainLoop* _tmp0_;
01386        _tmp0_ = _data7_->ml;
01387        g_main_loop_quit (_tmp0_);
01388 }
01389 
01390 
01391 static void ___lambda20__gfunc (gconstpointer data, gpointer self) {
01392        __lambda20_ (self);
01393 }
01394 
01395 
01396 static void __lambda19_ (void) {
01397        Block7Data* _data7_;
01398        GMainLoop* _tmp0_;
01399        GMainLoop* _tmp1_;
01400        gboolean _tmp2_ = FALSE;
01401        _data7_ = g_slice_new0 (Block7Data);
01402        _data7_->_ref_count_ = 1;
01403        _tmp0_ = g_main_loop_new (NULL, FALSE);
01404        _data7_->ml = _tmp0_;
01405        unity_tester_call_lens_search ("a", 1, ___lambda20__gfunc, _data7_, NULL, NULL);
01406        _tmp1_ = _data7_->ml;
01407        _tmp2_ = unity_tester_run_with_timeout (_tmp1_, (guint) 20000);
01408        if (!_tmp2_) {
01409               unity_tester_warn ("Lens didn't respond", NULL);
01410        }
01411        block7_data_unref (_data7_);
01412        _data7_ = NULL;
01413 }
01414 
01415 
01416 static void ___lambda19__gtest_data_func (gpointer self) {
01417        __lambda19_ ();
01418 }
01419 
01420 
01421 static Block8Data* block8_data_ref (Block8Data* _data8_) {
01422        g_atomic_int_inc (&_data8_->_ref_count_);
01423        return _data8_;
01424 }
01425 
01426 
01427 static void block8_data_unref (void * _userdata_) {
01428        Block8Data* _data8_;
01429        _data8_ = (Block8Data*) _userdata_;
01430        if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
01431               _g_main_loop_unref0 (_data8_->ml);
01432               g_slice_free (Block8Data, _data8_);
01433        }
01434 }
01435 
01436 
01437 static void __lambda22_ (Block8Data* _data8_) {
01438        GMainLoop* _tmp0_;
01439        _tmp0_ = _data8_->ml;
01440        g_main_loop_quit (_tmp0_);
01441 }
01442 
01443 
01444 static void ___lambda22__gfunc (gconstpointer data, gpointer self) {
01445        __lambda22_ (self);
01446 }
01447 
01448 
01449 static void __lambda21_ (void) {
01450        Block8Data* _data8_;
01451        GMainLoop* _tmp0_;
01452        GMainLoop* _tmp1_;
01453        gboolean _tmp2_ = FALSE;
01454        _data8_ = g_slice_new0 (Block8Data);
01455        _data8_->_ref_count_ = 1;
01456        _tmp0_ = g_main_loop_new (NULL, FALSE);
01457        _data8_->ml = _tmp0_;
01458        unity_tester_call_lens_search ("", 1, ___lambda22__gfunc, _data8_, NULL, NULL);
01459        _tmp1_ = _data8_->ml;
01460        _tmp2_ = unity_tester_run_with_timeout (_tmp1_, (guint) 20000);
01461        if (!_tmp2_) {
01462               unity_tester_warn ("Lens didn't respond", NULL);
01463        }
01464        block8_data_unref (_data8_);
01465        _data8_ = NULL;
01466 }
01467 
01468 
01469 static void ___lambda21__gtest_data_func (gpointer self) {
01470        __lambda21_ ();
01471 }
01472 
01473 
01474 gint unity_tester_run_common_tests (void) {
01475        gint result = 0;
01476        gchar* _tmp0_;
01477        gchar** _tmp1_ = NULL;
01478        gchar** args;
01479        gint args_length1;
01480        gint _args_size_;
01481        gchar** dummy;
01482        gint dummy_length1;
01483        gint _dummy_size_;
01484        gint _tmp2_ = 0;
01485        _tmp0_ = g_strdup ("./libunity-tool");
01486        _tmp1_ = g_new0 (gchar*, 1 + 1);
01487        _tmp1_[0] = _tmp0_;
01488        args = _tmp1_;
01489        args_length1 = 1;
01490        _args_size_ = args_length1;
01491        dummy = args;
01492        dummy_length1 = args_length1;
01493        _dummy_size_ = dummy_length1;
01494        g_test_init (&dummy_length1, &dummy, NULL);
01495        g_test_add_data_func ("/Integration/LensTest/DefaultSearch/Empty", NULL, ___lambda11__gtest_data_func);
01496        g_test_add_data_func ("/Integration/LensTest/DefaultSearch/NonEmpty", NULL, ___lambda13__gtest_data_func);
01497        g_test_add_data_func ("/Integration/LensTest/DefaultSearch/Empty2", NULL, ___lambda15__gtest_data_func);
01498        g_test_add_data_func ("/Integration/LensTest/GlobalSearch/Empty", NULL, ___lambda17__gtest_data_func);
01499        g_test_add_data_func ("/Integration/LensTest/GlobalSearch/NonEmpty", NULL, ___lambda19__gtest_data_func);
01500        g_test_add_data_func ("/Integration/LensTest/GlobalSearch/Empty2", NULL, ___lambda21__gtest_data_func);
01501        _tmp2_ = g_test_run ();
01502        result = _tmp2_;
01503        args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
01504        return result;
01505 }
01506 
01507 
01508 static Block9Data* block9_data_ref (Block9Data* _data9_) {
01509        g_atomic_int_inc (&_data9_->_ref_count_);
01510        return _data9_;
01511 }
01512 
01513 
01514 static void block9_data_unref (void * _userdata_) {
01515        Block9Data* _data9_;
01516        _data9_ = (Block9Data*) _userdata_;
01517        if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
01518               g_slice_free (Block9Data, _data9_);
01519        }
01520 }
01521 
01522 
01523 static Block10Data* block10_data_ref (Block10Data* _data10_) {
01524        g_atomic_int_inc (&_data10_->_ref_count_);
01525        return _data10_;
01526 }
01527 
01528 
01529 static void block10_data_unref (void * _userdata_) {
01530        Block10Data* _data10_;
01531        _data10_ = (Block10Data*) _userdata_;
01532        if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
01533               _g_object_unref0 (_data10_->bus);
01534               block9_data_unref (_data10_->_data9_);
01535               _data10_->_data9_ = NULL;
01536               g_slice_free (Block10Data, _data10_);
01537        }
01538 }
01539 
01540 
01541 static void ___lambda7_ (Block10Data* _data10_, GObject* obj, GAsyncResult* res) {
01542        Block9Data* _data9_;
01543        GError * _inner_error_ = NULL;
01544        _data9_ = _data10_->_data9_;
01545        g_return_if_fail (res != NULL);
01546        {
01547               GAsyncResult* _tmp0_;
01548               GVariant* _tmp1_ = NULL;
01549               GVariant* reply;
01550               GFunc _tmp2_;
01551               void* _tmp2__target;
01552               _tmp0_ = res;
01553               _tmp1_ = g_dbus_connection_call_finish (_data10_->bus, _tmp0_, &_inner_error_);
01554               reply = _tmp1_;
01555               if (_inner_error_ != NULL) {
01556                      goto __catch4_g_error;
01557               }
01558               _tmp2_ = _data9_->cb;
01559               _tmp2__target = _data9_->cb_target;
01560               if (_tmp2_ != NULL) {
01561                      GFunc _tmp3_;
01562                      void* _tmp3__target;
01563                      _tmp3_ = _data9_->cb;
01564                      _tmp3__target = _data9_->cb_target;
01565                      _tmp3_ (reply, _tmp3__target);
01566               }
01567               _g_variant_unref0 (reply);
01568        }
01569        goto __finally4;
01570        __catch4_g_error:
01571        {
01572               GError* e = NULL;
01573               GFunc _tmp4_;
01574               void* _tmp4__target;
01575               e = _inner_error_;
01576               _inner_error_ = NULL;
01577               _tmp4_ = _data9_->error_cb;
01578               _tmp4__target = _data9_->error_cb_target;
01579               if (_tmp4_ != NULL) {
01580                      GFunc _tmp5_;
01581                      void* _tmp5__target;
01582                      GError* _tmp6_;
01583                      const gchar* _tmp7_;
01584                      _tmp5_ = _data9_->error_cb;
01585                      _tmp5__target = _data9_->error_cb_target;
01586                      _tmp6_ = e;
01587                      _tmp7_ = _tmp6_->message;
01588                      _tmp5_ (_tmp7_, _tmp5__target);
01589               } else {
01590                      GError* _tmp8_;
01591                      const gchar* _tmp9_;
01592                      _tmp8_ = e;
01593                      _tmp9_ = _tmp8_->message;
01594                      unity_tester_warn ("%s", _tmp9_, NULL);
01595               }
01596               _g_error_free0 (e);
01597        }
01598        __finally4:
01599        if (_inner_error_ != NULL) {
01600               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);
01601               g_clear_error (&_inner_error_);
01602               return;
01603        }
01604 }
01605 
01606 
01607 static void ____lambda7__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
01608        ___lambda7_ (self, source_object, res);
01609        block10_data_unref (self);
01610 }
01611 
01612 
01613 void unity_tester_call_lens_search (const gchar* search_string, gint search_type, GFunc cb, void* cb_target, GFunc error_cb, void* error_cb_target) {
01614        Block9Data* _data9_;
01615        GFunc _tmp0_;
01616        void* _tmp0__target;
01617        GFunc _tmp1_;
01618        void* _tmp1__target;
01619        GVariantType* _tmp2_;
01620        GVariantType* _tmp3_;
01621        GVariantBuilder* _tmp4_;
01622        GVariantBuilder* _tmp5_;
01623        GVariantBuilder* vb;
01624        const gchar* _tmp6_;
01625        GVariantType* _tmp7_;
01626        GVariantType* _tmp8_;
01627        GError * _inner_error_ = NULL;
01628        g_return_if_fail (search_string != NULL);
01629        _data9_ = g_slice_new0 (Block9Data);
01630        _data9_->_ref_count_ = 1;
01631        _tmp0_ = cb;
01632        _tmp0__target = cb_target;
01633        _data9_->cb = _tmp0_;
01634        _data9_->cb_target = _tmp0__target;
01635        _tmp1_ = error_cb;
01636        _tmp1__target = error_cb_target;
01637        _data9_->error_cb = _tmp1_;
01638        _data9_->error_cb_target = _tmp1__target;
01639        _tmp2_ = g_variant_type_new ("(sa{sv})");
01640        _tmp3_ = _tmp2_;
01641        _tmp4_ = g_variant_builder_new (_tmp3_);
01642        _tmp5_ = _tmp4_;
01643        _g_variant_type_free0 (_tmp3_);
01644        vb = _tmp5_;
01645        _tmp6_ = search_string;
01646        g_variant_builder_add (vb, "s", _tmp6_, NULL);
01647        _tmp7_ = g_variant_type_new ("a{sv}");
01648        _tmp8_ = _tmp7_;
01649        g_variant_builder_open (vb, _tmp8_);
01650        _g_variant_type_free0 (_tmp8_);
01651        g_variant_builder_close (vb);
01652        {
01653               Block10Data* _data10_;
01654               GDBusConnection* _tmp9_ = NULL;
01655               const gchar* _tmp10_ = NULL;
01656               gint _tmp11_;
01657               const gchar* _tmp12_;
01658               const gchar* _tmp13_;
01659               const gchar* _tmp14_;
01660               GVariant* _tmp15_ = NULL;
01661               GVariant* _tmp16_;
01662               _data10_ = g_slice_new0 (Block10Data);
01663               _data10_->_ref_count_ = 1;
01664               _data10_->_data9_ = block9_data_ref (_data9_);
01665               _tmp9_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
01666               _data10_->bus = _tmp9_;
01667               if (_inner_error_ != NULL) {
01668                      block10_data_unref (_data10_);
01669                      _data10_ = NULL;
01670                      goto __catch3_g_error;
01671               }
01672               _tmp11_ = search_type;
01673               if (_tmp11_ == 0) {
01674                      _tmp10_ = "Search";
01675               } else {
01676                      _tmp10_ = "GlobalSearch";
01677               }
01678               _tmp12_ = unity_tester_options_lens_dbus_name;
01679               _tmp13_ = unity_tester_options_lens_dbus_path;
01680               _tmp14_ = _tmp10_;
01681               _tmp15_ = g_variant_builder_end (vb);
01682               g_variant_ref_sink (_tmp15_);
01683               _tmp16_ = _tmp15_;
01684               g_dbus_connection_call (_data10_->bus, _tmp12_, _tmp13_, "com.canonical.Unity.Lens", _tmp14_, _tmp16_, NULL, 0, -1, NULL, ____lambda7__gasync_ready_callback, block10_data_ref (_data10_));
01685               _g_variant_unref0 (_tmp16_);
01686               block10_data_unref (_data10_);
01687               _data10_ = NULL;
01688        }
01689        goto __finally3;
01690        __catch3_g_error:
01691        {
01692               GError* e = NULL;
01693               GFunc _tmp17_;
01694               void* _tmp17__target;
01695               e = _inner_error_;
01696               _inner_error_ = NULL;
01697               _tmp17_ = _data9_->error_cb;
01698               _tmp17__target = _data9_->error_cb_target;
01699               if (_tmp17_ != NULL) {
01700                      GFunc _tmp18_;
01701                      void* _tmp18__target;
01702                      GError* _tmp19_;
01703                      const gchar* _tmp20_;
01704                      _tmp18_ = _data9_->error_cb;
01705                      _tmp18__target = _data9_->error_cb_target;
01706                      _tmp19_ = e;
01707                      _tmp20_ = _tmp19_->message;
01708                      _tmp18_ (_tmp20_, _tmp18__target);
01709               } else {
01710                      GError* _tmp21_;
01711                      const gchar* _tmp22_;
01712                      _tmp21_ = e;
01713                      _tmp22_ = _tmp21_->message;
01714                      unity_tester_warn ("%s", _tmp22_, NULL);
01715               }
01716               _g_error_free0 (e);
01717        }
01718        __finally3:
01719        if (_inner_error_ != NULL) {
01720               _g_variant_builder_unref0 (vb);
01721               block9_data_unref (_data9_);
01722               _data9_ = NULL;
01723               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);
01724               g_clear_error (&_inner_error_);
01725               return;
01726        }
01727        _g_variant_builder_unref0 (vb);
01728        block9_data_unref (_data9_);
01729        _data9_ = NULL;
01730 }
01731 
01732 
01733 static Block11Data* block11_data_ref (Block11Data* _data11_) {
01734        g_atomic_int_inc (&_data11_->_ref_count_);
01735        return _data11_;
01736 }
01737 
01738 
01739 static void block11_data_unref (void * _userdata_) {
01740        Block11Data* _data11_;
01741        _data11_ = (Block11Data*) _userdata_;
01742        if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
01743               unity_tester_lens_info_destroy (&_data11_->info);
01744               _g_main_loop_unref0 (_data11_->ml);
01745               g_slice_free (Block11Data, _data11_);
01746        }
01747 }
01748 
01749 
01750 static void _variant_get1 (GVariant* value, UnityTesterLensInfo* result) {
01751        UnityTesterLensInfo _tmp4_;
01752        GVariantIter _tmp5_;
01753        GVariant* _tmp6_;
01754        GVariant* _tmp7_;
01755        GVariant* _tmp8_;
01756        GVariant* _tmp9_;
01757        GVariant* _tmp10_;
01758        GVariant* _tmp11_;
01759        GVariant* _tmp12_;
01760        GVariant* _tmp13_;
01761        GVariant* _tmp14_;
01762        GVariant* _tmp15_;
01763        GHashTable* _tmp16_;
01764        GVariantIter _tmp17_;
01765        GVariant* _tmp18_;
01766        GVariant* _tmp19_;
01767        g_variant_iter_init (&_tmp5_, value);
01768        _tmp6_ = g_variant_iter_next_value (&_tmp5_);
01769        _tmp4_.dbus_path = g_variant_dup_string (_tmp6_, NULL);
01770        g_variant_unref (_tmp6_);
01771        _tmp7_ = g_variant_iter_next_value (&_tmp5_);
01772        _tmp4_.search_in_global = g_variant_get_boolean (_tmp7_);
01773        g_variant_unref (_tmp7_);
01774        _tmp8_ = g_variant_iter_next_value (&_tmp5_);
01775        _tmp4_.visible = g_variant_get_boolean (_tmp8_);
01776        g_variant_unref (_tmp8_);
01777        _tmp9_ = g_variant_iter_next_value (&_tmp5_);
01778        _tmp4_.search_hint = g_variant_dup_string (_tmp9_, NULL);
01779        g_variant_unref (_tmp9_);
01780        _tmp10_ = g_variant_iter_next_value (&_tmp5_);
01781        _tmp4_.private_connection_name = g_variant_dup_string (_tmp10_, NULL);
01782        g_variant_unref (_tmp10_);
01783        _tmp11_ = g_variant_iter_next_value (&_tmp5_);
01784        _tmp4_.results_model_name = g_variant_dup_string (_tmp11_, NULL);
01785        g_variant_unref (_tmp11_);
01786        _tmp12_ = g_variant_iter_next_value (&_tmp5_);
01787        _tmp4_.global_results_model_name = g_variant_dup_string (_tmp12_, NULL);
01788        g_variant_unref (_tmp12_);
01789        _tmp13_ = g_variant_iter_next_value (&_tmp5_);
01790        _tmp4_.categories_model_name = g_variant_dup_string (_tmp13_, NULL);
01791        g_variant_unref (_tmp13_);
01792        _tmp14_ = g_variant_iter_next_value (&_tmp5_);
01793        _tmp4_.filters_model_name = g_variant_dup_string (_tmp14_, NULL);
01794        g_variant_unref (_tmp14_);
01795        _tmp15_ = g_variant_iter_next_value (&_tmp5_);
01796        _tmp16_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
01797        g_variant_iter_init (&_tmp17_, _tmp15_);
01798        while (g_variant_iter_loop (&_tmp17_, "{?*}", &_tmp18_, &_tmp19_)) {
01799               g_hash_table_insert (_tmp16_, g_variant_dup_string (_tmp18_, NULL), g_variant_get_variant (_tmp19_));
01800        }
01801        _tmp4_.hints = _tmp16_;
01802        g_variant_unref (_tmp15_);
01803        *result = _tmp4_;
01804 }
01805 
01806 
01807 static void ___lambda4_ (Block11Data* _data11_, GDBusConnection* conn, const gchar* sender, const gchar* obj_path, const gchar* ifc_name, const gchar* sig_name, GVariant* parameters) {
01808        GVariant* _tmp0_;
01809        GVariant* _tmp1_ = NULL;
01810        GVariant* _tmp2_;
01811        UnityTesterLensInfo _tmp3_;
01812        g_return_if_fail (conn != NULL);
01813        g_return_if_fail (sender != NULL);
01814        g_return_if_fail (obj_path != NULL);
01815        g_return_if_fail (ifc_name != NULL);
01816        g_return_if_fail (sig_name != NULL);
01817        g_return_if_fail (parameters != NULL);
01818        _tmp0_ = parameters;
01819        _tmp1_ = g_variant_get_child_value (_tmp0_, (gsize) 0);
01820        _tmp2_ = _tmp1_;
01821        _variant_get1 (_tmp2_, &_tmp3_);
01822        unity_tester_lens_info_destroy (&_data11_->info);
01823        _data11_->info = _tmp3_;
01824        _g_variant_unref0 (_tmp2_);
01825        g_main_loop_quit (_data11_->ml);
01826 }
01827 
01828 
01829 static void ____lambda4__gd_bus_signal_callback (GDBusConnection* connection, const gchar* sender_name, const gchar* object_path, const gchar* interface_name, const gchar* signal_name, GVariant* parameters, gpointer self) {
01830        ___lambda4_ (self, connection, sender_name, object_path, interface_name, signal_name, parameters);
01831 }
01832 
01833 
01834 void unity_tester_get_lens_info (GFunc error_cb, void* error_cb_target, UnityTesterLensInfo* result) {
01835        Block11Data* _data11_;
01836        GMainLoop* _tmp0_;
01837        UnityTesterLensInfo _tmp16_;
01838        UnityTesterLensInfo _tmp17_ = {0};
01839        GError * _inner_error_ = NULL;
01840        _data11_ = g_slice_new0 (Block11Data);
01841        _data11_->_ref_count_ = 1;
01842        _tmp0_ = g_main_loop_new (NULL, FALSE);
01843        _data11_->ml = _tmp0_;
01844        memset (&_data11_->info, 0, sizeof (UnityTesterLensInfo));
01845        {
01846               GDBusConnection* _tmp1_ = NULL;
01847               GDBusConnection* bus;
01848               const gchar* _tmp2_;
01849               guint _tmp3_ = 0U;
01850               guint sig_id;
01851               const gchar* _tmp4_;
01852               const gchar* _tmp5_;
01853               gboolean _tmp6_ = FALSE;
01854               guint _tmp9_;
01855               _tmp1_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
01856               bus = _tmp1_;
01857               if (_inner_error_ != NULL) {
01858                      goto __catch5_g_error;
01859               }
01860               _tmp2_ = unity_tester_options_lens_dbus_path;
01861               _tmp3_ = g_dbus_connection_signal_subscribe (bus, NULL, "com.canonical.Unity.Lens", "Changed", _tmp2_, NULL, 0, ____lambda4__gd_bus_signal_callback, block11_data_ref (_data11_), block11_data_unref);
01862               sig_id = _tmp3_;
01863               _tmp4_ = unity_tester_options_lens_dbus_name;
01864               _tmp5_ = unity_tester_options_lens_dbus_path;
01865               g_dbus_connection_call (bus, _tmp4_, _tmp5_, "com.canonical.Unity.Lens", "InfoRequest", NULL, NULL, 0, -1, NULL, NULL, NULL);
01866               _tmp6_ = unity_tester_run_with_timeout (_data11_->ml, (guint) 5000);
01867               if (!_tmp6_) {
01868                      GFunc _tmp7_;
01869                      void* _tmp7__target;
01870                      _tmp7_ = error_cb;
01871                      _tmp7__target = error_cb_target;
01872                      if (_tmp7_ != NULL) {
01873                             GFunc _tmp8_;
01874                             void* _tmp8__target;
01875                             _tmp8_ = error_cb;
01876                             _tmp8__target = error_cb_target;
01877                             _tmp8_ ("Unable to get LensInfo!", _tmp8__target);
01878                      } else {
01879                             unity_tester_warn ("Unable to get LensInfo!", NULL);
01880                      }
01881               }
01882               _tmp9_ = sig_id;
01883               g_dbus_connection_signal_unsubscribe (bus, _tmp9_);
01884               _g_object_unref0 (bus);
01885        }
01886        goto __finally5;
01887        __catch5_g_error:
01888        {
01889               GError* e = NULL;
01890               GFunc _tmp10_;
01891               void* _tmp10__target;
01892               e = _inner_error_;
01893               _inner_error_ = NULL;
01894               _tmp10_ = error_cb;
01895               _tmp10__target = error_cb_target;
01896               if (_tmp10_ != NULL) {
01897                      GFunc _tmp11_;
01898                      void* _tmp11__target;
01899                      GError* _tmp12_;
01900                      const gchar* _tmp13_;
01901                      _tmp11_ = error_cb;
01902                      _tmp11__target = error_cb_target;
01903                      _tmp12_ = e;
01904                      _tmp13_ = _tmp12_->message;
01905                      _tmp11_ (_tmp13_, _tmp11__target);
01906               } else {
01907                      GError* _tmp14_;
01908                      const gchar* _tmp15_;
01909                      _tmp14_ = e;
01910                      _tmp15_ = _tmp14_->message;
01911                      unity_tester_warn ("%s", _tmp15_, NULL);
01912               }
01913               _g_error_free0 (e);
01914        }
01915        __finally5:
01916        if (_inner_error_ != NULL) {
01917               block11_data_unref (_data11_);
01918               _data11_ = NULL;
01919               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);
01920               g_clear_error (&_inner_error_);
01921               return;
01922        }
01923        _tmp16_ = _data11_->info;
01924        unity_tester_lens_info_copy (&_tmp16_, &_tmp17_);
01925        *result = _tmp17_;
01926        block11_data_unref (_data11_);
01927        _data11_ = NULL;
01928        return;
01929 }
01930 
01931 
01932 static Block12Data* block12_data_ref (Block12Data* _data12_) {
01933        g_atomic_int_inc (&_data12_->_ref_count_);
01934        return _data12_;
01935 }
01936 
01937 
01938 static void block12_data_unref (void * _userdata_) {
01939        Block12Data* _data12_;
01940        _data12_ = (Block12Data*) _userdata_;
01941        if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
01942               _g_main_loop_unref0 (_data12_->ml);
01943               g_slice_free (Block12Data, _data12_);
01944        }
01945 }
01946 
01947 
01948 static void ___lambda24_ (Block12Data* _data12_) {
01949        GMainLoop* _tmp0_;
01950        _tmp0_ = _data12_->ml;
01951        g_main_loop_quit (_tmp0_);
01952 }
01953 
01954 
01955 static void ____lambda24__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
01956        ___lambda24_ (self);
01957 }
01958 
01959 
01960 void unity_tester_sync_model (DeeSharedModel* model) {
01961        g_return_if_fail (model != NULL);
01962        while (TRUE) {
01963               Block12Data* _data12_;
01964               DeeSharedModel* _tmp0_;
01965               gboolean _tmp1_ = FALSE;
01966               gboolean _tmp2_;
01967               GMainLoop* _tmp3_;
01968               DeeSharedModel* _tmp4_;
01969               gulong _tmp5_ = 0UL;
01970               gulong sig_id;
01971               GMainLoop* _tmp6_;
01972               DeeSharedModel* _tmp7_;
01973               gulong _tmp8_;
01974               _data12_ = g_slice_new0 (Block12Data);
01975               _data12_->_ref_count_ = 1;
01976               _tmp0_ = model;
01977               g_object_get (_tmp0_, "synchronized", &_tmp1_, NULL);
01978               _tmp2_ = _tmp1_;
01979               if (!(!_tmp2_)) {
01980                      block12_data_unref (_data12_);
01981                      _data12_ = NULL;
01982                      break;
01983               }
01984               _tmp3_ = g_main_loop_new (NULL, FALSE);
01985               _data12_->ml = _tmp3_;
01986               _tmp4_ = model;
01987               _tmp5_ = g_signal_connect_data ((GObject*) _tmp4_, "notify::synchronized", (GCallback) ____lambda24__g_object_notify, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
01988               sig_id = _tmp5_;
01989               _tmp6_ = _data12_->ml;
01990               g_main_loop_run (_tmp6_);
01991               _tmp7_ = model;
01992               _tmp8_ = sig_id;
01993               g_signal_handler_disconnect (_tmp7_, _tmp8_);
01994               block12_data_unref (_data12_);
01995               _data12_ = NULL;
01996        }
01997 }
01998 
01999 
02000 void unity_tester_dump_results_model (DeeModel* model) {
02001        DeeModel* _tmp0_;
02002        DeeModelIter* _tmp1_ = NULL;
02003        DeeModelIter* iter;
02004        DeeModel* _tmp2_;
02005        DeeModelIter* _tmp3_ = NULL;
02006        DeeModelIter* last_iter;
02007        g_return_if_fail (model != NULL);
02008        _tmp0_ = model;
02009        _tmp1_ = dee_model_get_first_iter (_tmp0_);
02010        iter = _tmp1_;
02011        _tmp2_ = model;
02012        _tmp3_ = dee_model_get_last_iter (_tmp2_);
02013        last_iter = _tmp3_;
02014        while (TRUE) {
02015               DeeModelIter* _tmp4_;
02016               DeeModelIter* _tmp5_;
02017               DeeModel* _tmp6_;
02018               DeeModelIter* _tmp7_;
02019               GVariant** _tmp8_;
02020               GVariant** _tmp9_ = NULL;
02021               GVariant** row;
02022               gint row_length1;
02023               gint _row_size_;
02024               GVariant** _tmp10_;
02025               gint _tmp10__length1;
02026               GVariant* _tmp11_;
02027               const gchar* _tmp12_ = NULL;
02028               GVariant** _tmp13_;
02029               gint _tmp13__length1;
02030               GVariant* _tmp14_;
02031               const gchar* _tmp15_ = NULL;
02032               GVariant** _tmp16_;
02033               gint _tmp16__length1;
02034               GVariant* _tmp17_;
02035               guint32 _tmp18_ = 0U;
02036               GVariant** _tmp19_;
02037               gint _tmp19__length1;
02038               GVariant* _tmp20_;
02039               const gchar* _tmp21_ = NULL;
02040               GVariant** _tmp22_;
02041               gint _tmp22__length1;
02042               GVariant* _tmp23_;
02043               const gchar* _tmp24_ = NULL;
02044               GVariant** _tmp25_;
02045               gint _tmp25__length1;
02046               GVariant* _tmp26_;
02047               const gchar* _tmp27_ = NULL;
02048               GVariant** _tmp28_;
02049               gint _tmp28__length1;
02050               GVariant* _tmp29_;
02051               const gchar* _tmp30_ = NULL;
02052               DeeModel* _tmp31_;
02053               DeeModelIter* _tmp32_;
02054               DeeModelIter* _tmp33_ = NULL;
02055               _tmp4_ = iter;
02056               _tmp5_ = last_iter;
02057               if (!(_tmp4_ != _tmp5_)) {
02058                      break;
02059               }
02060               _tmp6_ = model;
02061               _tmp7_ = iter;
02062               _tmp9_ = _tmp8_ = dee_model_get_row (_tmp6_, _tmp7_, NULL);
02063               row = _tmp9_;
02064               row_length1 = _vala_array_length (_tmp8_);
02065               _row_size_ = row_length1;
02066               _tmp10_ = row;
02067               _tmp10__length1 = row_length1;
02068               _tmp11_ = _tmp10_[0];
02069               _tmp12_ = g_variant_get_string (_tmp11_, NULL);
02070               _tmp13_ = row;
02071               _tmp13__length1 = row_length1;
02072               _tmp14_ = _tmp13_[1];
02073               _tmp15_ = g_variant_get_string (_tmp14_, NULL);
02074               _tmp16_ = row;
02075               _tmp16__length1 = row_length1;
02076               _tmp17_ = _tmp16_[2];
02077               _tmp18_ = g_variant_get_uint32 (_tmp17_);
02078               _tmp19_ = row;
02079               _tmp19__length1 = row_length1;
02080               _tmp20_ = _tmp19_[3];
02081               _tmp21_ = g_variant_get_string (_tmp20_, NULL);
02082               _tmp22_ = row;
02083               _tmp22__length1 = row_length1;
02084               _tmp23_ = _tmp22_[4];
02085               _tmp24_ = g_variant_get_string (_tmp23_, NULL);
02086               _tmp25_ = row;
02087               _tmp25__length1 = row_length1;
02088               _tmp26_ = _tmp25_[5];
02089               _tmp27_ = g_variant_get_string (_tmp26_, NULL);
02090               _tmp28_ = row;
02091               _tmp28__length1 = row_length1;
02092               _tmp29_ = _tmp28_[6];
02093               _tmp30_ = g_variant_get_string (_tmp29_, NULL);
02094               g_print ("%s\t%s\t%u\t%s\t%s\t%s\t%s\n", _tmp12_, _tmp15_, (guint) _tmp18_, _tmp21_, _tmp24_, _tmp27_, _tmp30_);
02095               _tmp31_ = model;
02096               _tmp32_ = iter;
02097               _tmp33_ = dee_model_next (_tmp31_, _tmp32_);
02098               iter = _tmp33_;
02099               row = (_vala_array_free (row, row_length1, (GDestroyNotify) g_variant_unref), NULL);
02100        }
02101 }
02102 
02103 
02104 static gchar* bool_to_string (gboolean self) {
02105        gchar* result = NULL;
02106        if (self) {
02107               gchar* _tmp0_;
02108               _tmp0_ = g_strdup ("true");
02109               result = _tmp0_;
02110               return result;
02111        } else {
02112               gchar* _tmp1_;
02113               _tmp1_ = g_strdup ("false");
02114               result = _tmp1_;
02115               return result;
02116        }
02117 }
02118 
02119 
02120 void unity_tester_dump_filters_model (DeeModel* model) {
02121        DeeModel* _tmp0_;
02122        DeeModelIter* _tmp1_ = NULL;
02123        DeeModelIter* iter;
02124        DeeModel* _tmp2_;
02125        DeeModelIter* _tmp3_ = NULL;
02126        DeeModelIter* last_iter;
02127        g_return_if_fail (model != NULL);
02128        _tmp0_ = model;
02129        _tmp1_ = dee_model_get_first_iter (_tmp0_);
02130        iter = _tmp1_;
02131        _tmp2_ = model;
02132        _tmp3_ = dee_model_get_last_iter (_tmp2_);
02133        last_iter = _tmp3_;
02134        while (TRUE) {
02135               DeeModelIter* _tmp4_;
02136               DeeModelIter* _tmp5_;
02137               DeeModel* _tmp6_;
02138               DeeModelIter* _tmp7_;
02139               GVariant** _tmp8_;
02140               GVariant** _tmp9_ = NULL;
02141               GVariant** row;
02142               gint row_length1;
02143               gint _row_size_;
02144               GVariant** _tmp10_;
02145               gint _tmp10__length1;
02146               GVariant* _tmp11_;
02147               const gchar* _tmp12_ = NULL;
02148               GVariant** _tmp13_;
02149               gint _tmp13__length1;
02150               GVariant* _tmp14_;
02151               const gchar* _tmp15_ = NULL;
02152               GVariant** _tmp16_;
02153               gint _tmp16__length1;
02154               GVariant* _tmp17_;
02155               const gchar* _tmp18_ = NULL;
02156               GVariant** _tmp19_;
02157               gint _tmp19__length1;
02158               GVariant* _tmp20_;
02159               const gchar* _tmp21_ = NULL;
02160               GVariant** _tmp22_;
02161               gint _tmp22__length1;
02162               GVariant* _tmp23_;
02163               gchar* _tmp24_ = NULL;
02164               gchar* _tmp25_;
02165               GVariant** _tmp26_;
02166               gint _tmp26__length1;
02167               GVariant* _tmp27_;
02168               gboolean _tmp28_ = FALSE;
02169               gchar* _tmp29_ = NULL;
02170               gchar* _tmp30_;
02171               GVariant** _tmp31_;
02172               gint _tmp31__length1;
02173               GVariant* _tmp32_;
02174               gboolean _tmp33_ = FALSE;
02175               gchar* _tmp34_ = NULL;
02176               gchar* _tmp35_;
02177               GVariant** _tmp36_;
02178               gint _tmp36__length1;
02179               GVariant* _tmp37_;
02180               gboolean _tmp38_ = FALSE;
02181               gchar* _tmp39_ = NULL;
02182               gchar* _tmp40_;
02183               DeeModel* _tmp41_;
02184               DeeModelIter* _tmp42_;
02185               DeeModelIter* _tmp43_ = NULL;
02186               _tmp4_ = iter;
02187               _tmp5_ = last_iter;
02188               if (!(_tmp4_ != _tmp5_)) {
02189                      break;
02190               }
02191               _tmp6_ = model;
02192               _tmp7_ = iter;
02193               _tmp9_ = _tmp8_ = dee_model_get_row (_tmp6_, _tmp7_, NULL);
02194               row = _tmp9_;
02195               row_length1 = _vala_array_length (_tmp8_);
02196               _row_size_ = row_length1;
02197               _tmp10_ = row;
02198               _tmp10__length1 = row_length1;
02199               _tmp11_ = _tmp10_[0];
02200               _tmp12_ = g_variant_get_string (_tmp11_, NULL);
02201               _tmp13_ = row;
02202               _tmp13__length1 = row_length1;
02203               _tmp14_ = _tmp13_[1];
02204               _tmp15_ = g_variant_get_string (_tmp14_, NULL);
02205               _tmp16_ = row;
02206               _tmp16__length1 = row_length1;
02207               _tmp17_ = _tmp16_[2];
02208               _tmp18_ = g_variant_get_string (_tmp17_, NULL);
02209               _tmp19_ = row;
02210               _tmp19__length1 = row_length1;
02211               _tmp20_ = _tmp19_[3];
02212               _tmp21_ = g_variant_get_string (_tmp20_, NULL);
02213               _tmp22_ = row;
02214               _tmp22__length1 = row_length1;
02215               _tmp23_ = _tmp22_[4];
02216               _tmp24_ = g_variant_print (_tmp23_, TRUE);
02217               _tmp25_ = _tmp24_;
02218               _tmp26_ = row;
02219               _tmp26__length1 = row_length1;
02220               _tmp27_ = _tmp26_[5];
02221               _tmp28_ = g_variant_get_boolean (_tmp27_);
02222               _tmp29_ = bool_to_string (_tmp28_);
02223               _tmp30_ = _tmp29_;
02224               _tmp31_ = row;
02225               _tmp31__length1 = row_length1;
02226               _tmp32_ = _tmp31_[6];
02227               _tmp33_ = g_variant_get_boolean (_tmp32_);
02228               _tmp34_ = bool_to_string (_tmp33_);
02229               _tmp35_ = _tmp34_;
02230               _tmp36_ = row;
02231               _tmp36__length1 = row_length1;
02232               _tmp37_ = _tmp36_[7];
02233               _tmp38_ = g_variant_get_boolean (_tmp37_);
02234               _tmp39_ = bool_to_string (_tmp38_);
02235               _tmp40_ = _tmp39_;
02236               g_print ("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", _tmp12_, _tmp15_, _tmp18_, _tmp21_, _tmp25_, _tmp30_, _tmp35_, _tmp40_);
02237               _g_free0 (_tmp40_);
02238               _g_free0 (_tmp35_);
02239               _g_free0 (_tmp30_);
02240               _g_free0 (_tmp25_);
02241               _tmp41_ = model;
02242               _tmp42_ = iter;
02243               _tmp43_ = dee_model_next (_tmp41_, _tmp42_);
02244               iter = _tmp43_;
02245               row = (_vala_array_free (row, row_length1, (GDestroyNotify) g_variant_unref), NULL);
02246        }
02247 }
02248 
02249 
02250 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
02251        if ((array != NULL) && (destroy_func != NULL)) {
02252               int i;
02253               for (i = 0; i < array_length; i = i + 1) {
02254                      if (((gpointer*) array)[i] != NULL) {
02255                             destroy_func (((gpointer*) array)[i]);
02256                      }
02257               }
02258        }
02259 }
02260 
02261 
02262 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
02263        _vala_array_destroy (array, array_length, destroy_func);
02264        g_free (array);
02265 }
02266 
02267 
02268 static gint _vala_array_length (gpointer array) {
02269        int length;
02270        length = 0;
02271        if (array) {
02272               while (((gpointer*) array)[length]) {
02273                      length++;
02274               }
02275        }
02276        return length;
02277 }
02278 
02279 
02280