Back to index

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

Go to the source code of this file.

Classes

struct  _UnityTestIOSuite
struct  _UnityTestIOSuiteClass
struct  _UnityTestIoSuiteDoTestAsyncFindAndLoadData
struct  _UnityTestParamSpecIOSuite

Defines

#define UNITY_TEST_TYPE_IO_SUITE   (unity_test_io_suite_get_type ())
#define UNITY_TEST_IO_SUITE(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TEST_TYPE_IO_SUITE, UnityTestIOSuite))
#define UNITY_TEST_IO_SUITE_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TEST_TYPE_IO_SUITE, UnityTestIOSuiteClass))
#define UNITY_TEST_IS_IO_SUITE(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TEST_TYPE_IO_SUITE))
#define UNITY_TEST_IS_IO_SUITE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TEST_TYPE_IO_SUITE))
#define UNITY_TEST_IO_SUITE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TEST_TYPE_IO_SUITE, UnityTestIOSuiteClass))
#define _g_main_loop_unref0(var)   ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_free0(var)   (var = (g_free (var), NULL))
#define _g_object_unref0(var)   ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var)   ((var == NULL) ? NULL : (var = (g_error_free (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 _UnityTestIOSuite
typedef struct _UnityTestIOSuiteClass
typedef struct _UnityTestIOSuitePrivate
typedef struct _UnityTestIoSuiteDoTestAsyncFindAndLoadData
typedef struct _UnityTestParamSpecIOSuite

Functions

gpointer unity_test_io_suite_ref (gpointer instance)
void unity_test_io_suite_unref (gpointer instance)
GParamSpec * unity_test_param_spec_io_suite (const gchar *name, const gchar *nick, const gchar *blurb, GType object_type, GParamFlags flags)
void unity_test_value_set_io_suite (GValue *value, gpointer v_object)
void unity_test_value_take_io_suite (GValue *value, gpointer v_object)
gpointer unity_test_value_get_io_suite (const GValue *value)
GType unity_test_io_suite_get_type (void)
UnityTestIOSuite * unity_test_io_suite_new (void)
UnityTestIOSuite * unity_test_io_suite_construct (GType object_type)
void unity_test_io_suite_test_async_find_and_load (void)
static void _unity_test_io_suite_test_async_find_and_load_gtest_data_func (gpointer self)
void unity_test_io_suite_do_test_async_find_and_load (GMainLoop *mainloop, GAsyncReadyCallback _callback_, gpointer _user_data_)
void unity_test_io_suite_do_test_async_find_and_load_finish (GAsyncResult *_res_)
static void unity_test_io_suite_do_test_async_find_and_load_data_free (gpointer _data)
static gboolean unity_test_io_suite_do_test_async_find_and_load_co (UnityTestIoSuiteDoTestAsyncFindAndLoadData *_data_)
static void unity_test_io_suite_do_test_async_find_and_load_ready (GObject *source_object, GAsyncResult *_res_, gpointer _user_data_)
static void unity_test_io_suite_finalize (UnityTestIOSuite *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_main_loop_ref0 (gpointer self)
static void unity_test_value_io_suite_init (GValue *value)
static void unity_test_value_io_suite_free_value (GValue *value)
static void unity_test_value_io_suite_copy_value (const GValue *src_value, GValue *dest_value)
static gpointer unity_test_value_io_suite_peek_pointer (const GValue *value)
static gchar * unity_test_value_io_suite_collect_value (GValue *value, guint n_collect_values, GTypeCValue *collect_values, guint collect_flags)
static gchar * unity_test_value_io_suite_lcopy_value (const GValue *value, guint n_collect_values, GTypeCValue *collect_values, guint collect_flags)
static void unity_test_io_suite_class_init (UnityTestIOSuiteClass *klass)
static void unity_test_io_suite_instance_init (UnityTestIOSuite *self)

Variables

static gpointer unity_test_io_suite_parent_class = NULL
static gchar * unity_test_io_suite_TEST_DATA = NULL

Class Documentation

struct _UnityTestIOSuite

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

Class Members
GTypeInstance parent_instance
UnityTestIOSuitePrivate * priv
volatile int ref_count
struct _UnityTestIoSuiteDoTestAsyncFindAndLoadData

Definition at line 63 of file test-io.c.

Collaboration diagram for _UnityTestIoSuiteDoTestAsyncFindAndLoadData:
Class Members
GSimpleAsyncResult * _async_result
gint _data_size_
gint _dirs_size_
GError * _inner_error_
GAsyncResult * _res_
GObject * _source_object_
int _state_
gchar ** _tmp0_
gsize _tmp10_
gsize _tmp11_
const gchar * _tmp12_
gint _tmp13_
gint _tmp14_
const gchar * _tmp15_
gint _tmp16_
gint _tmp17_
gchar * _tmp18_
gchar * _tmp19_
gchar ** _tmp1_
gint _tmp1__length1
gsize _tmp20_
gchar * _tmp21_
gchar * _tmp22_
gchar * _tmp23_
gchar * _tmp24_
gsize _tmp25_
const gchar * _tmp26_
gint _tmp27_
gint _tmp28_
guint8 * _tmp29_
gint _tmp29__length1
gchar * _tmp2_
gchar * _tmp30_
const gchar * _tmp31_
const gchar * _tmp32_
GMainLoop * _tmp33_
gchar * _tmp3_
gchar ** _tmp4_
gint _tmp4__length1
GFileInputStream * _tmp5_
GFileInputStream * _tmp6_
GFileInputStream * _tmp7_
guint8 * _tmp8_
gint _tmp9_
guint8 * data
gint data_length1
gsize data_size
gchar ** dirs
gint dirs_length1
GError * e
GFileInputStream * input
GMainLoop * mainloop
gchar * sdata
struct _UnityTestParamSpecIOSuite

Definition at line 119 of file test-io.c.

Class Members
GParamSpec parent_instance

Define Documentation

#define _g_error_free0 (   var)    ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

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

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

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

#define _g_main_loop_unref0 (   var)    ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))

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

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

Definition at line 46 of file test-io.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-io.c.

#define UNITY_TEST_IO_SUITE (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TEST_TYPE_IO_SUITE, UnityTestIOSuite))

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

#define UNITY_TEST_IO_SUITE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TEST_TYPE_IO_SUITE, UnityTestIOSuiteClass))

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

#define UNITY_TEST_IO_SUITE_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TEST_TYPE_IO_SUITE, UnityTestIOSuiteClass))

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

#define UNITY_TEST_IS_IO_SUITE (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TEST_TYPE_IO_SUITE))

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

#define UNITY_TEST_IS_IO_SUITE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TEST_TYPE_IO_SUITE))

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

Definition at line 34 of file test-io.c.


Typedef Documentation

typedef struct _UnityTestIOSuite

Definition at line 41 of file test-io.c.

typedef struct _UnityTestIOSuiteClass

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

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

typedef struct _UnityTestIOSuitePrivate

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

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


Function Documentation

static gpointer _g_main_loop_ref0 ( gpointer  self) [static]

Definition at line 189 of file test-io.c.

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

Here is the caller graph for this function:

static void _unity_test_io_suite_test_async_find_and_load_gtest_data_func ( gpointer  self) [static]

Definition at line 152 of file test-io.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 520 of file test-io.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 532 of file test-io.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 void unity_test_io_suite_class_init ( UnityTestIOSuiteClass *  klass) [static]

Definition at line 460 of file test-io.c.

                                                                           {
       gchar* _tmp0_;
       unity_test_io_suite_parent_class = g_type_class_peek_parent (klass);
       UNITY_TEST_IO_SUITE_CLASS (klass)->finalize = unity_test_io_suite_finalize;
       _tmp0_ = g_strdup ("[Desktop Entry]\n" \
"Name=Test Application\n" \
"Comment=This is a test application desktop file\n" \
"Exec=xclock\n" \
"Terminal=false\n" \
"Type=Application\n" \
"StartupNotify=false\n" \
"Icon=test_desktop_icon.png\n" \
"\n");
       unity_test_io_suite_TEST_DATA = _tmp0_;
}

Here is the call graph for this function:

UnityTestIOSuite * unity_test_io_suite_construct ( GType  object_type)

Definition at line 157 of file test-io.c.

                                                                    {
       UnityTestIOSuite* self = NULL;
       self = (UnityTestIOSuite*) g_type_create_instance (object_type);
       g_test_add_data_func ("/Unit/IO/AsyncDesktopFile", NULL, _unity_test_io_suite_test_async_find_and_load_gtest_data_func);
       return self;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void unity_test_io_suite_do_test_async_find_and_load ( GMainLoop *  mainloop,
GAsyncReadyCallback  _callback_,
gpointer  _user_data_ 
)

Definition at line 194 of file test-io.c.

                                                                                                                                 {
       UnityTestIoSuiteDoTestAsyncFindAndLoadData* _data_;
       GMainLoop* _tmp0_;
       GMainLoop* _tmp1_;
       _data_ = g_slice_new0 (UnityTestIoSuiteDoTestAsyncFindAndLoadData);
       _data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, unity_test_io_suite_do_test_async_find_and_load);
       g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, unity_test_io_suite_do_test_async_find_and_load_data_free);
       _tmp0_ = mainloop;
       _tmp1_ = _g_main_loop_ref0 (_tmp0_);
       _data_->mainloop = _tmp1_;
       unity_test_io_suite_do_test_async_find_and_load_co (_data_);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean unity_test_io_suite_do_test_async_find_and_load_co ( UnityTestIoSuiteDoTestAsyncFindAndLoadData *  _data_) [static]

Definition at line 223 of file test-io.c.

                                                                                                                        {
       switch (_data_->_state_) {
              case 0:
              goto _state_0;
              case 1:
              goto _state_1;
              case 2:
              goto _state_2;
              default:
              g_assert_not_reached ();
       }
       _state_0:
       _data_->_tmp0_ = NULL;
       _data_->_tmp0_ = g_new0 (gchar*, 1 + 1);
       _data_->dirs = _data_->_tmp0_;
       _data_->dirs_length1 = 1;
       _data_->_dirs_size_ = _data_->dirs_length1;
       _data_->_tmp1_ = _data_->dirs;
       _data_->_tmp1__length1 = _data_->dirs_length1;
       _data_->_tmp2_ = NULL;
       _data_->_tmp2_ = g_build_filename (TESTDIR, "data", NULL);
       _g_free0 (_data_->_tmp1_[0]);
       _data_->_tmp1_[0] = _data_->_tmp2_;
       _data_->_tmp3_ = _data_->_tmp1_[0];
       {
              _data_->_tmp4_ = _data_->dirs;
              _data_->_tmp4__length1 = _data_->dirs_length1;
              _data_->_state_ = 1;
              unity_io_open_from_dirs ("test_desktop_file.desktop", _data_->_tmp4_, _data_->_tmp4__length1, unity_test_io_suite_do_test_async_find_and_load_ready, _data_);
              return FALSE;
              _state_1:
              _data_->_tmp5_ = NULL;
              _data_->_tmp5_ = unity_io_open_from_dirs_finish (_data_->_res_, &_data_->_inner_error_);
              _data_->input = _data_->_tmp5_;
              if (_data_->_inner_error_ != NULL) {
                     goto __catch2_g_error;
              }
              _data_->_tmp6_ = _data_->input;
              _vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp6_, g_file_input_stream_get_type ()), "input is FileInputStream");
              _data_->data_length1 = 0;
              _data_->_data_size_ = 0;
              _data_->_tmp7_ = _data_->input;
              _data_->_tmp8_ = NULL;
              _data_->_tmp9_ = 0;
              _data_->_tmp10_ = 0UL;
              _data_->_state_ = 2;
              unity_io_read_stream_async ((GInputStream*) _data_->_tmp7_, G_PRIORITY_LOW, NULL, unity_test_io_suite_do_test_async_find_and_load_ready, _data_);
              return FALSE;
              _state_2:
              unity_io_read_stream_finish (_data_->_res_, &_data_->_tmp8_, &_data_->_tmp9_, &_data_->_tmp10_, &_data_->_inner_error_);
              _data_->data = (g_free (_data_->data), NULL);
              _data_->data = _data_->_tmp8_;
              _data_->data_length1 = _data_->_tmp9_;
              _data_->_data_size_ = _data_->data_length1;
              _data_->data_size = _data_->_tmp10_;
              if (_data_->_inner_error_ != NULL) {
                     _data_->data = (g_free (_data_->data), NULL);
                     _g_object_unref0 (_data_->input);
                     goto __catch2_g_error;
              }
              _data_->_tmp11_ = _data_->data_size;
              _data_->_tmp12_ = unity_test_io_suite_TEST_DATA;
              _data_->_tmp13_ = strlen (_data_->_tmp12_);
              _data_->_tmp14_ = _data_->_tmp13_;
              if (_data_->_tmp11_ != ((gsize) _data_->_tmp14_)) {
                     _data_->_tmp15_ = unity_test_io_suite_TEST_DATA;
                     _data_->_tmp16_ = strlen (_data_->_tmp15_);
                     _data_->_tmp17_ = _data_->_tmp16_;
                     _data_->_tmp18_ = NULL;
                     _data_->_tmp18_ = g_strdup_printf ("%i", _data_->_tmp17_);
                     _data_->_tmp19_ = _data_->_tmp18_;
                     _data_->_tmp20_ = _data_->data_size;
                     _data_->_tmp21_ = NULL;
                     _data_->_tmp21_ = g_strdup_printf ("%" G_GSIZE_FORMAT, _data_->_tmp20_);
                     _data_->_tmp22_ = _data_->_tmp21_;
                     _data_->_tmp23_ = NULL;
                     _data_->_tmp23_ = g_strconcat ("Expected file size ", _data_->_tmp19_, ", but found ", _data_->_tmp22_, NULL);
                     _data_->_tmp24_ = _data_->_tmp23_;
                     g_critical ("test-io.vala:72: %s", _data_->_tmp24_);
                     _g_free0 (_data_->_tmp24_);
                     _g_free0 (_data_->_tmp22_);
                     _g_free0 (_data_->_tmp19_);
                     _data_->_tmp25_ = _data_->data_size;
                     _data_->_tmp26_ = unity_test_io_suite_TEST_DATA;
                     _data_->_tmp27_ = strlen (_data_->_tmp26_);
                     _data_->_tmp28_ = _data_->_tmp27_;
                     _vala_assert (_data_->_tmp25_ == ((gsize) _data_->_tmp28_), "data_size == TEST_DATA.length");
              }
              _data_->_tmp29_ = _data_->data;
              _data_->_tmp29__length1 = _data_->data_length1;
              _data_->_tmp30_ = g_strdup ((const gchar*) _data_->_tmp29_);
              _data_->sdata = _data_->_tmp30_;
              _data_->_tmp31_ = unity_test_io_suite_TEST_DATA;
              _vala_assert (g_strcmp0 (_data_->sdata, _data_->_tmp31_) == 0, "sdata == TEST_DATA");
              _g_free0 (_data_->sdata);
              _data_->data = (g_free (_data_->data), NULL);
              _g_object_unref0 (_data_->input);
       }
       goto __finally2;
       __catch2_g_error:
       {
              _data_->e = _data_->_inner_error_;
              _data_->_inner_error_ = NULL;
              _data_->_tmp32_ = _data_->e->message;
              g_error ("test-io.vala:82: Failed read test file: %s", _data_->_tmp32_);
              _g_error_free0 (_data_->e);
       }
       __finally2:
       if (_data_->_inner_error_ != NULL) {
              _data_->dirs = (_vala_array_free (_data_->dirs, _data_->dirs_length1, (GDestroyNotify) g_free), NULL);
              g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
              g_clear_error (&_data_->_inner_error_);
              return FALSE;
       }
       _data_->_tmp33_ = _data_->mainloop;
       g_main_loop_quit (_data_->_tmp33_);
       _data_->dirs = (_vala_array_free (_data_->dirs, _data_->dirs_length1, (GDestroyNotify) g_free), NULL);
       if (_data_->_state_ == 0) {
              g_simple_async_result_complete_in_idle (_data_->_async_result);
       } else {
              g_simple_async_result_complete (_data_->_async_result);
       }
       g_object_unref (_data_->_async_result);
       return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_test_io_suite_do_test_async_find_and_load_data_free ( gpointer  _data) [static]

Definition at line 181 of file test-io.c.

                                                                                       {
       UnityTestIoSuiteDoTestAsyncFindAndLoadData* _data_;
       _data_ = _data;
       _g_main_loop_unref0 (_data_->mainloop);
       g_slice_free (UnityTestIoSuiteDoTestAsyncFindAndLoadData, _data_);
}

Here is the caller graph for this function:

Definition at line 208 of file test-io.c.

                                                                                  {
       UnityTestIoSuiteDoTestAsyncFindAndLoadData* _data_;
       _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}
static void unity_test_io_suite_do_test_async_find_and_load_ready ( GObject *  source_object,
GAsyncResult *  _res_,
gpointer  _user_data_ 
) [static]

Definition at line 214 of file test-io.c.

                                                                                                                                      {
       UnityTestIoSuiteDoTestAsyncFindAndLoadData* _data_;
       _data_ = _user_data_;
       _data_->_source_object_ = source_object;
       _data_->_res_ = _res_;
       unity_test_io_suite_do_test_async_find_and_load_co (_data_);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void unity_test_io_suite_finalize ( UnityTestIOSuite *  obj) [static]

Definition at line 482 of file test-io.c.

                                                                 {
       UnityTestIOSuite * self;
       self = G_TYPE_CHECK_INSTANCE_CAST (obj, UNITY_TEST_TYPE_IO_SUITE, UnityTestIOSuite);
}

Here is the caller graph for this function:

GType unity_test_io_suite_get_type ( void  )

Definition at line 134 of file test-io.c.

      {
       UNITY_TEST_IO_SUITE_DUMMY_PROPERTY
};
static void unity_test_io_suite_instance_init ( UnityTestIOSuite *  self) [static]

Definition at line 477 of file test-io.c.

                                                                        {
       self->ref_count = 1;
}
UnityTestIOSuite * unity_test_io_suite_new ( void  )

Definition at line 165 of file test-io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

gpointer unity_test_io_suite_ref ( gpointer  instance)

Definition at line 502 of file test-io.c.

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

Here is the caller graph for this function:

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

                                                         {
       GMainLoop* _tmp0_;
       GMainLoop* mainloop;
       _tmp0_ = g_main_loop_new (NULL, FALSE);
       mainloop = _tmp0_;
       unity_test_io_suite_do_test_async_find_and_load (mainloop, NULL, NULL);
       g_main_loop_run (mainloop);
       _g_main_loop_unref0 (mainloop);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void unity_test_io_suite_unref ( gpointer  instance)

Definition at line 510 of file test-io.c.

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

Here is the caller graph for this function:

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

Definition at line 410 of file test-io.c.

                                                                                                                                            {
       UnityTestParamSpecIOSuite* spec;
       g_return_val_if_fail (g_type_is_a (object_type, UNITY_TEST_TYPE_IO_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);
}
gpointer unity_test_value_get_io_suite ( const GValue *  value)

Definition at line 419 of file test-io.c.

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

Definition at line 376 of file test-io.c.

                                                                                                                                                {
       if (collect_values[0].v_pointer) {
              UnityTestIOSuite* 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_io_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_io_suite_copy_value ( const GValue *  src_value,
GValue *  dest_value 
) [static]

Definition at line 362 of file test-io.c.

                                                                                               {
       if (src_value->data[0].v_pointer) {
              dest_value->data[0].v_pointer = unity_test_io_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_io_suite_free_value ( GValue *  value) [static]

Definition at line 355 of file test-io.c.

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

Here is the call graph for this function:

static void unity_test_value_io_suite_init ( GValue *  value) [static]

Definition at line 350 of file test-io.c.

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

Definition at line 393 of file test-io.c.

                                                                                                                                                    {
       UnityTestIOSuite** 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_io_suite_ref (value->data[0].v_pointer);
       }
       return NULL;
}

Here is the call graph for this function:

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

Definition at line 371 of file test-io.c.

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

Definition at line 425 of file test-io.c.

                                                                      {
       UnityTestIOSuite* old;
       g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_IO_SUITE));
       old = value->data[0].v_pointer;
       if (v_object) {
              g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TEST_TYPE_IO_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_io_suite_ref (value->data[0].v_pointer);
       } else {
              value->data[0].v_pointer = NULL;
       }
       if (old) {
              unity_test_io_suite_unref (old);
       }
}

Here is the call graph for this function:

void unity_test_value_take_io_suite ( GValue *  value,
gpointer  v_object 
)

Definition at line 443 of file test-io.c.

                                                                       {
       UnityTestIOSuite* old;
       g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_TEST_TYPE_IO_SUITE));
       old = value->data[0].v_pointer;
       if (v_object) {
              g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_TEST_TYPE_IO_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_io_suite_unref (old);
       }
}

Here is the call graph for this function:


Variable Documentation

gpointer unity_test_io_suite_parent_class = NULL [static]

Definition at line 124 of file test-io.c.

static gchar * unity_test_io_suite_TEST_DATA = NULL [static]

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