File: testcalfilter.cpp

package info (click to toggle)
kcalcore 5%3A5.78.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,736 kB
  • sloc: cpp: 23,105; perl: 136; sh: 11; makefile: 7
file content (36 lines) | stat: -rw-r--r-- 860 bytes parent folder | download
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
/*
  This file is part of the kcalcore library.

  SPDX-FileCopyrightText: 2006 Allen Winter <winter@kde.org>

  SPDX-License-Identifier: LGPL-2.0-or-later
*/

#include "testcalfilter.h"
#include "calfilter.h"

#include <QTest>
QTEST_MAIN(CalFilterTest)

using namespace KCalendarCore;

void CalFilterTest::testValidity()
{
    CalFilter f;
    f.setName(QStringLiteral("testfilter"));
    QVERIFY(f.name() == QLatin1String("testfilter"));
    CalFilter g(QStringLiteral("fredfilter"));
    QVERIFY(g.name() == QLatin1String("fredfilter"));
    CalFilter f1, f2;
    QVERIFY(f1 == f2);
}

void CalFilterTest::testCats()
{
    CalFilter f1, f2;
    QStringList cats;
    cats << QStringLiteral("a") << QStringLiteral("b") << QStringLiteral("c");
    f1.setCategoryList(cats);
    f2.setCategoryList(cats);
    QVERIFY(f1.categoryList() == f2.categoryList());
}