3 * Purple is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
21 #ifndef PURPLE_TESTS_H
22 #define PURPLE_TESTS_H
31 } PurpleTestStringData
;
33 typedef const gchar
*(*PurpleTestStringFunc
)(const gchar
*str
);
34 typedef gchar
*(*PurpleTestStringFreeFunc
)(const gchar
*str
);
37 purple_test_string_compare(PurpleTestStringFunc func
,
38 PurpleTestStringData data
[])
42 for(i
= 0; data
[i
].input
; i
++)
43 g_assert_cmpstr(data
[i
].output
, ==, func(data
[i
].input
));
47 purple_test_string_compare_free(PurpleTestStringFreeFunc func
,
48 PurpleTestStringData data
[])
52 for(i
= 0; data
[i
].input
; i
++) {
53 gchar
*got
= func(data
[i
].input
);
55 g_assert_cmpstr(data
[i
].output
, ==, got
);
64 #endif /* PURPLE_TESTS_H */