]> git.0d.be Git - empathy.git/blob - tests/check-empathy-irc-chatroom-manager.c
add a test file for EmpathyChatroomManager
[empathy.git] / tests / check-empathy-irc-chatroom-manager.c
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <string.h>
4 #include <glib/gstdio.h>
5
6 #include <check.h>
7 #include "check-helpers.h"
8 #include "check-libempathy.h"
9 #include "check-irc-helper.h"
10
11 #include <libempathy/empathy-chatroom-manager.h>
12
13 static gchar *
14 get_xml_file (const gchar *filename)
15 {
16   return g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "tests", "xml",
17       filename, NULL);
18 }
19
20 START_TEST (test_empathy_chatroom_manager_new)
21 {
22   EmpathyChatroomManager *mgr;
23   gchar *file;
24
25   file = get_xml_file ("chatrooms.xml");
26   mgr = empathy_chatroom_manager_new (file);
27
28   g_free (file);
29   g_object_unref (mgr);
30 }
31 END_TEST
32
33 TCase *
34 make_empathy_chatroom_manager_tcase (void)
35 {
36     TCase *tc = tcase_create ("empathy-irc-chatroom-manager");
37     tcase_add_test (tc, test_empathy_chatroom_manager_new);
38     return tc;
39 }