Another sanity check

Sun, 26 Nov 2017 02:45:33 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Sun, 26 Nov 2017 02:45:33 -0600
changeset 38844
8b77fd20fcea
parent 38843
1e1822eeeb54
child 38845
f451f9216e9d

Another sanity check

libpurple/tests/test_protocol_xfer.c file | annotate | diff | comparison | revisions
--- a/libpurple/tests/test_protocol_xfer.c	Sun Nov 26 02:44:11 2017 -0600
+++ b/libpurple/tests/test_protocol_xfer.c	Sun Nov 26 02:45:33 2017 -0600
@@ -38,6 +38,7 @@
 	PurpleProtocol parent;
 
 	gboolean can_send;
+	gboolean new_xfer_called;
 } TestPurpleProtocolXfer;
 
 typedef struct {
@@ -54,8 +55,11 @@
 
 static PurpleXfer *
 test_purple_protocol_xfer_new_xfer(PurpleProtocolXfer *prplxfer, PurpleConnection *c, const gchar *who) {
+	TestPurpleProtocolXfer *test_xfer = (TestPurpleProtocolXfer *)prplxfer;
 	PurpleAccount *a = purple_connection_get_account(c);
 
+	test_xfer->new_xfer_called = TRUE;
+
 	return purple_xfer_new(a, PURPLE_XFER_TYPE_SEND, who);
 }
 
@@ -126,6 +130,7 @@
 	xfer = purple_protocol_xfer_new_xfer(PURPLE_PROTOCOL_XFER(prplxfer), c, "foo");
 	g_assert_true(PURPLE_IS_XFER(xfer));
 	g_assert_cmpstr("foo", ==, purple_xfer_get_remote_user(xfer));
+	g_assert_true(prplxfer->new_xfer_called);
 }
 
 /******************************************************************************

mercurial