2 * Classy Test - Terrible framework for testing asyncronous interface
4 * Copyright (C) 2008 Codethink Ltd
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
24 #include <glib-object.h>
28 GType classy_test_get_type(void);
30 #define TYPE_CLASSY_TEST (classy_test_get_type())
32 #define CLASSY_TEST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
36 #define CLASSY_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
40 #define IS_CLASSY_TEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
43 #define IS_CLASSY_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
46 #define CLASSY_TEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
50 typedef struct _ClassyTest ClassyTest;
51 typedef struct _ClassyTestClass ClassyTestClass;
54 CLASSY_TEST_NOT_STARTED,
55 CLASSY_TEST_IN_PROGRESS,
67 void (*entry) (ClassyTest *tc, gpointer data);
72 struct _ClassyTestClass {
76 gchar *(*report) (ClassyTest *test);
77 void (*run) (ClassyTest *test);
84 classy_test_new(gchar *name,
85 void (*entry) (ClassyTest*, gpointer data),
90 classy_test_pass(ClassyTest *test);
93 classy_test_fail(ClassyTest *test, gchar *fmt, ...);
96 classy_test_state(ClassyTest *test);
99 #endif /* CLASSY_TEST_H */