File indexing completed on 2024-06-09 04:20:53

0001 /* This file is part of the KDE project
0002  * SPDX-FileCopyrightText: 2007 Boudewijn Rempt (boud@valdyas.org)
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 #include "TestKoShapeFactory.h"
0007 
0008 #include <simpletest.h>
0009 #include <QBuffer>
0010 
0011 #include <KoShapeLoadingContext.h>
0012 #include <KoPathShapeFactory.h>
0013 #include <KoShape.h>
0014 #include <KoShapeFactoryBase.h>
0015 #include <KoXmlNS.h>
0016 #include <FlakeDebug.h>
0017 
0018 void TestKoShapeFactory::testCreateFactory()
0019 {
0020     KoShapeFactoryBase * factory = new KoPathShapeFactory(QStringList());
0021     QVERIFY(factory != 0);
0022     delete factory;
0023 }
0024 
0025 void TestKoShapeFactory::testSupportsQDomElement()
0026 {
0027 }
0028 
0029 void TestKoShapeFactory::testPriority()
0030 {
0031     KoShapeFactoryBase * factory = new KoPathShapeFactory(QStringList());
0032     QVERIFY(factory->loadingPriority() == 0);
0033     delete factory;
0034 }
0035 
0036 void TestKoShapeFactory::testCreateDefaultShape()
0037 {
0038     KoShapeFactoryBase * factory = new KoPathShapeFactory(QStringList());
0039     KoShape *shape = factory->createDefaultShape();
0040     QVERIFY(shape != 0);
0041     delete shape;
0042     delete factory;
0043 }
0044 
0045 void TestKoShapeFactory::testCreateShape()
0046 {
0047     KoShapeFactoryBase * factory = new KoPathShapeFactory(QStringList());
0048     KoShape *shape = factory->createShape(0);
0049     QVERIFY(shape != 0);
0050     delete shape;
0051     delete factory;
0052 }
0053 
0054 QTEST_GUILESS_MAIN(TestKoShapeFactory)