Thu, 25 Aug 2022 22:45:58 -0500
Handle delete event in more dialogs (probably all, but can't be too sure.)
Testing Done:
Compile only.
Reviewed at https://reviews.imfreedom.org/r/1652/
|
37609
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* purple |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Purple is the legal property of its developers, whose names are too numerous |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * source distribution. |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | */ |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | #ifndef PURPLE_TESTS_H |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | #define PURPLE_TESTS_H |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | #include <glib.h> |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | G_BEGIN_DECLS |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | typedef struct { |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | const gchar *input; |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | const gchar *output; |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | } PurpleTestStringData; |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
38745
f4376b1f4682
A ton more of introspection cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
38530
diff
changeset
|
33 | typedef const gchar *(*PurpleTestStringFunc)(const gchar *str); |
|
f4376b1f4682
A ton more of introspection cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
38530
diff
changeset
|
34 | typedef gchar *(*PurpleTestStringFreeFunc)(const gchar *str); |
|
37609
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
38530
40f7a9d57b11
Fix jutil test building.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37609
diff
changeset
|
36 | static inline void |
|
37609
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | purple_test_string_compare(PurpleTestStringFunc func, |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | PurpleTestStringData data[]) |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | { |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | gint i; |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | for(i = 0; data[i].input; i++) |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | g_assert_cmpstr(data[i].output, ==, func(data[i].input)); |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | } |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | |
|
38530
40f7a9d57b11
Fix jutil test building.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37609
diff
changeset
|
46 | static inline void |
|
37609
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | purple_test_string_compare_free(PurpleTestStringFreeFunc func, |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | PurpleTestStringData data[]) |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | { |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | gint i; |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | for(i = 0; data[i].input; i++) { |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | gchar *got = func(data[i].input); |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | g_assert_cmpstr(data[i].output, ==, got); |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | g_free(got); |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | } |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | } |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | G_END_DECLS |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | |
|
a265dfe49fcb
Add a header file with some utils for testing
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | #endif /* PURPLE_TESTS_H */ |