grim/gplate
Clone
Summary
Browse
Changes
Graph
The start of moving testing from autotools and check to gtester and ctest
2010-06-26, Gary Kramlich
125f0d26e4cb
The start of moving testing from autotools and check to gtester and ctest
refs #11
#include
<check.h>
#include
"test-object.h"
void
test_object_is_a
(
GObject
*
obj
,
GType
is_a
)
{
GType
type
=
G_TYPE_INVALID
;
fail_unless
(
G_IS_OBJECT
(
obj
),
"'%p' is not an object."
,
obj
);
type
=
G_OBJECT_TYPE
(
obj
);
fail_unless
(
type
!=
G_TYPE_INVALID
,
"'%p' appears to not have a GType."
,
obj
);
fail_unless
(
g_type_is_a
(
type
,
is_a
),
"'%s' is not a '%s'."
,
g_type_name
(
type
),
g_type_name
(
is_a
));
}