Back to index

libunity  5.92.0
Classes | Defines | Typedefs | Functions | Variables
test-previews.c File Reference
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <unity-internal.h>
#include <dee.h>
#include <unity-protocol.h>
#include <stdlib.h>
#include <string.h>
#include <gobject/gvaluecollector.h>

Go to the source code of this file.

Classes

struct  _UnityTestPreviewSuite
struct  _UnityTestPreviewSuiteClass
struct  _Block1Data
struct  _UnityTestParamSpecPreviewSuite

Defines

#define UNITY_TEST_TYPE_PREVIEW_SUITE   (unity_test_preview_suite_get_type ())
#define UNITY_TEST_PREVIEW_SUITE(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TEST_TYPE_PREVIEW_SUITE, UnityTestPreviewSuite))
#define UNITY_TEST_PREVIEW_SUITE_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TEST_TYPE_PREVIEW_SUITE, UnityTestPreviewSuiteClass))
#define UNITY_TEST_IS_PREVIEW_SUITE(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TEST_TYPE_PREVIEW_SUITE))
#define UNITY_TEST_IS_PREVIEW_SUITE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TEST_TYPE_PREVIEW_SUITE))
#define UNITY_TEST_PREVIEW_SUITE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TEST_TYPE_PREVIEW_SUITE, UnityTestPreviewSuiteClass))
#define _g_free0(var)   (var = (g_free (var), NULL))
#define _g_variant_unref0(var)   ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_object_unref0(var)   ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _vala_assert(expr, msg)   if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

Typedefs

typedef struct _UnityTestPreviewSuite
typedef struct _UnityTestPreviewSuiteClass
typedef struct _UnityTestPreviewSuitePrivate
typedef struct _Block1Data
typedef struct _UnityTestParamSpecPreviewSuite

Functions

gpointer unity_test_preview_suite_ref (gpointer instance)
void unity_test_preview_suite_unref (gpointer instance)
GParamSpec * unity_test_param_spec_preview_suite (const gchar *name, const gchar *nick, const gchar *blurb, GType object_type, GParamFlags flags)
void unity_test_value_set_preview_suite (GValue *value, gpointer v_object)
void unity_test_value_take_preview_suite (GValue *value, gpointer v_object)
gpointer unity_test_value_get_preview_suite (const GValue *value)
GType unity_test_preview_suite_get_type (void)
UnityTestPreviewSuite * unity_test_preview_suite_new (void)
UnityTestPreviewSuite * unity_test_preview_suite_construct (GType object_type)
static void unity_test_preview_suite_test_preview_generic (void)
static void _unity_test_preview_suite_test_preview_generic_gtest_data_func (gpointer self)
static void unity_test_preview_suite_test_preview_generic_with_metadata (void)
static void _unity_test_preview_suite_test_preview_generic_with_metadata_gtest_data_func (gpointer self)
static void unity_test_preview_suite_test_preview_application (void)
static void _unity_test_preview_suite_test_preview_application_gtest_data_func (gpointer self)
static void unity_test_preview_suite_test_preview_music (void)
static void _unity_test_preview_suite_test_preview_music_gtest_data_func (gpointer self)
static void unity_test_preview_suite_test_preview_music_with_tracks (void)
static void _unity_test_preview_suite_test_preview_music_with_tracks_gtest_data_func (gpointer self)
static void unity_test_preview_suite_test_preview_movie (void)
static void _unity_test_preview_suite_test_preview_movie_gtest_data_func (gpointer self)
static void unity_test_preview_suite_test_preview_series (void)
static void _unity_test_preview_suite_test_preview_series_gtest_data_func (gpointer self)
static void unity_test_preview_suite_test_preview_series_with_items (void)
static void _unity_test_preview_suite_test_preview_series_with_items_gtest_data_func (gpointer self)
static gboolean unity_test_preview_suite_previews_equal (GVariant *data, GVariant *data2)
static Block1Data * block1_data_ref (Block1Data *_data1_)
static void block1_data_unref (void *_userdata_)
static UnityPreview * __lambda2_ (Block1Data *_data1_)
static UnityPreview * ___lambda2__unity_series_preview_request_item_preview (UnitySeriesPreview *_sender, const gchar *uri, gpointer self)
static void unity_test_preview_suite_finalize (UnityTestPreviewSuite *obj)
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func)
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func)
static gpointer _g_object_ref0 (gpointer self)
static void unity_test_value_preview_suite_init (GValue *value)
static void unity_test_value_preview_suite_free_value (GValue *value)
static void unity_test_value_preview_suite_copy_value (const GValue *src_value, GValue *dest_value)
static gpointer unity_test_value_preview_suite_peek_pointer (const GValue *value)
static gchar * unity_test_value_preview_suite_collect_value (GValue *value, guint n_collect_values, GTypeCValue *collect_values, guint collect_flags)
static gchar * unity_test_value_preview_suite_lcopy_value (const GValue *value, guint n_collect_values, GTypeCValue *collect_values, guint collect_flags)
static void unity_test_preview_suite_class_init (UnityTestPreviewSuiteClass *klass)
static void unity_test_preview_suite_instance_init (UnityTestPreviewSuite *self)

Variables

static gpointer unity_test_preview_suite_parent_class = NULL

Class Documentation

struct _UnityTestPreviewSuite

Definition at line 52 of file test-previews.c.

Class Members
GTypeInstance parent_instance
UnityTestPreviewSuitePrivate * priv
volatile int ref_count
struct _Block1Data

Definition at line 224 of file protocol-previews.c.

Class Members
gpointer _async_data_
int _ref_count_
UnityProtocolApplicationPreview * _result_
Mpris2Controller * contr
Mpris2Controller * controller
gchar * desc
gboolean got_generate_preview_signal
gboolean got_search_changed
GMainLoop * ml
UnityScopeProxy * scope
UnityLensImpl * self
gboolean timeout_reached
gchar * title
gboolean was_changed
struct _UnityTestParamSpecPreviewSuite

Definition at line 70 of file test-previews.c.

Class Members
GParamSpec parent_instance

Define Documentation

#define _g_free0 (   var)    (var = (g_free (var), NULL))

Definition at line 45 of file test-previews.c.

#define _g_object_unref0 (   var)    ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

Definition at line 47 of file test-previews.c.

#define _g_variant_unref0 (   var)    ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

Definition at line 46 of file test-previews.c.

#define _vala_assert (   expr,
  msg 
)    if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

Definition at line 50 of file test-previews.c.

#define UNITY_TEST_IS_PREVIEW_SUITE (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TEST_TYPE_PREVIEW_SUITE))

Definition at line 38 of file test-previews.c.

#define UNITY_TEST_IS_PREVIEW_SUITE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TEST_TYPE_PREVIEW_SUITE))

Definition at line 39 of file test-previews.c.

#define UNITY_TEST_PREVIEW_SUITE (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TEST_TYPE_PREVIEW_SUITE, UnityTestPreviewSuite))

Definition at line 36 of file test-previews.c.

#define UNITY_TEST_PREVIEW_SUITE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TEST_TYPE_PREVIEW_SUITE, UnityTestPreviewSuiteClass))

Definition at line 37 of file test-previews.c.

#define UNITY_TEST_PREVIEW_SUITE_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TEST_TYPE_PREVIEW_SUITE, UnityTestPreviewSuiteClass))

Definition at line 40 of file test-previews.c.

Definition at line 35 of file test-previews.c.


Typedef Documentation

typedef struct _Block1Data

Definition at line 48 of file test-previews.c.

Definition at line 49 of file test-previews.c.

typedef struct _UnityTestPreviewSuite

Definition at line 42 of file test-previews.c.

Definition at line 43 of file test-previews.c.

Definition at line 44 of file test-previews.c.


Function Documentation

static UnityPreview * ___lambda2__unity_series_preview_request_item_preview ( UnitySeriesPreview *  _sender,
const gchar *  uri,
gpointer  self 
) [static]

Definition at line 828 of file test-previews.c.

                                                                                                                                          {
       UnityPreview* result;
       result = __lambda2_ (self);
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static UnityPreview * __lambda2_ ( Block1Data *  _data1_) [static]

Definition at line 818 of file test-previews.c.

                                                      {
       UnityPreview* result = NULL;
       UnityGenericPreview* _tmp0_;
       _data1_->got_generate_preview_signal = TRUE;
       _tmp0_ = unity_generic_preview_new (_data1_->title, _data1_->desc, NULL);
       result = (UnityPreview*) _tmp0_;
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static gpointer _g_object_ref0 ( gpointer  self) [static]

Definition at line 813 of file test-previews.c.

                                               {
       return self ? g_object_ref (self) : NULL;
}

Here is the caller graph for this function:

Definition at line 125 of file test-previews.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void _unity_test_preview_suite_test_preview_generic_gtest_data_func ( gpointer  self) [static]

Definition at line 115 of file test-previews.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 120 of file test-previews.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void _unity_test_preview_suite_test_preview_movie_gtest_data_func ( gpointer  self) [static]

Definition at line 140 of file test-previews.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void _unity_test_preview_suite_test_preview_music_gtest_data_func ( gpointer  self) [static]

Definition at line 130 of file test-previews.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 135 of file test-previews.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void _unity_test_preview_suite_test_preview_series_gtest_data_func ( gpointer  self) [static]

Definition at line 145 of file test-previews.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 150 of file test-previews.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void _vala_array_destroy ( gpointer  array,
gint  array_length,
GDestroyNotify  destroy_func 
) [static]

Definition at line 1105 of file test-previews.c.

                                                                                                 {
       if ((array != NULL) && (destroy_func != NULL)) {
              int i;
              for (i = 0; i < array_length; i = i + 1) {
                     if (((gpointer*) array)[i] != NULL) {
                            destroy_func (((gpointer*) array)[i]);
                     }
              }
       }
}

Here is the caller graph for this function:

static void _vala_array_free ( gpointer  array,
gint  array_length,
GDestroyNotify  destroy_func 
) [static]

Definition at line 1117 of file test-previews.c.

                                                                                              {
       _vala_array_destroy (array, array_length, destroy_func);
       g_free (array);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static Block1Data * block1_data_ref ( Block1Data *  _data1_) [static]

Definition at line 796 of file test-previews.c.

                                                         {
       g_atomic_int_inc (&_data1_->_ref_count_);
       return _data1_;
}

Here is the caller graph for this function:

static void block1_data_unref ( void *  _userdata_) [static]

Definition at line 802 of file test-previews.c.

                                                  {
       Block1Data* _data1_;
       _data1_ = (Block1Data*) _userdata_;
       if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
              _g_free0 (_data1_->desc);
              _g_free0 (_data1_->title);
              g_slice_free (Block1Data, _data1_);
       }
}

Here is the caller graph for this function:

GParamSpec * unity_test_param_spec_preview_suite ( const gchar *  name,
const gchar *  nick,
const gchar *  blurb,
GType  object_type,
GParamFlags  flags 
)

Definition at line 1006 of file test-previews.c.

                                                                                                                                                 {
       UnityTestParamSpecPreviewSuite* spec;
       g_return_val_if_fail (g_type_is_a (object_type, UNITY_TEST_TYPE_PREVIEW_SUITE), NULL);
       spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
       G_PARAM_SPEC (spec)->value_type = object_type;
       return G_PARAM_SPEC (spec);
}
static void unity_test_preview_suite_class_init ( UnityTestPreviewSuiteClass *  klass) [static]

Definition at line 1056 of file test-previews.c.

Here is the call graph for this function:

UnityTestPreviewSuite * unity_test_preview_suite_construct ( GType  object_type)

Definition at line 155 of file test-previews.c.

                                                                              {
       UnityTestPreviewSuite* self = NULL;
       self = (UnityTestPreviewSuite*) g_type_create_instance (object_type);
       g_test_add_data_func ("/Unit/Preview/GenericPreview", NULL, _unity_test_preview_suite_test_preview_generic_gtest_data_func);
       g_test_add_data_func ("/Unit/Preview/GenericPreview/WithMetadata", NULL, _unity_test_preview_suite_test_preview_generic_with_metadata_gtest_data_func);
       g_test_add_data_func ("/Unit/Preview/ApplicationPreview", NULL, _unity_test_preview_suite_test_preview_application_gtest_data_func);
       g_test_add_data_func ("/Unit/Preview/MusicPreview", NULL, _unity_test_preview_suite_test_preview_music_gtest_data_func);
       g_test_add_data_func ("/Unit/Preview/MusicPreview/WithTracks", NULL, _unity_test_preview_suite_test_preview_music_with_tracks_gtest_data_func);
       g_test_add_data_func ("/Unit/Preview/MoviePreview", NULL, _unity_test_preview_suite_test_preview_movie_gtest_data_func);
       g_test_add_data_func ("/Unit/Preview/SeriesPreview", NULL, _unity_test_preview_suite_test_preview_series_gtest_data_func);
       g_test_add_data_func ("/Unit/Preview/SeriesPreview/WithItems", NULL, _unity_test_preview_suite_test_preview_series_with_items_gtest_data_func);
       return self;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_test_preview_suite_finalize ( UnityTestPreviewSuite *  obj) [static]

Definition at line 1067 of file test-previews.c.

                                                                           {
       UnityTestPreviewSuite * self;
       self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TEST_TYPE_PREVIEW_SUITE, UnityTestPreviewSuite);
}

Here is the caller graph for this function:

Definition at line 83 of file test-previews.c.

      {
       UNITY_TEST_PREVIEW_SUITE_DUMMY_PROPERTY
};
static void unity_test_preview_suite_instance_init ( UnityTestPreviewSuite *  self) [static]

Definition at line 1062 of file test-previews.c.

                                                                                  {
       self->ref_count = 1;
}
UnityTestPreviewSuite * unity_test_preview_suite_new ( void  )

Definition at line 170 of file test-previews.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean unity_test_preview_suite_previews_equal ( GVariant *  data,
GVariant *  data2 
) [static]

Definition at line 175 of file test-previews.c.

                                                                                          {
       gboolean result = FALSE;
       GVariant* _tmp0_;
       GVariant* _tmp1_;
       gboolean _tmp2_ = FALSE;
       g_return_val_if_fail (data != NULL, FALSE);
       g_return_val_if_fail (data2 != NULL, FALSE);
       _tmp0_ = data;
       _tmp1_ = data2;
       _tmp2_ = g_variant_equal (_tmp0_, _tmp1_);
       if (!_tmp2_) {
              GVariant* _tmp3_;
              gchar* _tmp4_ = NULL;
              gchar* _tmp5_;
              GVariant* _tmp6_;
              gchar* _tmp7_ = NULL;
              gchar* _tmp8_;
              _tmp3_ = data;
              _tmp4_ = g_variant_print (_tmp3_, TRUE);
              _tmp5_ = _tmp4_;
              _tmp6_ = data2;
              _tmp7_ = g_variant_print (_tmp6_, TRUE);
              _tmp8_ = _tmp7_;
              g_warning ("test-previews.vala:50: Reconstructed variant doesn't match:\n" \
"%s\n" \
"\n" \
"%s", _tmp5_, _tmp8_);
              _g_free0 (_tmp8_);
              _g_free0 (_tmp5_);
              result = FALSE;
              return result;
       }
       result = TRUE;
       return result;
}

Here is the caller graph for this function:

gpointer unity_test_preview_suite_ref ( gpointer  instance)

Definition at line 1087 of file test-previews.c.

                                                          {
       UnityTestPreviewSuite* self;
       self = instance;
       g_atomic_int_inc (&self->ref_count);
       return instance;
}

Here is the caller graph for this function:

static void unity_test_preview_suite_test_preview_application ( void  ) [static]

Definition at line 395 of file test-previews.c.

                                                                     {
       GThemedIcon* _tmp0_;
       GThemedIcon* app_icon;
       UnityApplicationPreview* _tmp1_;
       UnityApplicationPreview* preview;
       GVariant* _tmp2_ = NULL;
       GVariant* data;
       UnityProtocolPreview* _tmp3_ = NULL;
       UnityProtocolApplicationPreview* reconstructed;
       const gchar* _tmp4_;
       const gchar* _tmp5_;
       const gchar* _tmp6_;
       const gchar* _tmp7_;
       const gchar* _tmp8_;
       const gchar* _tmp9_;
       const gchar* _tmp10_;
       const gchar* _tmp11_;
       GIcon* _tmp12_;
       GIcon* _tmp13_;
       GIcon* _tmp14_;
       GIcon* _tmp15_;
       gboolean _tmp16_ = FALSE;
       GIcon* _tmp17_;
       GIcon* _tmp18_;
       gboolean _tmp19_ = FALSE;
       const gchar* _tmp20_;
       const gchar* _tmp21_;
       const gchar* _tmp22_;
       const gchar* _tmp23_;
       const gchar* _tmp24_;
       const gchar* _tmp25_;
       const gchar* _tmp26_;
       const gchar* _tmp27_;
       const gchar* _tmp28_;
       const gchar* _tmp29_;
       const gchar* _tmp30_;
       const gchar* _tmp31_;
       GVariant* _tmp32_ = NULL;
       GVariant* _tmp33_;
       gboolean _tmp34_ = FALSE;
       _tmp0_ = (GThemedIcon*) g_themed_icon_new ("gedit");
       app_icon = _tmp0_;
       _tmp1_ = unity_application_preview_new ("A title", "subtitle", "Description", (GIcon*) app_icon, NULL);
       preview = _tmp1_;
       _tmp2_ = dee_serializable_serialize ((DeeSerializable*) preview);
       data = _tmp2_;
       _tmp3_ = unity_protocol_preview_parse (data);
       reconstructed = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, UNITY_PROTOCOL_TYPE_APPLICATION_PREVIEW) ? ((UnityProtocolApplicationPreview*) _tmp3_) : NULL;
       _tmp4_ = unity_preview_get_title ((UnityPreview*) preview);
       _tmp5_ = _tmp4_;
       _tmp6_ = unity_protocol_preview_get_title ((UnityProtocolPreview*) reconstructed);
       _tmp7_ = _tmp6_;
       _vala_assert (g_strcmp0 (_tmp5_, _tmp7_) == 0, "preview.title == reconstructed.title");
       _tmp8_ = unity_preview_get_description_markup ((UnityPreview*) preview);
       _tmp9_ = _tmp8_;
       _tmp10_ = unity_protocol_preview_get_description ((UnityProtocolPreview*) reconstructed);
       _tmp11_ = _tmp10_;
       _vala_assert (g_strcmp0 (_tmp9_, _tmp11_) == 0, "preview.description_markup == reconstructed.description");
       _tmp12_ = unity_preview_get_thumbnail ((UnityPreview*) preview);
       _tmp13_ = _tmp12_;
       _tmp14_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp15_ = _tmp14_;
       _tmp16_ = g_icon_equal (_tmp13_, _tmp15_);
       _vala_assert (_tmp16_, "preview.thumbnail.equal (reconstructed.thumbnail)");
       _tmp17_ = unity_protocol_application_preview_get_app_icon (reconstructed);
       _tmp18_ = _tmp17_;
       _tmp19_ = g_icon_equal ((GIcon*) app_icon, _tmp18_);
       _vala_assert (_tmp19_, "app_icon.equal (reconstructed.app_icon)");
       _tmp20_ = unity_application_preview_get_last_update (preview);
       _tmp21_ = _tmp20_;
       _tmp22_ = unity_protocol_application_preview_get_last_update (reconstructed);
       _tmp23_ = _tmp22_;
       _vala_assert (g_strcmp0 (_tmp21_, _tmp23_) == 0, "preview.last_update == reconstructed.last_update");
       _tmp24_ = unity_application_preview_get_copyright (preview);
       _tmp25_ = _tmp24_;
       _tmp26_ = unity_protocol_application_preview_get_copyright (reconstructed);
       _tmp27_ = _tmp26_;
       _vala_assert (g_strcmp0 (_tmp25_, _tmp27_) == 0, "preview.copyright == reconstructed.copyright");
       _tmp28_ = unity_application_preview_get_license (preview);
       _tmp29_ = _tmp28_;
       _tmp30_ = unity_protocol_application_preview_get_license (reconstructed);
       _tmp31_ = _tmp30_;
       _vala_assert (g_strcmp0 (_tmp29_, _tmp31_) == 0, "preview.license == reconstructed.license");
       _tmp32_ = dee_serializable_serialize ((DeeSerializable*) reconstructed);
       _tmp33_ = _tmp32_;
       _tmp34_ = unity_test_preview_suite_previews_equal (data, _tmp33_);
       _vala_assert (_tmp34_, "previews_equal (data, reconstructed.serialize ())");
       _g_variant_unref0 (_tmp33_);
       _g_object_unref0 (reconstructed);
       _g_variant_unref0 (data);
       _g_object_unref0 (preview);
       _g_object_unref0 (app_icon);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_test_preview_suite_test_preview_generic ( void  ) [static]

Definition at line 212 of file test-previews.c.

                                                                 {
       GThemedIcon* _tmp0_;
       GThemedIcon* thumbnail;
       UnityGenericPreview* _tmp1_;
       UnityGenericPreview* preview;
       GVariant* _tmp2_ = NULL;
       GVariant* data;
       UnityProtocolPreview* _tmp3_ = NULL;
       UnityProtocolGenericPreview* reconstructed;
       const gchar* _tmp4_;
       const gchar* _tmp5_;
       const gchar* _tmp6_;
       const gchar* _tmp7_;
       const gchar* _tmp8_;
       const gchar* _tmp9_;
       const gchar* _tmp10_;
       const gchar* _tmp11_;
       GIcon* _tmp12_;
       GIcon* _tmp13_;
       GIcon* _tmp14_;
       GIcon* _tmp15_;
       gboolean _tmp16_ = FALSE;
       GVariant* _tmp17_ = NULL;
       GVariant* _tmp18_;
       gboolean _tmp19_ = FALSE;
       _tmp0_ = (GThemedIcon*) g_themed_icon_new ("internet");
       thumbnail = _tmp0_;
       _tmp1_ = unity_generic_preview_new ("A title", "Description", (GIcon*) thumbnail);
       preview = _tmp1_;
       _tmp2_ = dee_serializable_serialize ((DeeSerializable*) preview);
       data = _tmp2_;
       _tmp3_ = unity_protocol_preview_parse (data);
       reconstructed = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, UNITY_PROTOCOL_TYPE_GENERIC_PREVIEW) ? ((UnityProtocolGenericPreview*) _tmp3_) : NULL;
       _tmp4_ = unity_preview_get_title ((UnityPreview*) preview);
       _tmp5_ = _tmp4_;
       _tmp6_ = unity_protocol_preview_get_title ((UnityProtocolPreview*) reconstructed);
       _tmp7_ = _tmp6_;
       _vala_assert (g_strcmp0 (_tmp5_, _tmp7_) == 0, "preview.title == reconstructed.title");
       _tmp8_ = unity_preview_get_description_markup ((UnityPreview*) preview);
       _tmp9_ = _tmp8_;
       _tmp10_ = unity_protocol_preview_get_description ((UnityProtocolPreview*) reconstructed);
       _tmp11_ = _tmp10_;
       _vala_assert (g_strcmp0 (_tmp9_, _tmp11_) == 0, "preview.description_markup == reconstructed.description");
       _tmp12_ = unity_preview_get_thumbnail ((UnityPreview*) preview);
       _tmp13_ = _tmp12_;
       _tmp14_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp15_ = _tmp14_;
       _tmp16_ = g_icon_equal (_tmp13_, _tmp15_);
       _vala_assert (_tmp16_, "preview.thumbnail.equal (reconstructed.thumbnail)");
       _tmp17_ = dee_serializable_serialize ((DeeSerializable*) reconstructed);
       _tmp18_ = _tmp17_;
       _tmp19_ = unity_test_preview_suite_previews_equal (data, _tmp18_);
       _vala_assert (_tmp19_, "previews_equal (data, reconstructed.serialize ())");
       _g_variant_unref0 (_tmp18_);
       _g_object_unref0 (reconstructed);
       _g_variant_unref0 (data);
       _g_object_unref0 (preview);
       _g_object_unref0 (thumbnail);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 273 of file test-previews.c.

                                                                               {
       GThemedIcon* _tmp0_;
       GThemedIcon* thumbnail;
       UnityGenericPreview* _tmp1_;
       UnityGenericPreview* preview;
       UnityPreviewAction* _tmp2_;
       UnityPreviewAction* _tmp3_;
       UnityInfoHint* _tmp4_;
       UnityInfoHint* _tmp5_;
       GVariant* _tmp6_ = NULL;
       GVariant* data;
       UnityProtocolPreview* _tmp7_ = NULL;
       UnityProtocolGenericPreview* reconstructed;
       const gchar* _tmp8_;
       const gchar* _tmp9_;
       const gchar* _tmp10_;
       const gchar* _tmp11_;
       const gchar* _tmp12_;
       const gchar* _tmp13_;
       const gchar* _tmp14_;
       const gchar* _tmp15_;
       const gchar* _tmp16_;
       const gchar* _tmp17_;
       const gchar* _tmp18_;
       const gchar* _tmp19_;
       GIcon* _tmp20_;
       GIcon* _tmp21_;
       GIcon* _tmp22_;
       GIcon* _tmp23_;
       gboolean _tmp24_ = FALSE;
       gint _tmp25_ = 0;
       UnityProtocolPreviewActionRaw* _tmp26_ = NULL;
       gint _tmp27_ = 0;
       UnityProtocolPreviewActionRaw* _tmp28_ = NULL;
       UnityProtocolPreviewActionRaw _tmp29_;
       UnityProtocolPreviewActionRaw _tmp30_ = {0};
       UnityProtocolPreviewActionRaw action;
       UnityProtocolPreviewActionRaw _tmp31_;
       const gchar* _tmp32_;
       gint _tmp33_ = 0;
       UnityProtocolInfoHintRaw* _tmp34_ = NULL;
       gint _tmp35_ = 0;
       UnityProtocolInfoHintRaw* _tmp36_ = NULL;
       UnityProtocolInfoHintRaw _tmp37_;
       UnityProtocolInfoHintRaw _tmp38_ = {0};
       UnityProtocolInfoHintRaw hint;
       UnityProtocolInfoHintRaw _tmp39_;
       const gchar* _tmp40_;
       GVariant* _tmp41_ = NULL;
       GVariant* _tmp42_;
       gboolean _tmp43_ = FALSE;
       _tmp0_ = (GThemedIcon*) g_themed_icon_new ("internet");
       thumbnail = _tmp0_;
       _tmp1_ = unity_generic_preview_new ("A title", "Description", (GIcon*) thumbnail);
       preview = _tmp1_;
       unity_preview_set_subtitle ((UnityPreview*) preview, "subtitle");
       _tmp2_ = unity_preview_action_new ("action1", "Do stuff!", NULL);
       _tmp3_ = _tmp2_;
       unity_preview_add_action ((UnityPreview*) preview, _tmp3_);
       _g_object_unref0 (_tmp3_);
       _tmp4_ = unity_info_hint_new ("hint1", "Hint", NULL, "Hint value");
       g_object_ref_sink (_tmp4_);
       _tmp5_ = _tmp4_;
       unity_preview_add_info ((UnityPreview*) preview, _tmp5_);
       _g_object_unref0 (_tmp5_);
       _tmp6_ = dee_serializable_serialize ((DeeSerializable*) preview);
       data = _tmp6_;
       _tmp7_ = unity_protocol_preview_parse (data);
       reconstructed = G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, UNITY_PROTOCOL_TYPE_GENERIC_PREVIEW) ? ((UnityProtocolGenericPreview*) _tmp7_) : NULL;
       _tmp8_ = unity_preview_get_title ((UnityPreview*) preview);
       _tmp9_ = _tmp8_;
       _tmp10_ = unity_protocol_preview_get_title ((UnityProtocolPreview*) reconstructed);
       _tmp11_ = _tmp10_;
       _vala_assert (g_strcmp0 (_tmp9_, _tmp11_) == 0, "preview.title == reconstructed.title");
       _tmp12_ = unity_preview_get_subtitle ((UnityPreview*) preview);
       _tmp13_ = _tmp12_;
       _tmp14_ = unity_protocol_preview_get_subtitle ((UnityProtocolPreview*) reconstructed);
       _tmp15_ = _tmp14_;
       _vala_assert (g_strcmp0 (_tmp13_, _tmp15_) == 0, "preview.subtitle == reconstructed.subtitle");
       _tmp16_ = unity_preview_get_description_markup ((UnityPreview*) preview);
       _tmp17_ = _tmp16_;
       _tmp18_ = unity_protocol_preview_get_description ((UnityProtocolPreview*) reconstructed);
       _tmp19_ = _tmp18_;
       _vala_assert (g_strcmp0 (_tmp17_, _tmp19_) == 0, "preview.description_markup == reconstructed.description");
       _tmp20_ = unity_preview_get_thumbnail ((UnityPreview*) preview);
       _tmp21_ = _tmp20_;
       _tmp22_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp23_ = _tmp22_;
       _tmp24_ = g_icon_equal (_tmp21_, _tmp23_);
       _vala_assert (_tmp24_, "preview.thumbnail.equal (reconstructed.thumbnail)");
       _tmp26_ = unity_protocol_preview_get_actions ((UnityProtocolPreview*) reconstructed, &_tmp25_);
       _vala_assert (_tmp25_ == 1, "reconstructed.get_actions().length == 1");
       _tmp28_ = unity_protocol_preview_get_actions ((UnityProtocolPreview*) reconstructed, &_tmp27_);
       _tmp29_ = _tmp28_[0];
       unity_protocol_preview_action_raw_copy (&_tmp29_, &_tmp30_);
       action = _tmp30_;
       _tmp31_ = action;
       _tmp32_ = _tmp31_.id;
       _vala_assert (g_strcmp0 (_tmp32_, "action1") == 0, "action.id == \"action1\"");
       _tmp34_ = unity_protocol_preview_get_info_hints ((UnityProtocolPreview*) reconstructed, &_tmp33_);
       _vala_assert (_tmp33_ == 1, "reconstructed.get_info_hints().length == 1");
       _tmp36_ = unity_protocol_preview_get_info_hints ((UnityProtocolPreview*) reconstructed, &_tmp35_);
       _tmp37_ = _tmp36_[0];
       unity_protocol_info_hint_raw_copy (&_tmp37_, &_tmp38_);
       hint = _tmp38_;
       _tmp39_ = hint;
       _tmp40_ = _tmp39_.id;
       _vala_assert (g_strcmp0 (_tmp40_, "hint1") == 0, "hint.id == \"hint1\"");
       _tmp41_ = dee_serializable_serialize ((DeeSerializable*) reconstructed);
       _tmp42_ = _tmp41_;
       _tmp43_ = unity_test_preview_suite_previews_equal (data, _tmp42_);
       _vala_assert (_tmp43_, "previews_equal (data, reconstructed.serialize ())");
       _g_variant_unref0 (_tmp42_);
       unity_protocol_info_hint_raw_destroy (&hint);
       unity_protocol_preview_action_raw_destroy (&action);
       _g_object_unref0 (reconstructed);
       _g_variant_unref0 (data);
       _g_object_unref0 (preview);
       _g_object_unref0 (thumbnail);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_test_preview_suite_test_preview_movie ( void  ) [static]

Definition at line 653 of file test-previews.c.

                                                               {
       GFile* _tmp0_ = NULL;
       GFile* _tmp1_;
       GFileIcon* _tmp2_;
       GFileIcon* _tmp3_;
       GFileIcon* artwork;
       UnityMoviePreview* _tmp4_;
       UnityMoviePreview* preview;
       GVariant* _tmp5_ = NULL;
       GVariant* data;
       UnityProtocolPreview* _tmp6_ = NULL;
       UnityProtocolMoviePreview* reconstructed;
       const gchar* _tmp7_;
       const gchar* _tmp8_;
       const gchar* _tmp9_;
       const gchar* _tmp10_;
       const gchar* _tmp11_;
       const gchar* _tmp12_;
       const gchar* _tmp13_;
       const gchar* _tmp14_;
       const gchar* _tmp15_;
       const gchar* _tmp16_;
       const gchar* _tmp17_;
       const gchar* _tmp18_;
       GIcon* _tmp19_;
       GIcon* _tmp20_;
       GIcon* _tmp21_;
       GIcon* _tmp22_;
       gboolean _tmp23_ = FALSE;
       GIcon* _tmp24_;
       GIcon* _tmp25_;
       gboolean _tmp26_ = FALSE;
       guint _tmp27_;
       guint _tmp28_;
       const gchar* _tmp29_;
       const gchar* _tmp30_;
       GVariant* _tmp31_ = NULL;
       GVariant* _tmp32_;
       gboolean _tmp33_ = FALSE;
       _tmp0_ = g_file_new_for_path ("/usr/share/icons/my_favourite_movie.png");
       _tmp1_ = _tmp0_;
       _tmp2_ = (GFileIcon*) g_file_icon_new (_tmp1_);
       _tmp3_ = _tmp2_;
       _g_object_unref0 (_tmp1_);
       artwork = _tmp3_;
       _tmp4_ = unity_movie_preview_new ("Movie!", "The favourite", "It really is", (GIcon*) artwork);
       preview = _tmp4_;
       unity_movie_preview_set_year (preview, "2012");
       unity_movie_preview_set_rating (preview, 4.3f, (guint) 12);
       _tmp5_ = dee_serializable_serialize ((DeeSerializable*) preview);
       data = _tmp5_;
       _tmp6_ = unity_protocol_preview_parse (data);
       reconstructed = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, UNITY_PROTOCOL_TYPE_MOVIE_PREVIEW) ? ((UnityProtocolMoviePreview*) _tmp6_) : NULL;
       _tmp7_ = unity_preview_get_title ((UnityPreview*) preview);
       _tmp8_ = _tmp7_;
       _tmp9_ = unity_protocol_preview_get_title ((UnityProtocolPreview*) reconstructed);
       _tmp10_ = _tmp9_;
       _vala_assert (g_strcmp0 (_tmp8_, _tmp10_) == 0, "preview.title == reconstructed.title");
       _tmp11_ = unity_preview_get_subtitle ((UnityPreview*) preview);
       _tmp12_ = _tmp11_;
       _tmp13_ = unity_protocol_preview_get_subtitle ((UnityProtocolPreview*) reconstructed);
       _tmp14_ = _tmp13_;
       _vala_assert (g_strcmp0 (_tmp12_, _tmp14_) == 0, "preview.subtitle == reconstructed.subtitle");
       _tmp15_ = unity_preview_get_description_markup ((UnityPreview*) preview);
       _tmp16_ = _tmp15_;
       _tmp17_ = unity_protocol_preview_get_description ((UnityProtocolPreview*) reconstructed);
       _tmp18_ = _tmp17_;
       _vala_assert (g_strcmp0 (_tmp16_, _tmp18_) == 0, "preview.description_markup == reconstructed.description");
       _tmp19_ = unity_preview_get_thumbnail ((UnityPreview*) preview);
       _tmp20_ = _tmp19_;
       _tmp21_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp22_ = _tmp21_;
       _tmp23_ = g_icon_equal (_tmp20_, _tmp22_);
       _vala_assert (_tmp23_, "preview.thumbnail.equal (reconstructed.thumbnail)");
       _tmp24_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp25_ = _tmp24_;
       _tmp26_ = g_icon_equal ((GIcon*) artwork, _tmp25_);
       _vala_assert (_tmp26_, "artwork.equal (reconstructed.thumbnail)");
       _tmp27_ = unity_protocol_movie_preview_get_num_ratings (reconstructed);
       _tmp28_ = _tmp27_;
       _vala_assert (_tmp28_ == ((guint) 12), "reconstructed.num_ratings == 12");
       _tmp29_ = unity_protocol_movie_preview_get_year (reconstructed);
       _tmp30_ = _tmp29_;
       _vala_assert (g_strcmp0 (_tmp30_, "2012") == 0, "reconstructed.year == \"2012\"");
       _tmp31_ = dee_serializable_serialize ((DeeSerializable*) reconstructed);
       _tmp32_ = _tmp31_;
       _tmp33_ = unity_test_preview_suite_previews_equal (data, _tmp32_);
       _vala_assert (_tmp33_, "previews_equal (data, reconstructed.serialize ())");
       _g_variant_unref0 (_tmp32_);
       _g_object_unref0 (reconstructed);
       _g_variant_unref0 (data);
       _g_object_unref0 (preview);
       _g_object_unref0 (artwork);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_test_preview_suite_test_preview_music ( void  ) [static]

Definition at line 490 of file test-previews.c.

                                                               {
       GFile* _tmp0_ = NULL;
       GFile* _tmp1_;
       GFileIcon* _tmp2_;
       GFileIcon* _tmp3_;
       GFileIcon* artwork;
       UnityMusicPreview* _tmp4_;
       UnityMusicPreview* preview;
       GVariant* _tmp5_ = NULL;
       GVariant* data;
       UnityProtocolPreview* _tmp6_ = NULL;
       UnityProtocolMusicPreview* reconstructed;
       const gchar* _tmp7_;
       const gchar* _tmp8_;
       const gchar* _tmp9_;
       const gchar* _tmp10_;
       const gchar* _tmp11_;
       const gchar* _tmp12_;
       const gchar* _tmp13_;
       const gchar* _tmp14_;
       GIcon* _tmp15_;
       GIcon* _tmp16_;
       GIcon* _tmp17_;
       GIcon* _tmp18_;
       gboolean _tmp19_ = FALSE;
       GIcon* _tmp20_;
       GIcon* _tmp21_;
       gboolean _tmp22_ = FALSE;
       GVariant* _tmp23_ = NULL;
       GVariant* _tmp24_;
       gboolean _tmp25_ = FALSE;
       _tmp0_ = g_file_new_for_path ("/usr/share/icons/beatles.jpg");
       _tmp1_ = _tmp0_;
       _tmp2_ = (GFileIcon*) g_file_icon_new (_tmp1_);
       _tmp3_ = _tmp2_;
       _g_object_unref0 (_tmp1_);
       artwork = _tmp3_;
       _tmp4_ = unity_music_preview_new ("Beatles", "Help", (GIcon*) artwork);
       preview = _tmp4_;
       _tmp5_ = dee_serializable_serialize ((DeeSerializable*) preview);
       data = _tmp5_;
       _tmp6_ = unity_protocol_preview_parse (data);
       reconstructed = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, UNITY_PROTOCOL_TYPE_MUSIC_PREVIEW) ? ((UnityProtocolMusicPreview*) _tmp6_) : NULL;
       _tmp7_ = unity_preview_get_title ((UnityPreview*) preview);
       _tmp8_ = _tmp7_;
       _tmp9_ = unity_protocol_preview_get_title ((UnityProtocolPreview*) reconstructed);
       _tmp10_ = _tmp9_;
       _vala_assert (g_strcmp0 (_tmp8_, _tmp10_) == 0, "preview.title == reconstructed.title");
       _tmp11_ = unity_preview_get_subtitle ((UnityPreview*) preview);
       _tmp12_ = _tmp11_;
       _tmp13_ = unity_protocol_preview_get_subtitle ((UnityProtocolPreview*) reconstructed);
       _tmp14_ = _tmp13_;
       _vala_assert (g_strcmp0 (_tmp12_, _tmp14_) == 0, "preview.subtitle == reconstructed.subtitle");
       _tmp15_ = unity_preview_get_thumbnail ((UnityPreview*) preview);
       _tmp16_ = _tmp15_;
       _tmp17_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp18_ = _tmp17_;
       _tmp19_ = g_icon_equal (_tmp16_, _tmp18_);
       _vala_assert (_tmp19_, "preview.thumbnail.equal (reconstructed.thumbnail)");
       _tmp20_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp21_ = _tmp20_;
       _tmp22_ = g_icon_equal ((GIcon*) artwork, _tmp21_);
       _vala_assert (_tmp22_, "artwork.equal (reconstructed.thumbnail)");
       _tmp23_ = dee_serializable_serialize ((DeeSerializable*) reconstructed);
       _tmp24_ = _tmp23_;
       _tmp25_ = unity_test_preview_suite_previews_equal (data, _tmp24_);
       _vala_assert (_tmp25_, "previews_equal (data, reconstructed.serialize ())");
       _g_variant_unref0 (_tmp24_);
       _g_object_unref0 (reconstructed);
       _g_variant_unref0 (data);
       _g_object_unref0 (preview);
       _g_object_unref0 (artwork);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 565 of file test-previews.c.

                                                                           {
       GFile* _tmp0_ = NULL;
       GFile* _tmp1_;
       GFileIcon* _tmp2_;
       GFileIcon* _tmp3_;
       GFileIcon* artwork;
       UnityMusicPreview* _tmp4_;
       UnityMusicPreview* preview;
       gchar* _tmp5_;
       gchar* track_uri;
       UnityTrackMetadata* _tmp6_;
       UnityTrackMetadata* track;
       GVariant* _tmp7_ = NULL;
       GVariant* data;
       UnityProtocolPreview* _tmp8_ = NULL;
       UnityProtocolMusicPreview* reconstructed;
       const gchar* _tmp9_;
       const gchar* _tmp10_;
       const gchar* _tmp11_;
       const gchar* _tmp12_;
       const gchar* _tmp13_;
       const gchar* _tmp14_;
       const gchar* _tmp15_;
       const gchar* _tmp16_;
       GIcon* _tmp17_;
       GIcon* _tmp18_;
       GIcon* _tmp19_;
       GIcon* _tmp20_;
       gboolean _tmp21_ = FALSE;
       GIcon* _tmp22_;
       GIcon* _tmp23_;
       gboolean _tmp24_ = FALSE;
       GVariant* _tmp25_ = NULL;
       GVariant* _tmp26_;
       gboolean _tmp27_ = FALSE;
       _tmp0_ = g_file_new_for_path ("/usr/share/icons/beatles.jpg");
       _tmp1_ = _tmp0_;
       _tmp2_ = (GFileIcon*) g_file_icon_new (_tmp1_);
       _tmp3_ = _tmp2_;
       _g_object_unref0 (_tmp1_);
       artwork = _tmp3_;
       _tmp4_ = unity_music_preview_new ("Beatles", "Help", (GIcon*) artwork);
       preview = _tmp4_;
       _tmp5_ = g_strdup ("file:///media/music/beatles/help/1.mp3");
       track_uri = _tmp5_;
       _tmp6_ = unity_track_metadata_new_full (track_uri, 1, "Help", "Beatles", "Help!", (guint) 123);
       track = _tmp6_;
       unity_music_preview_add_track (preview, track);
       unity_music_preview_set_current_track_uri (preview, track_uri);
       unity_music_preview_set_current_progress (preview, 0.3f);
       _tmp7_ = dee_serializable_serialize ((DeeSerializable*) preview);
       data = _tmp7_;
       _tmp8_ = unity_protocol_preview_parse (data);
       reconstructed = G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, UNITY_PROTOCOL_TYPE_MUSIC_PREVIEW) ? ((UnityProtocolMusicPreview*) _tmp8_) : NULL;
       _tmp9_ = unity_preview_get_title ((UnityPreview*) preview);
       _tmp10_ = _tmp9_;
       _tmp11_ = unity_protocol_preview_get_title ((UnityProtocolPreview*) reconstructed);
       _tmp12_ = _tmp11_;
       _vala_assert (g_strcmp0 (_tmp10_, _tmp12_) == 0, "preview.title == reconstructed.title");
       _tmp13_ = unity_preview_get_subtitle ((UnityPreview*) preview);
       _tmp14_ = _tmp13_;
       _tmp15_ = unity_protocol_preview_get_subtitle ((UnityProtocolPreview*) reconstructed);
       _tmp16_ = _tmp15_;
       _vala_assert (g_strcmp0 (_tmp14_, _tmp16_) == 0, "preview.subtitle == reconstructed.subtitle");
       _tmp17_ = unity_preview_get_thumbnail ((UnityPreview*) preview);
       _tmp18_ = _tmp17_;
       _tmp19_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp20_ = _tmp19_;
       _tmp21_ = g_icon_equal (_tmp18_, _tmp20_);
       _vala_assert (_tmp21_, "preview.thumbnail.equal (reconstructed.thumbnail)");
       _tmp22_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp23_ = _tmp22_;
       _tmp24_ = g_icon_equal ((GIcon*) artwork, _tmp23_);
       _vala_assert (_tmp24_, "artwork.equal (reconstructed.thumbnail)");
       _tmp25_ = dee_serializable_serialize ((DeeSerializable*) reconstructed);
       _tmp26_ = _tmp25_;
       _tmp27_ = unity_test_preview_suite_previews_equal (data, _tmp26_);
       _vala_assert (_tmp27_, "previews_equal (data, reconstructed.serialize ())");
       _g_variant_unref0 (_tmp26_);
       _g_object_unref0 (reconstructed);
       _g_variant_unref0 (data);
       _g_object_unref0 (track);
       _g_free0 (track_uri);
       _g_object_unref0 (preview);
       _g_object_unref0 (artwork);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_test_preview_suite_test_preview_series ( void  ) [static]

Definition at line 749 of file test-previews.c.

                                                                {
       UnitySeriesItem** _tmp0_ = NULL;
       UnitySeriesItem** _tmp1_;
       gint _tmp1__length1;
       UnitySeriesPreview* _tmp2_;
       UnitySeriesPreview* _tmp3_;
       UnitySeriesPreview* preview;
       GVariant* _tmp4_ = NULL;
       GVariant* data;
       UnityProtocolPreview* _tmp5_ = NULL;
       UnityProtocolSeriesPreview* reconstructed;
       GIcon* _tmp6_;
       GIcon* _tmp7_;
       GIcon* _tmp8_;
       GIcon* _tmp9_;
       gboolean _tmp10_ = FALSE;
       GVariant* _tmp11_ = NULL;
       GVariant* _tmp12_;
       gboolean _tmp13_ = FALSE;
       _tmp0_ = g_new0 (UnitySeriesItem*, 0 + 1);
       _tmp1_ = _tmp0_;
       _tmp1__length1 = 0;
       _tmp2_ = unity_series_preview_new (_tmp1_, 0, "");
       _tmp3_ = _tmp2_;
       _tmp1_ = (_vala_array_free (_tmp1_, _tmp1__length1, (GDestroyNotify) g_object_unref), NULL);
       preview = _tmp3_;
       _tmp4_ = dee_serializable_serialize ((DeeSerializable*) preview);
       data = _tmp4_;
       _tmp5_ = unity_protocol_preview_parse (data);
       reconstructed = G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, UNITY_PROTOCOL_TYPE_SERIES_PREVIEW) ? ((UnityProtocolSeriesPreview*) _tmp5_) : NULL;
       _tmp6_ = unity_preview_get_thumbnail ((UnityPreview*) preview);
       _tmp7_ = _tmp6_;
       _tmp8_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp9_ = _tmp8_;
       _tmp10_ = g_icon_equal (_tmp7_, _tmp9_);
       _vala_assert (_tmp10_, "preview.thumbnail.equal (reconstructed.thumbnail)");
       _tmp11_ = dee_serializable_serialize ((DeeSerializable*) reconstructed);
       _tmp12_ = _tmp11_;
       _tmp13_ = unity_test_preview_suite_previews_equal (data, _tmp12_);
       _vala_assert (_tmp13_, "previews_equal (data, reconstructed.serialize ())");
       _g_variant_unref0 (_tmp12_);
       _g_object_unref0 (reconstructed);
       _g_variant_unref0 (data);
       _g_object_unref0 (preview);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 835 of file test-previews.c.

                                                                           {
       Block1Data* _data1_;
       GFile* _tmp0_ = NULL;
       GFile* _tmp1_;
       GFileIcon* _tmp2_;
       GFileIcon* _tmp3_;
       GFileIcon* artwork;
       gchar* _tmp4_;
       gchar* _tmp5_;
       UnitySeriesItem* _tmp6_;
       UnitySeriesItem* item1;
       UnitySeriesItem* _tmp7_;
       UnitySeriesItem* item2;
       UnitySeriesItem* _tmp8_;
       UnitySeriesItem* _tmp9_;
       UnitySeriesItem** _tmp10_ = NULL;
       UnitySeriesItem** _tmp11_;
       gint _tmp11__length1;
       UnitySeriesPreview* _tmp12_;
       UnitySeriesPreview* _tmp13_;
       UnitySeriesPreview* preview;
       GVariant* _tmp14_ = NULL;
       GVariant* data;
       UnityProtocolPreview* _tmp15_ = NULL;
       UnityProtocolSeriesPreview* reconstructed;
       GIcon* _tmp16_;
       GIcon* _tmp17_;
       GIcon* _tmp18_;
       GIcon* _tmp19_;
       gboolean _tmp20_ = FALSE;
       gint _tmp21_ = 0;
       UnityProtocolSeriesItemRaw* _tmp22_ = NULL;
       UnityProtocolPreview* _tmp23_;
       UnityProtocolPreview* _tmp24_;
       const gchar* _tmp25_;
       const gchar* _tmp26_;
       UnityProtocolPreview* _tmp27_;
       UnityProtocolPreview* _tmp28_;
       const gchar* _tmp29_;
       const gchar* _tmp30_;
       GVariant* _tmp31_ = NULL;
       GVariant* _tmp32_;
       gboolean _tmp33_ = FALSE;
       _data1_ = g_slice_new0 (Block1Data);
       _data1_->_ref_count_ = 1;
       _tmp0_ = g_file_new_for_path ("/usr/share/icons/beatles.jpg");
       _tmp1_ = _tmp0_;
       _tmp2_ = (GFileIcon*) g_file_icon_new (_tmp1_);
       _tmp3_ = _tmp2_;
       _g_object_unref0 (_tmp1_);
       artwork = _tmp3_;
       _tmp4_ = g_strdup ("A title");
       _data1_->title = _tmp4_;
       _tmp5_ = g_strdup ("Description");
       _data1_->desc = _tmp5_;
       _data1_->got_generate_preview_signal = FALSE;
       _tmp6_ = unity_series_item_new ("file:///media/series_item_1.jpg", "Item #1", (GIcon*) artwork);
       item1 = _tmp6_;
       _tmp7_ = unity_series_item_new ("file:///media/series_item_2.jpg", "Item #2", NULL);
       item2 = _tmp7_;
       _tmp8_ = _g_object_ref0 (item1);
       _tmp9_ = _g_object_ref0 (item2);
       _tmp10_ = g_new0 (UnitySeriesItem*, 2 + 1);
       _tmp10_[0] = _tmp8_;
       _tmp10_[1] = _tmp9_;
       _tmp11_ = _tmp10_;
       _tmp11__length1 = 2;
       _tmp12_ = unity_series_preview_new (_tmp11_, 2, "file:///media/series_item_2.jpg");
       _tmp13_ = _tmp12_;
       _tmp11_ = (_vala_array_free (_tmp11_, _tmp11__length1, (GDestroyNotify) g_object_unref), NULL);
       preview = _tmp13_;
       g_signal_connect_data (preview, "request-item-preview", (GCallback) ___lambda2__unity_series_preview_request_item_preview, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
       _tmp14_ = dee_serializable_serialize ((DeeSerializable*) preview);
       data = _tmp14_;
       _tmp15_ = unity_protocol_preview_parse (data);
       reconstructed = G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, UNITY_PROTOCOL_TYPE_SERIES_PREVIEW) ? ((UnityProtocolSeriesPreview*) _tmp15_) : NULL;
       _vala_assert (_data1_->got_generate_preview_signal, "got_generate_preview_signal");
       _tmp16_ = unity_preview_get_thumbnail ((UnityPreview*) preview);
       _tmp17_ = _tmp16_;
       _tmp18_ = unity_protocol_preview_get_thumbnail ((UnityProtocolPreview*) reconstructed);
       _tmp19_ = _tmp18_;
       _tmp20_ = g_icon_equal (_tmp17_, _tmp19_);
       _vala_assert (_tmp20_, "preview.thumbnail.equal (reconstructed.thumbnail)");
       _tmp22_ = unity_protocol_series_preview_get_items (reconstructed, &_tmp21_);
       _vala_assert (_tmp21_ == 2, "reconstructed.get_items().length == 2");
       _tmp23_ = unity_protocol_series_preview_get_child_preview (reconstructed);
       _tmp24_ = _tmp23_;
       _tmp25_ = unity_protocol_preview_get_title (_tmp24_);
       _tmp26_ = _tmp25_;
       _vala_assert (g_strcmp0 (_tmp26_, _data1_->title) == 0, "reconstructed.child_preview.title == title");
       _tmp27_ = unity_protocol_series_preview_get_child_preview (reconstructed);
       _tmp28_ = _tmp27_;
       _tmp29_ = unity_protocol_preview_get_description (_tmp28_);
       _tmp30_ = _tmp29_;
       _vala_assert (g_strcmp0 (_tmp30_, _data1_->desc) == 0, "reconstructed.child_preview.description == desc");
       _tmp31_ = dee_serializable_serialize ((DeeSerializable*) reconstructed);
       _tmp32_ = _tmp31_;
       _tmp33_ = unity_test_preview_suite_previews_equal (data, _tmp32_);
       _vala_assert (_tmp33_, "previews_equal (data, reconstructed.serialize ())");
       _g_variant_unref0 (_tmp32_);
       _g_object_unref0 (reconstructed);
       _g_variant_unref0 (data);
       _g_object_unref0 (preview);
       _g_object_unref0 (item2);
       _g_object_unref0 (item1);
       _g_object_unref0 (artwork);
       block1_data_unref (_data1_);
       _data1_ = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void unity_test_preview_suite_unref ( gpointer  instance)

Definition at line 1095 of file test-previews.c.

                                                        {
       UnityTestPreviewSuite* self;
       self = instance;
       if (g_atomic_int_dec_and_test (&self->ref_count)) {
              UNITY_TEST_PREVIEW_SUITE_GET_CLASS (self)->finalize (self);
              g_type_free_instance ((GTypeInstance *) self);
       }
}

Here is the caller graph for this function:

gpointer unity_test_value_get_preview_suite ( const GValue *  value)

Definition at line 1015 of file test-previews.c.

                                                                  {
       g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_PREVIEW_SUITE), NULL);
       return value->data[0].v_pointer;
}
static gchar* unity_test_value_preview_suite_collect_value ( GValue *  value,
guint  n_collect_values,
GTypeCValue *  collect_values,
guint  collect_flags 
) [static]

Definition at line 972 of file test-previews.c.

                                                                                                                                                     {
       if (collect_values[0].v_pointer) {
              UnityTestPreviewSuite* object;
              object = collect_values[0].v_pointer;
              if (object->parent_instance.g_class == NULL) {
                     return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
              } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                     return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
              }
              value->data[0].v_pointer = unity_test_preview_suite_ref (object);
       } else {
              value->data[0].v_pointer = NULL;
       }
       return NULL;
}

Here is the call graph for this function:

static void unity_test_value_preview_suite_copy_value ( const GValue *  src_value,
GValue *  dest_value 
) [static]

Definition at line 958 of file test-previews.c.

                                                                                                    {
       if (src_value->data[0].v_pointer) {
              dest_value->data[0].v_pointer = unity_test_preview_suite_ref (src_value->data[0].v_pointer);
       } else {
              dest_value->data[0].v_pointer = NULL;
       }
}

Here is the call graph for this function:

static void unity_test_value_preview_suite_free_value ( GValue *  value) [static]

Definition at line 951 of file test-previews.c.

                                                                      {
       if (value->data[0].v_pointer) {
              unity_test_preview_suite_unref (value->data[0].v_pointer);
       }
}

Here is the call graph for this function:

static void unity_test_value_preview_suite_init ( GValue *  value) [static]

Definition at line 946 of file test-previews.c.

                                                                {
       value->data[0].v_pointer = NULL;
}
static gchar* unity_test_value_preview_suite_lcopy_value ( const GValue *  value,
guint  n_collect_values,
GTypeCValue *  collect_values,
guint  collect_flags 
) [static]

Definition at line 989 of file test-previews.c.

                                                                                                                                                         {
       UnityTestPreviewSuite** object_p;
       object_p = collect_values[0].v_pointer;
       if (!object_p) {
              return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
       }
       if (!value->data[0].v_pointer) {
              *object_p = NULL;
       } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
              *object_p = value->data[0].v_pointer;
       } else {
              *object_p = unity_test_preview_suite_ref (value->data[0].v_pointer);
       }
       return NULL;
}

Here is the call graph for this function:

static gpointer unity_test_value_preview_suite_peek_pointer ( const GValue *  value) [static]

Definition at line 967 of file test-previews.c.

                                                                                  {
       return value->data[0].v_pointer;
}
void unity_test_value_set_preview_suite ( GValue *  value,
gpointer  v_object 
)

Definition at line 1021 of file test-previews.c.

                                                                           {
       UnityTestPreviewSuite* old;
       g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_PREVIEW_SUITE));
       old = value->data[0].v_pointer;
       if (v_object) {
              g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TEST_TYPE_PREVIEW_SUITE));
              g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
              value->data[0].v_pointer = v_object;
              unity_test_preview_suite_ref (value->data[0].v_pointer);
       } else {
              value->data[0].v_pointer = NULL;
       }
       if (old) {
              unity_test_preview_suite_unref (old);
       }
}

Here is the call graph for this function:

void unity_test_value_take_preview_suite ( GValue *  value,
gpointer  v_object 
)

Definition at line 1039 of file test-previews.c.

                                                                            {
       UnityTestPreviewSuite* old;
       g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_PREVIEW_SUITE));
       old = value->data[0].v_pointer;
       if (v_object) {
              g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TEST_TYPE_PREVIEW_SUITE));
              g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
              value->data[0].v_pointer = v_object;
       } else {
              value->data[0].v_pointer = NULL;
       }
       if (old) {
              unity_test_preview_suite_unref (old);
       }
}

Here is the call graph for this function:


Variable Documentation

gpointer unity_test_preview_suite_parent_class = NULL [static]

Definition at line 75 of file test-previews.c.