summaryrefslogtreecommitdiff
path: root/backend/tests/slackpkg-test.cc
blob: 89406af331305a351049e0aa42194309b96cfd83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * 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/.
 */
#define BOOST_TEST_MODULE slackpkg tests

#include <boost/test/unit_test.hpp>
import katja.slackpkg;

BOOST_AUTO_TEST_CASE(slack_test_slackpkg_construct)
{
    auto slackpkg = new Slackpkg("some", "mirror", 1, nullptr, nullptr);

    BOOST_TEST(strcmp(slackpkg->get_name(), "some") == 0);
    BOOST_TEST(strcmp(slackpkg->get_mirror(), "mirror") == 0);
    BOOST_TEST(slackpkg->get_order() == 1);
    BOOST_TEST(!slackpkg->is_blacklisted("pattern"));

    delete slackpkg;
}