~cjdahlin/libnih/async

« back to all changes in this revision

Viewing changes to nih/tests/test_com.netsplit.Nih.Test_proxy.c

  • Committer: Casey Dahlin
  • Date: 2009-01-29 05:11:43 UTC
  • Revision ID: cdahlin@redhat.com-20090129051143-8b6fr124pufd5p3f
* nih/nih_dbus_tool.py (exportTypedefs): Make user callbacks take a proxy.
(asyncNotifyFunction): Pass proxy when calling handler in data.
* nih/tests/test_com.netsplit.Nih.Test_proxy.c: Update test to reflect new call
signature, and test that the new argument is right.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        conn = my_setup ();
93
93
        proxy = nih_dbus_proxy_new (NULL, conn, NULL, "/com/netsplit/Nih");
94
94
 
95
 
        auto void async_with_valid_argument (void *userdata, char *output);
 
95
        auto void async_with_valid_argument (NihDBusProxy *proxy, void *userdata, char *output);
96
96
 
97
97
        called = 0;
98
98
 
101
101
 
102
102
        TEST_EQ (ret, 0);
103
103
 
104
 
        void async_with_valid_argument (void *userdata, char *async_output)
 
104
        void async_with_valid_argument (NihDBusProxy *my_proxy, void *userdata, char *async_output)
105
105
        {
106
106
                TEST_NE_P (async_output, NULL);
107
107
                TEST_ALLOC_PARENT (async_output, proxy);
108
108
                TEST_EQ_STR (async_output, "test data");
109
109
                TEST_EQ_STR (userdata, "userdata");
 
110
                TEST_EQ_P (my_proxy, proxy);
110
111
                called = 1;
111
112
        }
112
113