libpurple/tests/test_attention_type.c

Tue, 06 Apr 2021 03:35:20 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Tue, 06 Apr 2021 03:35:20 -0500
changeset 40840
b5f355f90ab0
parent 40579
882884b9bc97
permissions
-rw-r--r--

Port the updates from 2.14.2 and the upcoming 2.14.3 to 3.0.0

* Use the unicode version of the System and UserInfo plugins to fix
non-english languages in the Windows installer.
* Update the installer to use the inetc plugin so that https downloads will
work. This became necessary because Sourceforge now redirects http to
https.
* Standardize everything in pidgin/win32/winpidgin.c to use `wprintf`.

Testing Done:
Compiled and ran on windows 10.

Reviewed at https://reviews.imfreedom.org/r/595/

38860
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
2 * purple
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
38860
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
7 * source distribution.
38860
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
12 * (at your option) any later version.
38860
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
14 * This program is distributed in the hope that it will be useful,
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
17 * GNU General Public License for more details.
38860
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
40579
882884b9bc97 Split PurpleAttentionType and PurpleProtocolAttention into their own files
Gary Kramlich <grim@reaperworld.com>
parents: 38974
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
38860
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #include <glib.h>
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 #include <string.h>
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 #include <purple.h>
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 /******************************************************************************
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 * Tests
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 *****************************************************************************/
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 test_purple_attention_type_new(void) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 PurpleAttentionType *type = NULL;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 type = purple_attention_type_new("id", "name", "incoming", "outgoing");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 /* check the values new sets */
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 g_assert_cmpstr(purple_attention_type_get_unlocalized_name(type), ==, "id");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 g_assert_cmpstr(purple_attention_type_get_name(type), ==, "name");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 g_assert_cmpstr(purple_attention_type_get_incoming_desc(type), ==, "incoming");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 g_assert_cmpstr(purple_attention_type_get_outgoing_desc(type), ==, "outgoing");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 /* check that default values are correct */
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 g_assert_cmpstr(purple_attention_type_get_icon_name(type), ==, NULL);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 g_free(type);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 }
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 test_purple_attention_type_copy(void) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 PurpleAttentionType *type1 = NULL, *type2 = NULL;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 type1 = purple_attention_type_new("id", "name", "incoming", "outgoing");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 type2 = purple_attention_type_copy(type1);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 /* check the values new sets */
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 g_assert_cmpstr(purple_attention_type_get_unlocalized_name(type2), ==, "id");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 g_assert_cmpstr(purple_attention_type_get_name(type2), ==, "name");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 g_assert_cmpstr(purple_attention_type_get_incoming_desc(type2), ==, "incoming");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 g_assert_cmpstr(purple_attention_type_get_outgoing_desc(type2), ==, "outgoing");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 /* check that default values are correct */
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 g_assert_cmpstr(purple_attention_type_get_icon_name(type2), ==, NULL);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 g_free(type1);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 g_free(type2);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 }
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 test_purple_attention_type_set_unlocalized_name(void) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 PurpleAttentionType *type = NULL;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 type = purple_attention_type_new("id", "name", "incoming", "outgoing");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 purple_attention_type_set_unlocalized_name(type, "this-is-my-id");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 g_assert_cmpstr(purple_attention_type_get_unlocalized_name(type), ==, "this-is-my-id");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 g_free(type);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 }
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 test_purple_attention_type_set_name(void) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 PurpleAttentionType *type = NULL;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 type = purple_attention_type_new("id", "name", "incoming", "outgoing");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 purple_attention_type_set_name(type, "this-is-my-name");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 g_assert_cmpstr(purple_attention_type_get_name(type), ==, "this-is-my-name");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 g_free(type);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 }
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 test_purple_attention_type_set_incoming_desc(void) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 PurpleAttentionType *type = NULL;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 type = purple_attention_type_new("id", "name", "incoming", "outgoing");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 purple_attention_type_set_incoming_desc(type, "this-is-my-incoming-desc");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 g_assert_cmpstr(purple_attention_type_get_incoming_desc(type), ==, "this-is-my-incoming-desc");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 g_free(type);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 }
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 test_purple_attention_type_set_outgoing_desc(void) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108 PurpleAttentionType *type = NULL;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 type = purple_attention_type_new("id", "name", "incoming", "outgoing");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 purple_attention_type_set_outgoing_desc(type, "this-is-my-outgoing-desc");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 g_assert_cmpstr(purple_attention_type_get_outgoing_desc(type), ==, "this-is-my-outgoing-desc");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115 g_free(type);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 }
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 test_purple_attention_type_set_icon_name(void) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 PurpleAttentionType *type = NULL;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 type = purple_attention_type_new("id", "name", "incoming", "outgoing");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 purple_attention_type_set_icon_name(type, "this-is-my-icon-name");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 g_assert_cmpstr(purple_attention_type_get_icon_name(type), ==, "this-is-my-icon-name");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 g_free(type);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 }
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 /******************************************************************************
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 * Main
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 *****************************************************************************/
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133 gint
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 main(gint argc, gchar **argv) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 gint res = 0;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 g_test_init(&argc, &argv, NULL);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 g_test_set_nonfatal_assertions();
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 g_test_add_func(
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 "/attention-type/new",
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 test_purple_attention_type_new
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 );
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146 g_test_add_func(
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 "/attention-type/copy",
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148 test_purple_attention_type_copy
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 );
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 g_test_add_func(
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152 "/attention-type/set-unlocalized-name",
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 test_purple_attention_type_set_unlocalized_name
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154 );
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
156 g_test_add_func(
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
157 "/attention-type/set-name",
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
158 test_purple_attention_type_set_name
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
159 );
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
161 g_test_add_func(
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
162 "/attention-type/set-incoming-desc",
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
163 test_purple_attention_type_set_incoming_desc
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
164 );
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
165
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
166 g_test_add_func(
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
167 "/attention-type/set-outgoing-desc",
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
168 test_purple_attention_type_set_outgoing_desc
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
169 );
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
170
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
171 g_test_add_func(
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
172 "/attention-type/set-icon-name",
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
173 test_purple_attention_type_set_icon_name
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
174 );
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
175
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
176 res = g_test_run();
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
178 return res;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 }

mercurial