libpurple/tests/test_protocol_attention.c

Mon, 28 May 2018 15:41:02 -0500

author
Mike Ruprecht <cmaiku@gmail.com>
date
Mon, 28 May 2018 15:41:02 -0500
changeset 39166
7119cb1afdb8
parent 38974
8e28ea692d15
child 40579
882884b9bc97
permissions
-rw-r--r--

tests: Add tests for PurpleQueuedOutputStream

38860
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 *
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 * Purple is the legal property of its developers, whose names are too
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * numerous to list here. Please refer to the COPYRIGHT file distributed
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * with this source distribution
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 *
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * 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
9 * it under the terms of the GNU General Public License as published by
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or (at
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * your option) any later version.
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 *
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * General Public License for more details.
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 *
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
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 #include "test_ui.h"
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
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 * PurpleProtcolAttention Implementations
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 *****************************************************************************/
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 static GType test_purple_protocol_attention_get_type(void);
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 typedef struct {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 PurpleProtocol parent;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 gboolean send_called;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 } TestPurpleProtocolAttention;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 typedef struct {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 PurpleProtocolClass parent;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 } TestPurpleProtocolAttentionClass;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44
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 static gboolean
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 test_purple_protocol_attention_send(PurpleProtocolAttention *attn, PurpleConnection *c, const gchar *username, guint type) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 TestPurpleProtocolAttention *test_attn = (TestPurpleProtocolAttention *)attn;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 test_attn->send_called = TRUE;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 return TRUE;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 }
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 static GList *
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 test_purple_protocol_attention_get_types(PurpleProtocolAttention *attn, PurpleAccount *acct) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 GList *types = NULL;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 types = g_list_append(types, 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
60
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 return types;
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
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 test_purple_protocol_attention_iface_init(PurpleProtocolAttentionInterface *iface) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 iface->send = test_purple_protocol_attention_send;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 iface->get_types = test_purple_protocol_attention_get_types;
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 G_DEFINE_TYPE_WITH_CODE(
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 TestPurpleProtocolAttention,
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 test_purple_protocol_attention,
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 PURPLE_TYPE_PROTOCOL,
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 G_IMPLEMENT_INTERFACE(
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 PURPLE_TYPE_PROTOCOL_ATTENTION,
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 test_purple_protocol_attention_iface_init
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 )
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
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 test_purple_protocol_attention_init(TestPurpleProtocolAttention *prplattn) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 PurpleProtocol *prpl = PURPLE_PROTOCOL(prplattn);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 prpl->id = "prpl-attention";
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
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 test_purple_protocol_attention_class_init(TestPurpleProtocolAttentionClass *klass) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 }
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 /******************************************************************************
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 * Tests
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_protocol_attention_can_send(void) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 TestPurpleProtocolAttention *attn = g_object_new(test_purple_protocol_attention_get_type(), NULL);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 PurpleAccount *a = purple_account_new("prpl-attn-can-send", "prpl-attn");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 PurpleConnection *c = g_object_new(PURPLE_TYPE_CONNECTION, "account", a, NULL);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 gboolean actual = FALSE;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 attn->send_called = FALSE;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 actual = purple_protocol_attention_send(PURPLE_PROTOCOL_ATTENTION(attn), c, "someguy", 0);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 g_assert_true(actual);
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 g_assert_true(attn->send_called);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 }
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108 static void
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 test_purple_protocol_attention_can_get_types(void) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 TestPurpleProtocolAttention *attn = g_object_new(test_purple_protocol_attention_get_type(), NULL);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111 PurpleAccount *a = purple_account_new("prpl-attn-can-get-types", "prpl-attn");
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 GList *types = NULL;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 PurpleAttentionType *type = NULL;
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 types = purple_protocol_attention_get_types(PURPLE_PROTOCOL_ATTENTION(attn), a);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 g_assert_true(g_list_length(types) == 1);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117
38861
21858f98040c Address the issues that Qulogic found
Gary Kramlich <grim@reaperworld.com>
parents: 38860
diff changeset
118 /* take the first item and cast it into type */
38860
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 type = (PurpleAttentionType *)(types->data);
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 g_assert(type);
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 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
123 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
124 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
125 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
126 }
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127
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 * Main
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 gint
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 main(gint argc, gchar **argv) {
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133 gint res = 0;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 g_test_init(&argc, &argv, NULL);
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_set_nonfatal_assertions();
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 test_ui_purple_init();
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 "/protocol-attention/send",
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 test_purple_protocol_attention_can_send
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 "/protocol-attention/get-types",
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148 test_purple_protocol_attention_can_get_types
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 res = g_test_run();
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 return res;
4af13de1fee2 Finish up the unit tests for the attention cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154 }

mercurial