Tagged for release 2.26.0.
[empathy-mirror.git] / tests / check-helpers.h
blob3e0783811b0b7b67b3fc26ff4dee276a692ac323
1 /*
2 * check-helpers.c - Source for some check helpers
3 * Copyright (C) 2007 Collabora Ltd.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
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 GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef __CHECK_HELPERS_H__
20 #define __CHECK_HELPERS_H__
22 #include <glib.h>
23 #include <check.h>
24 #include <libmissioncontrol/mc-account.h>
26 void
27 check_helpers_init (void);
29 void
30 expect_critical (gboolean expected);
32 gboolean
33 got_critical (void);
35 #define fail_unless_critical(expr, ...) \
36 G_STMT_START { \
37 expect_critical (TRUE); \
38 expr; \
39 _fail_unless (got_critical (), __FILE__, __LINE__, \
40 "Expected g_critical, got none", ## __VA_ARGS__, NULL); \
41 expect_critical (FALSE); \
42 } G_STMT_END;
44 #endif /* #ifndef __CHECK_HELPERS_H__ */