From 16aecaf01768094ea0c7cfcd0b0ea5c34e5bb037 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 30 Jan 2014 23:41:18 +0000 Subject: Added setup and teardown for muc tests --- tests/test_muc.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'tests/test_muc.c') diff --git a/tests/test_muc.c b/tests/test_muc.c index 2af13516..94acd21c 100644 --- a/tests/test_muc.c +++ b/tests/test_muc.c @@ -6,29 +6,33 @@ #include "muc.h" +void muc_before_test(void **state) +{ + muc_init(); +} + +void muc_after_test(void **state) +{ + muc_close(); +} + void test_muc_add_invite(void **state) { char *room = "room@conf.server"; - muc_init(); muc_add_invite(room); gboolean invite_exists = muc_invites_include(room); assert_true(invite_exists); - - muc_close(); } void test_muc_remove_invite(void **state) { char *room = "room@conf.server"; - muc_init(); muc_add_invite(room); muc_remove_invite(room); gboolean invite_exists = muc_invites_include(room); assert_false(invite_exists); - - muc_close(); } -- cgit 1.4.1-2-gfad0 ef='/danisanti/profani-tty/about/'>about summary refs log tree commit diff stats
path: root/themes/headache
blob: d53a1286866d809022a73d5314fabaa4982be1a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77