Updated Spanish translation
[empathy-mirror.git] / tests / check-helpers.h
blobb71b3b65b93817f2373702bf5b0778fe5d7581b5
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>
25 void
26 check_helpers_init (void);
28 void
29 expect_critical (gboolean expected);
31 gboolean
32 got_critical (void);
34 #define fail_unless_critical(expr, ...) \
35 G_STMT_START { \
36 expect_critical (TRUE); \
37 expr; \
38 _fail_unless (got_critical (), __FILE__, __LINE__, \
39 "Expected g_critical, got none", ## __VA_ARGS__, NULL); \
40 expect_critical (FALSE); \
41 } G_STMT_END;
43 #endif /* #ifndef __CHECK_HELPERS_H__ */