1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  *  Copyright (C) 2008-2010  Kouhei Sutou <kou@clear-code.com>
4  *
5  *  This library is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU Lesser General Public License as published by
7  *  the Free Software Foundation, either version 3 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This library is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU Lesser General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Lesser General Public License
16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef __GCUT_ASSERTIONS_HELPER_H__
21 #define __GCUT_ASSERTIONS_HELPER_H__
22 
23 #include <glib.h>
24 
25 #include <cutter.h>
26 #include <gcutter/gcut-value-equal.h>
27 #include <gcutter/gcut-list.h>
28 #include <gcutter/gcut-hash-table.h>
29 #include <gcutter/gcut-public.h>
30 #include <gcutter/gcut-test-utils.h>
31 #include <gcutter/gcut-error.h>
32 #include <gcutter/gcut-enum.h>
33 #include <gcutter/gcut-object.h>
34 #include <gcutter/gcut-egg.h>
35 #include <gcutter/gcut-process.h>
36 #include <gcutter/gcut-string.h>
37 #include <gcutter/gcut-io.h>
38 #include <gcutter/gcut-key-file.h>
39 #include <gcutter/gcut-inspect.h>
40 #include <gcutter/gcut-data.h>
41 
42 G_BEGIN_DECLS
43 
44 void      gcut_assert_equal_type_helper     (GType           expected,
45                                              GType           actual,
46                                              const gchar    *expression_expected,
47                                              const gchar    *expression_actual);
48 void      gcut_assert_equal_value_helper    (GValue         *expected,
49                                              GValue         *actual,
50                                              const gchar    *expression_expected,
51                                              const gchar    *expression_actual);
52 void      gcut_assert_equal_list_helper     (const GList    *expected,
53                                              const GList    *actual,
54                                              GEqualFunc      equal_function,
55                                              GCutInspectFunction inspect_function,
56                                              gpointer        inspect_user_data,
57                                              const gchar    *expression_expected,
58                                              const gchar    *expression_actual,
59                                              const gchar    *expression_equal_function);
60 void      gcut_assert_equal_list_int_helper (const GList    *expected,
61                                              const GList    *actual,
62                                              const gchar    *expression_expected,
63                                              const gchar    *expression_actual);
64 void      gcut_assert_equal_list_uint_helper(const GList    *expected,
65                                              const GList    *actual,
66                                              const gchar    *expression_expected,
67                                              const gchar    *expression_actual);
68 void      gcut_assert_equal_list_string_helper
69                                             (const GList    *expected,
70                                              const GList    *actual,
71                                              const gchar    *expression_expected,
72                                              const gchar    *expression_actual);
73 void      gcut_assert_equal_list_enum_helper
74                                             (GType           type,
75                                              const GList    *expected,
76                                              const GList    *actual,
77                                              const gchar    *expression_type,
78                                              const gchar    *expression_expected,
79                                              const gchar    *expression_actual);
80 void      gcut_assert_equal_list_flags_helper
81                                             (GType           type,
82                                              const GList    *expected,
83                                              const GList    *actual,
84                                              const gchar    *expression_type,
85                                              const gchar    *expression_expected,
86                                              const gchar    *expression_actual);
87 void      gcut_assert_equal_list_object_helper
88                                             (const GList    *expected,
89                                              const GList    *actual,
90                                              GEqualFunc      equal_function,
91                                              const gchar    *expression_expected,
92                                              const gchar    *expression_actual);
93 void      gcut_assert_equal_hash_table_helper
94                                             (GHashTable     *expected,
95                                              GHashTable     *actual,
96                                              GEqualFunc      equal_function,
97                                              GCutInspectFunction key_inspect_function,
98                                              GCutInspectFunction value_inspect_function,
99                                              gpointer        inspect_user_data,
100                                              const gchar    *expression_expected,
101                                              const gchar    *expression_actual,
102                                              const gchar    *expression_equal_function);
103 void      gcut_assert_equal_hash_table_string_string_helper
104                                             (GHashTable     *expected,
105                                              GHashTable     *actual,
106                                              const gchar    *expression_expected,
107                                              const gchar    *expression_actual);
108 void      gcut_assert_error_helper          (GError         *error,
109                                              const gchar    *expression_error);
110 void      gcut_assert_equal_error_helper    (const GError   *expected,
111                                              const GError   *actual,
112                                              const gchar    *expression_expected,
113                                              const gchar    *expression_actual);
114 void      gcut_assert_remove_path_helper    (const gchar    *path,
115                                              ...) G_GNUC_NULL_TERMINATED;
116 void      gcut_assert_equal_time_val_helper (GTimeVal       *expected,
117                                              GTimeVal       *actual,
118                                              const gchar    *expression_expected,
119                                              const gchar    *actual_expected);
120 void      gcut_assert_equal_enum_helper     (GType           enum_type,
121                                              gint            expected,
122                                              gint            actual,
123                                              const gchar    *expression_enum_type,
124                                              const gchar    *expression_expected,
125                                              const gchar    *expression_actual);
126 void      gcut_assert_equal_flags_helper    (GType           flags_type,
127                                              gint            expected,
128                                              gint            actual,
129                                              const gchar    *expression_flags_type,
130                                              const gchar    *expression_expected,
131                                              const gchar    *expression_actual);
132 
133 void      gcut_assert_equal_object_helper   (GObject        *expected,
134                                              GObject        *actual,
135                                              GEqualFunc      equal_function,
136                                              const gchar    *expression_expected,
137                                              const gchar    *expression_actual,
138                                              const gchar    *expression_equal_function);
139 void      gcut_assert_equal_int64_helper    (gint64          expected,
140                                              gint64          actual,
141                                              const char     *expression_expected,
142                                              const char     *expression_actual);
143 void      gcut_assert_not_equal_int64_helper(gint64          expected,
144                                              gint64          actual,
145                                              const char     *expression_expected,
146                                              const char     *expression_actual);
147 void      gcut_assert_equal_uint64_helper   (guint64         expected,
148                                              guint64         actual,
149                                              const char     *expression_expected,
150                                              const char     *expression_actual);
151 void      gcut_assert_not_equal_uint64_helper
152                                             (guint64         expected,
153                                              guint64         actual,
154                                              const char     *expression_expected,
155                                              const char     *expression_actual);
156 void      gcut_assert_equal_pid_helper      (GPid            expected,
157                                              GPid            actual,
158                                              const char     *expression_expected,
159                                              const char     *expression_actual);
160 void      gcut_assert_not_equal_pid_helper  (GPid            expected,
161                                              GPid            actual,
162                                              const char     *expression_expected,
163                                              const char     *expression_actual);
164 void      gcut_assert_equal_string_helper
165                                             (const GString  *expected,
166                                              const GString  *actual,
167                                              const gchar    *expression_expected,
168                                              const gchar    *expression_actual);
169 
170 G_END_DECLS
171 
172 #endif /* __GCUT_ASSERTIONS_HELPER_H__ */
173 
174 /*
175 vi:nowrap:ai:expandtab:sw=4:ts=4
176 */
177