grim/gplate

Preparing for release
gplate-0.0.1
2008-03-02, grim
d1e5bb0ba8eb
Preparing for release
#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));
}