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__
24 #include <libmissioncontrol/mc-account.h>
27 check_helpers_init (void);
30 expect_critical (gboolean expected
);
35 #define fail_unless_critical(expr, ...) \
37 expect_critical (TRUE); \
39 _fail_unless (got_critical (), __FILE__, __LINE__, \
40 "Expected g_critical, got none", ## __VA_ARGS__, NULL); \
41 expect_critical (FALSE); \
44 #endif /* #ifndef __CHECK_HELPERS_H__ */