GObject用の検証ユーティリティ

GObject用の検証ユーティリティ — GObjectに関する検証をもっと簡単に書くためのユーティリティ。

Functions

説明

検証を書くためには等価性を検証し、期待値と実測値を表示する必要があります。

このユーティリティはGObjectに関する検証の作成を補助します。

Functions

gcut_object_equal ()

gboolean
gcut_object_equal (const GObject *object1,
                   const GObject *object2,
                   GEqualFunc equal_func);

Compares two GObject, object1 and object2 by equal_func . If equal_func is NULL, object1 and object2 is just only compared by memory location.

Parameters

object1

比較するGObject

 

object2

比較するGObject

 

equal_func

ふたつのGObjectを比較する関数。NULLも可。

 

Returns

TRUE if object1 == object2 or equal_func (object1 , object2 ), FALSE otherwise.

Since: 1.0.5


gcut_object_inspect ()

gchar *
gcut_object_inspect (const GObject *object);

Inspects object 's property. The returned string should be freed when no longer needed.

Parameters

object

GObject

 

Returns

objectの詳細を示した文字列。

Since: 1.0.5


gcut_object_inspect_custom ()

gchar *
gcut_object_inspect_custom (const GObject *object,
                            GCutInspectFunction inspect_func,
                            gpointer user_data);

Inspects object by inspect_func . The returned string should be freed when no longer needed.

Parameters

object

GObject

 

inspect_func

a function that inspects object .

 

user_data

関数に渡すユーザ用データ。

 

Returns

objectの詳細を示した文字列。

Since: 1.0.5

Types and Values