F:/KPlato/koffice/libs/kofficecore/tests/korecttest.cpp

Aller à la documentation de ce fichier.
00001 /* This file is part of KOffice
00002     Copyright (c) 2005-2006 David Faure <faure@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2 as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #include <qtest_kde.h>
00020 
00021 #include <KoRect.h>
00022 #include <kdebug.h>
00023 #include "korecttest.h"
00024 #include "korecttest.moc"
00025 
00026 QTEST_KDEMAIN( KoRectTest, NoGUI )
00027 
00028 void KoRectTest::testEmptyRect()
00029 {
00030   KoRect emptyRect;
00031   QVERIFY( emptyRect.isNull() );
00032   QVERIFY( emptyRect.isEmpty() );
00033 }
00034 
00035 void KoRectTest::testNonEmptyRect()
00036 {
00037   KoRect rect( 1, 15, 250, 156.14 );
00038   QVERIFY( !rect.isNull() );
00039   QVERIFY( !rect.isEmpty() );
00040 }
00041 
00042 void KoRectTest::testUnion()
00043 {
00044   KoRect emptyRect;
00045   KoRect rect( 1, 15, 250, 156.14 );
00046   KoRect unionRect = rect | emptyRect;
00047   QVERIFY( !unionRect.isNull() );
00048   QVERIFY( !unionRect.isEmpty() );
00049 }

Généré le Wed Nov 22 23:41:04 2006 pour KPlato par  doxygen 1.5.1-p1