From a89c6663a0cf1deec82d8492fb897fd8541c1194 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Tue, 9 Mar 2010 09:33:12 +1100 Subject: More snapshot, just need to deal with other sound-service components now. --- tests/test-pulse-manager.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'tests/test-pulse-manager.c') diff --git a/tests/test-pulse-manager.c b/tests/test-pulse-manager.c index 2bc1c51..f5dfb80 100644 --- a/tests/test-pulse-manager.c +++ b/tests/test-pulse-manager.c @@ -37,12 +37,25 @@ static void test_sink_insert() sink_info *value; value = g_new0(sink_info, 1); value->index = 8; - value->name = "mock_sink";" - value->description = "mock description" - value->mute = FALSE - value->volume = 30000; // almost full + value->name = "mock_sink"; + value->description = "mock description"; + value->mute = FALSE; + pa_cvolume volume; // nearly full volume: + pa_cvolume_set(&volume, 1, 30000); + value->volume = volume; // update_sink_info is a static method in pulse-manager.c ? - pa_context_get_sink_info_by_index(context, value->index, update_sink_info); + pa_context_get_sink_info_by_index(context, value->index, update_sink_info, NULL); // the mockinkg lib should then return this mocked up sink_info to the method update_sink_info which tests could be wrote against to make sure everthing is populated correctly. } + +gint main (gint argc, gchar * argv[]) +{ + g_type_init(); + g_test_init(&argc, &argv, NULL); + + g_test_add_func("/indicator-sound/pulse-manager/sink-insert", test_sink_insert); + g_test_add_func("/indicator-sound/pulse-manager/pa-context-exit", test_pa_context_exit); + + return g_test_run (); +} -- cgit v1.2.3