summaryrefslogtreecommitdiff
path: root/backend/tests/dl-test.cc
blob: d04b2b5717554de887bb4b8370df6d9320ebb623 (plain)
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
/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */
#include "dl.h"

using namespace slack;

static void
slack_test_dl_construct()
{
	auto dl = new Dl ("some", "mirror", 1, nullptr, nullptr);

	g_assert_cmpstr (dl->get_name (), ==, "some");
	g_assert_cmpstr (dl->get_mirror (), ==, "mirror");
	g_assert_cmpuint (dl->get_order (), ==, 1);
	g_assert_false (dl->is_blacklisted ("pattern"));

	delete dl;
}

int main(int argc, char *argv[])
{
	g_test_init(&argc, &argv, nullptr);

	g_test_add_func("/slack/dl/construct", slack_test_dl_construct);

	return g_test_run();
}