Tue, 13 Aug 2024 01:41:26 -0500
Modernize most of the unit tests
This includes setting nonfatal assertions not using the test-ui unless
necessary, not using gint/gchar, making sure our signal counters are guint's,
and not testing the "get_default" methods.
Testing Done:
Ran the turtles.
Reviewed at https://reviews.imfreedom.org/r/3363/
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * This library is free software; you can redistribute it and/or |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * modify it under the terms of the GNU Lesser General Public |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * License as published by the Free Software Foundation; either |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * version 2 of the License, or (at your option) any later version. |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * This library is distributed in the hope that it will be useful, |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * Lesser General Public License for more details. |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU Lesser General Public |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * License along with this library; if not, see <https://www.gnu.org/licenses/>. |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | */ |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | #include <glib.h> |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | #include <purple.h> |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | /****************************************************************************** |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | * Callbacks |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | *****************************************************************************/ |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | static void |
|
42835
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
27 | test_purple_notification_authorization_request_notify_cb(GObject *obj, |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | G_GNUC_UNUSED GParamSpec *pspec, |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | gpointer data) |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | { |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | guint *counter = data; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | g_assert_true(PURPLE_IS_NOTIFICATION(obj)); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | *counter = *counter + 1; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | } |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | /****************************************************************************** |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | * Tests |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | *****************************************************************************/ |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | static void |
|
42835
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
42 | test_purple_notification_authorization_request_new(void) { |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | PurpleAccount *account = NULL; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | PurpleAuthorizationRequest *request = NULL; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | PurpleNotification *notification = NULL; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | account = purple_account_new("test", "test"); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | request = purple_authorization_request_new(account, "remote-username"); |
|
42835
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
49 | notification = purple_notification_authorization_request_new(request); |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | g_assert_true(PURPLE_IS_NOTIFICATION(notification)); |
|
42835
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
52 | g_assert_true(PURPLE_IS_NOTIFICATION_AUTHORIZATION_REQUEST(notification)); |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | g_assert_finalize_object(notification); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | g_clear_object(&request); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | g_clear_object(&account); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | } |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | static void |
|
42835
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
61 | test_purple_notification_authorization_request_properties(void) { |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | PurpleAccount *account = NULL; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | PurpleAuthorizationRequest *request = NULL; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | PurpleAuthorizationRequest *request1 = NULL; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | PurpleNotification *notification = NULL; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | account = purple_account_new("test", "test"); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | request = purple_authorization_request_new(account, "username"); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | notification = g_object_new( |
|
42835
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
71 | PURPLE_TYPE_NOTIFICATION_AUTHORIZATION_REQUEST, |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | "account", account, |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | "authorization-request", request, |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | NULL); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | g_object_get( |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | notification, |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | "authorization-request", &request1, |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | NULL); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | g_assert_true(request1 == request); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | g_clear_object(&request1); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | g_assert_finalize_object(notification); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | g_clear_object(&request); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | g_clear_object(&account); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | } |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | static void |
|
42835
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
91 | test_purple_notification_authorization_request_updates_title(void) { |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | PurpleAccount *account = NULL; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | PurpleAuthorizationRequest *request = NULL; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | PurpleNotification *notification = NULL; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | guint counter = 0; |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | account = purple_account_new("test", "test"); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | request = purple_authorization_request_new(account, "remote-username"); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | |
|
42835
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
100 | notification = purple_notification_authorization_request_new(request); |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | g_signal_connect(notification, "notify::title", |
|
42835
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
102 | G_CALLBACK(test_purple_notification_authorization_request_notify_cb), |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
103 | &counter); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | g_assert_cmpuint(counter, ==, 0); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | purple_authorization_request_set_alias(request, "foo"); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | g_assert_cmpuint(counter, ==, 1); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
111 | g_assert_finalize_object(notification); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
113 | g_clear_object(&request); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
114 | g_clear_object(&account); |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
115 | } |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
116 | |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
117 | /****************************************************************************** |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
118 | * Main |
|
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
119 | *****************************************************************************/ |
|
42866
4b201e18638f
Modernize most of the unit tests
Gary Kramlich <grim@reaperworld.com>
parents:
42835
diff
changeset
|
120 | int |
|
4b201e18638f
Modernize most of the unit tests
Gary Kramlich <grim@reaperworld.com>
parents:
42835
diff
changeset
|
121 | main(int argc, char *argv[]) { |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
122 | g_test_init(&argc, &argv, NULL); |
|
42866
4b201e18638f
Modernize most of the unit tests
Gary Kramlich <grim@reaperworld.com>
parents:
42835
diff
changeset
|
123 | g_test_set_nonfatal_assertions(); |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
124 | |
|
42835
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
125 | g_test_add_func("/notification-request-authorization/new", |
|
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
126 | test_purple_notification_authorization_request_new); |
|
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
127 | g_test_add_func("/notification-request-authorization/properties", |
|
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
128 | test_purple_notification_authorization_request_properties); |
|
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
129 | g_test_add_func("/notification-request-authorization/updates-title", |
|
3144fbeba349
Rename AuthorizationRequestNotification to NotificationAuthorizationRequest
Gary Kramlich <grim@reaperworld.com>
parents:
42651
diff
changeset
|
130 | test_purple_notification_authorization_request_updates_title); |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
131 | |
|
42866
4b201e18638f
Modernize most of the unit tests
Gary Kramlich <grim@reaperworld.com>
parents:
42835
diff
changeset
|
132 | return g_test_run(); |
|
42651
5ad29b5bf1c7
Create PurpleAuthorizationRequestNotification
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
133 | } |