summary refs log tree commit diff stats
path: root/pkg/cetus/cetus.go
blob: 70517c39d7f6ef0431f69f9b73ffc82e4b8292fa (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
// Copyright (c) 2020, Andinus <andinus@inventati.org>

// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.

// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

package cetus

import "fmt"

var version string = "v0.4.4"

// Version prints cetus version
func Version() {
	fmt.Printf("Cetus %s\n", version)
}

// PrintPath prints the path passed
func PrintPath(path string) {
	fmt.Println(path)
}
s="w"> muc_close(); } void test_muc_invites_add(void **state) { char *room = "room@conf.server"; muc_invites_add(room, NULL); gboolean invite_exists = muc_invites_contain(room); assert_true(invite_exists); } void test_muc_remove_invite(void **state) { char *room = "room@conf.server"; muc_invites_add(room, NULL); muc_invites_remove(room); gboolean invite_exists = muc_invites_contain(room); assert_false(invite_exists); } void test_muc_invites_count_0(void **state) { int invite_count = muc_invites_count(); assert_true(invite_count == 0); } void test_muc_invites_count_5(void **state) { muc_invites_add("room1@conf.server", NULL); muc_invites_add("room2@conf.server", NULL); muc_invites_add("room3@conf.server", NULL); muc_invites_add("room4@conf.server", NULL); muc_invites_add("room5@conf.server", NULL); int invite_count = muc_invites_count(); assert_true(invite_count == 5); } void test_muc_room_is_not_active(void **state) { char *room = "room@server.org"; gboolean room_is_active = muc_active(room); assert_false(room_is_active); } void test_muc_active(void **state) { char *room = "room@server.org"; char *nick = "bob"; muc_join(room, nick, NULL, FALSE); gboolean room_is_active = muc_active(room); assert_true(room_is_active); }