1 /* ADG - Automatic Drawing Generation
2 * Copyright (C) 2007-2015 Nicola Fontana <ntd at entidi.it>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #ifndef __ADG_TEST_H__
22 #define __ADG_TEST_H__
25 #include <glib-object.h>
30 /* Some backward compatible macros */
32 #define g_assert_true(expr) do { if G_LIKELY (expr) ; else \
33 g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
34 "'" #expr "' should be TRUE"); \
38 #ifndef g_assert_false
39 #define g_assert_false(expr) do { if G_LIKELY (!(expr)) ; else \
40 g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
41 "'" #expr "' should be FALSE"); \
46 #define g_assert_null(expr) do { if G_LIKELY ((expr) == NULL) ; else \
47 g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
48 "'" #expr "' should be NULL"); \
52 #ifndef g_assert_nonnull
53 #define g_assert_nonnull(expr) do { if G_LIKELY ((expr) != NULL) ; else \
54 g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
55 "'" #expr "' should not be NULL"); \
60 void adg_test_init (int *p_argc
,
62 const gpointer
adg_test_invalid_pointer (void);
63 cairo_t
* adg_test_cairo_context (void);
64 int adg_test_cairo_num_data (cairo_t
*cr
);
65 void adg_test_add_func (const gchar
*testpath
,
67 void adg_test_add_func_full (const char *testpath
,
70 void adg_test_add_enum_checks (const gchar
*testpath
,
72 void adg_test_add_boxed_checks (const gchar
*testpath
,
75 void adg_test_add_object_checks (const gchar
*testpath
,
77 void adg_test_add_entity_checks (const gchar
*testpath
,
79 void adg_test_add_global_space_checks(const gchar
*testpath
,
81 void adg_test_add_local_space_checks (const gchar
*testpath
,
87 #endif /* __ADG_TEST_H__ */