Warning, file /utilities/basket/src/tests/notetest.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /**
0002  * SPDX-FileCopyrightText: (C) 2009 Matt Rogers <mattr@kde.org>
0003  * SPDX-License-Identifier: GPL-2.0-or-later
0004  */
0005 
0006 #include <QObject>
0007 #include <QtTest/QtTest>
0008 
0009 #include <basketview.h>
0010 #include <note.h>
0011 
0012 class NoteTest : public QObject
0013 {
0014     Q_OBJECT
0015 private Q_SLOTS:
0016     void testCreation();
0017 };
0018 
0019 QTEST_MAIN(NoteTest)
0020 
0021 void NoteTest::testCreation()
0022 {
0023     Note *n = new Note(nullptr);
0024     QVERIFY(n->basket() == nullptr);
0025     QVERIFY(n->next() == nullptr);
0026     QVERIFY(n->prev() == nullptr);
0027     QVERIFY(n->content() == nullptr);
0028     QCOMPARE(n->x(), 0.0);
0029     QCOMPARE(n->y(), 0.0);
0030     QCOMPARE(n->width(), Note::GROUP_WIDTH);
0031     QCOMPARE(n->height(), Note::MIN_HEIGHT);
0032     delete n;
0033 }
0034 
0035 #include "notetest.moc"
0036 /* vim: set et sts=4 sw=4 ts=8 tw=0 : */