tst_chartdataset.cpp
410 lines
| 11.8 KiB
| text/x-c
|
CppLexer
Michal Klocek
|
r771 | /**************************************************************************** | ||
** | ||||
Miikka Heikkinen
|
r2433 | ** Copyright (C) 2013 Digia Plc | ||
Michal Klocek
|
r771 | ** All rights reserved. | ||
** For any questions to Digia, please use contact form at http://qt.digia.com | ||||
** | ||||
Miikka Heikkinen
|
r2574 | ** This file is part of the Qt Enterprise Charts Add-on. | ||
Michal Klocek
|
r771 | ** | ||
** $QT_BEGIN_LICENSE$ | ||||
Miikka Heikkinen
|
r2574 | ** Licensees holding valid Qt Enterprise licenses may use this file in | ||
** accordance with the Qt Enterprise License Agreement provided with the | ||||
Michal Klocek
|
r771 | ** Software or, alternatively, in accordance with the terms contained in | ||
** a written agreement between you and Digia. | ||||
** | ||||
** If you have questions regarding the use of this file, please use | ||||
** contact form at http://qt.digia.com | ||||
** $QT_END_LICENSE$ | ||||
** | ||||
****************************************************************************/ | ||||
Michal Klocek
|
r1977 | #ifndef BUILD_PRIVATE_UNIT_TESTS | ||
#include <QtTest/QtTest> | ||||
class tst_ChartDataSet: public QObject { | ||||
Q_OBJECT | ||||
private Q_SLOTS: | ||||
void skip(); | ||||
}; | ||||
void tst_ChartDataSet::skip() | ||||
{ | ||||
Tero Ahola
|
r2367 | #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) | ||
QSKIP("This test requires the debug version of library"); | ||||
#else | ||||
Michal Klocek
|
r1977 | QSKIP("This test requires the debug version of library", SkipAll); | ||
Tero Ahola
|
r2367 | #endif | ||
Michal Klocek
|
r1977 | } | ||
QTEST_MAIN(tst_ChartDataSet) | ||||
#include "tst_chartdataset.moc" | ||||
#else | ||||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r224 | #include <QtTest/QtTest> | ||
Michal Klocek
|
r1541 | #include <qabstractaxis.h> | ||
Marek Rosa
|
r1805 | #include <qvalueaxis.h> | ||
Marek Rosa
|
r1810 | #include <qbarcategoryaxis.h> | ||
Michal Klocek
|
r2273 | #include <qcategoryaxis.h> | ||
Marek Rosa
|
r2391 | #ifndef QT_ON_ARM | ||
#include "qdatetimeaxis.h" | ||||
#endif | ||||
Michal Klocek
|
r349 | #include <qlineseries.h> | ||
Michal Klocek
|
r1564 | #include <qareaseries.h> | ||
#include <qscatterseries.h> | ||||
#include <qsplineseries.h> | ||||
#include <qpieseries.h> | ||||
sauimone
|
r1594 | #include <qbarseries.h> | ||
Michal Klocek
|
r1564 | #include <qpercentbarseries.h> | ||
#include <qstackedbarseries.h> | ||||
Michal Klocek
|
r224 | #include <private/chartdataset_p.h> | ||
Marek Rosa
|
r2275 | #include <private/abstractdomain_p.h> | ||
Tero Ahola
|
r1109 | #include <tst_definitions.h> | ||
Michal Klocek
|
r224 | |||
QTCOMMERCIALCHART_USE_NAMESPACE | ||||
Marek Rosa
|
r2275 | Q_DECLARE_METATYPE(AbstractDomain *) | ||
Michal Klocek
|
r1541 | Q_DECLARE_METATYPE(QAbstractAxis *) | ||
Tero Ahola
|
r988 | Q_DECLARE_METATYPE(QAbstractSeries *) | ||
Michal Klocek
|
r1564 | Q_DECLARE_METATYPE(QList<QAbstractSeries *>) | ||
Q_DECLARE_METATYPE(QList<QAbstractAxis *>) | ||||
Michal Klocek
|
r2273 | Q_DECLARE_METATYPE(Qt::Alignment) | ||
Q_DECLARE_METATYPE(QList<Qt::Alignment>) | ||||
Tero Ahola
|
r988 | Q_DECLARE_METATYPE(QLineSeries *) | ||
Michal Klocek
|
r224 | |||
class tst_ChartDataSet: public QObject { | ||||
Michal Klocek
|
r771 | Q_OBJECT | ||
Michal Klocek
|
r2284 | public: | ||
tst_ChartDataSet():m_dataset(0){}; | ||||
Michal Klocek
|
r771 | |||
public Q_SLOTS: | ||||
Jani Honkonen
|
r2247 | void initTestCase(); | ||
void cleanupTestCase(); | ||||
void init(); | ||||
void cleanup(); | ||||
Michal Klocek
|
r224 | |||
Michal Klocek
|
r771 | private Q_SLOTS: | ||
Jani Honkonen
|
r2247 | void chartdataset_data(); | ||
void chartdataset(); | ||||
void addSeries_data(); | ||||
void addSeries(); | ||||
void removeSeries_data(); | ||||
void removeSeries(); | ||||
Michal Klocek
|
r2273 | void addAxis_data(); | ||
void addAxis(); | ||||
void removeAxis_data(); | ||||
void removeAxis(); | ||||
void attachAxis_data(); | ||||
void attachAxis(); | ||||
void detachAxis_data(); | ||||
void detachAxis(); | ||||
Michal Klocek
|
r1593 | |||
Michal Klocek
|
r1078 | private: | ||
ChartDataSet* m_dataset; | ||||
Michal Klocek
|
r224 | }; | ||
void tst_ChartDataSet::initTestCase() | ||||
{ | ||||
Marek Rosa
|
r2275 | qRegisterMetaType<AbstractDomain*>(); | ||
Jani Honkonen
|
r2247 | qRegisterMetaType<QAbstractAxis*>(); | ||
Tero Ahola
|
r989 | qRegisterMetaType<QAbstractSeries*>(); | ||
Michal Klocek
|
r224 | } | ||
void tst_ChartDataSet::cleanupTestCase() | ||||
{ | ||||
} | ||||
void tst_ChartDataSet::init() | ||||
{ | ||||
Michal Klocek
|
r2284 | Q_ASSERT(!m_dataset); | ||
Michal Klocek
|
r2273 | m_dataset = new ChartDataSet(0); | ||
Michal Klocek
|
r224 | } | ||
Michal Klocek
|
r1078 | |||
Michal Klocek
|
r224 | void tst_ChartDataSet::cleanup() | ||
{ | ||||
Michal Klocek
|
r2284 | delete m_dataset; | ||
m_dataset=0; | ||||
Michal Klocek
|
r224 | } | ||
void tst_ChartDataSet::chartdataset_data() | ||||
{ | ||||
} | ||||
void tst_ChartDataSet::chartdataset() | ||||
{ | ||||
Michal Klocek
|
r2273 | QVERIFY(m_dataset->axes().isEmpty()); | ||
QVERIFY(m_dataset->series().isEmpty()); | ||||
m_dataset->createDefaultAxes(); | ||||
Michal Klocek
|
r224 | } | ||
Michal Klocek
|
r1564 | |||
Michal Klocek
|
r224 | void tst_ChartDataSet::addSeries_data() | ||
{ | ||||
Jani Honkonen
|
r2247 | QTest::addColumn<QAbstractSeries*>("series"); | ||
Michal Klocek
|
r1564 | |||
QAbstractSeries* line = new QLineSeries(this); | ||||
Jani Honkonen
|
r2247 | QTest::newRow("line") << line; | ||
Michal Klocek
|
r2284 | |||
QAbstractSeries* area = new QAreaSeries(static_cast<QLineSeries*>(new QLineSeries(this))); | ||||
Jani Honkonen
|
r2247 | QTest::newRow("area") << area; | ||
Michal Klocek
|
r2284 | |||
QAbstractSeries* scatter = new QScatterSeries(this); | ||||
Jani Honkonen
|
r2247 | QTest::newRow("scatter") << scatter; | ||
Michal Klocek
|
r2284 | |||
QAbstractSeries* spline = new QSplineSeries(this); | ||||
Jani Honkonen
|
r2247 | QTest::newRow("spline") << spline; | ||
Michal Klocek
|
r2284 | |||
QAbstractSeries* pie = new QPieSeries(this); | ||||
Jani Honkonen
|
r2247 | QTest::newRow("pie") << pie; | ||
Michal Klocek
|
r2284 | |||
QAbstractSeries* bar = new QBarSeries(this); | ||||
Michal Klocek
|
r1564 | QTest::newRow("bar") << bar; | ||
Michal Klocek
|
r2284 | |||
QAbstractSeries* percent = new QPercentBarSeries(this); | ||||
Jani Honkonen
|
r2247 | QTest::newRow("percent") << percent; | ||
Michal Klocek
|
r2284 | |||
QAbstractSeries* stacked = new QStackedBarSeries(this); | ||||
Jani Honkonen
|
r2247 | QTest::newRow("stacked") << stacked; | ||
Michal Klocek
|
r1564 | } | ||
void tst_ChartDataSet::addSeries() | ||||
{ | ||||
QFETCH(QAbstractSeries*, series); | ||||
Michal Klocek
|
r2273 | QVERIFY(m_dataset->series().isEmpty()); | ||
Michal Klocek
|
r439 | |||
Michal Klocek
|
r2273 | QSignalSpy spy0(m_dataset, SIGNAL(axisAdded(QAbstractAxis*))); | ||
Michal Klocek
|
r1564 | QSignalSpy spy1(m_dataset, SIGNAL(axisRemoved(QAbstractAxis*))); | ||
Michal Klocek
|
r2273 | QSignalSpy spy2(m_dataset, SIGNAL(seriesAdded(QAbstractSeries*))); | ||
Jani Honkonen
|
r2110 | QSignalSpy spy3(m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*))); | ||
Michal Klocek
|
r439 | |||
Michal Klocek
|
r1564 | m_dataset->addSeries(series); | ||
Michal Klocek
|
r411 | |||
Michal Klocek
|
r2273 | QCOMPARE(m_dataset->series().count(),1); | ||
Michal Klocek
|
r1577 | TRY_COMPARE(spy0.count(), 0); | ||
Tero Ahola
|
r1109 | TRY_COMPARE(spy1.count(), 0); | ||
Michal Klocek
|
r2273 | TRY_COMPARE(spy2.count(), 1); | ||
Michal Klocek
|
r1564 | TRY_COMPARE(spy3.count(), 0); | ||
Michal Klocek
|
r224 | } | ||
Michal Klocek
|
r1564 | void tst_ChartDataSet::removeSeries_data() | ||
Michal Klocek
|
r224 | { | ||
Michal Klocek
|
r1564 | addSeries_data(); | ||
} | ||||
Michal Klocek
|
r974 | |||
Michal Klocek
|
r1564 | void tst_ChartDataSet::removeSeries() | ||
{ | ||||
QFETCH(QAbstractSeries*, series); | ||||
Michal Klocek
|
r2273 | QVERIFY(m_dataset->series().isEmpty()); | ||
Michal Klocek
|
r1564 | m_dataset->addSeries(series); | ||
Michal Klocek
|
r974 | |||
Michal Klocek
|
r2273 | QSignalSpy spy0(m_dataset, SIGNAL(axisAdded(QAbstractAxis*))); | ||
Michal Klocek
|
r1564 | QSignalSpy spy1(m_dataset, SIGNAL(axisRemoved(QAbstractAxis*))); | ||
Michal Klocek
|
r2273 | QSignalSpy spy2(m_dataset, SIGNAL(seriesAdded(QAbstractSeries*))); | ||
Jani Honkonen
|
r2110 | QSignalSpy spy3(m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*))); | ||
Michal Klocek
|
r974 | |||
Michal Klocek
|
r1564 | m_dataset->removeSeries(series); | ||
Michal Klocek
|
r974 | |||
Michal Klocek
|
r2273 | QCOMPARE(m_dataset->series().count(),0); | ||
Tero Ahola
|
r1109 | TRY_COMPARE(spy0.count(), 0); | ||
Michal Klocek
|
r2273 | TRY_COMPARE(spy1.count(), 0); | ||
Tero Ahola
|
r1109 | TRY_COMPARE(spy2.count(), 0); | ||
Michal Klocek
|
r1564 | TRY_COMPARE(spy3.count(), 1); | ||
Michal Klocek
|
r224 | } | ||
Michal Klocek
|
r2273 | void tst_ChartDataSet::addAxis_data() | ||
Michal Klocek
|
r910 | { | ||
Michal Klocek
|
r2273 | QTest::addColumn<QAbstractAxis*>("axis"); | ||
QAbstractAxis* value = new QValueAxis(this); | ||||
QAbstractAxis* category = new QCategoryAxis(this); | ||||
QAbstractAxis* barcategory = new QBarCategoryAxis(this); | ||||
Marek Rosa
|
r2391 | #ifndef Q_WS_QWS | ||
Michal Klocek
|
r2273 | QAbstractAxis* datetime = new QDateTimeAxis(this); | ||
Marek Rosa
|
r2391 | #endif | ||
Michal Klocek
|
r2273 | |||
QTest::newRow("value") << value; | ||||
QTest::newRow("category") << category; | ||||
QTest::newRow("barcategory") << barcategory; | ||||
Marek Rosa
|
r2391 | #ifndef Q_WS_QWS | ||
Michal Klocek
|
r2273 | QTest::newRow("datetime") << datetime; | ||
Marek Rosa
|
r2391 | #endif | ||
Michal Klocek
|
r910 | } | ||
Michal Klocek
|
r2273 | void tst_ChartDataSet::addAxis() | ||
Michal Klocek
|
r910 | { | ||
Michal Klocek
|
r2273 | QFETCH(QAbstractAxis*, axis); | ||
QVERIFY(m_dataset->axes().isEmpty()); | ||||
Michal Klocek
|
r910 | |||
Michal Klocek
|
r2273 | QSignalSpy spy0(m_dataset, SIGNAL(axisAdded(QAbstractAxis*))); | ||
Jani Honkonen
|
r2110 | QSignalSpy spy1(m_dataset, SIGNAL(axisRemoved(QAbstractAxis*))); | ||
Michal Klocek
|
r2273 | QSignalSpy spy2(m_dataset, SIGNAL(seriesAdded(QAbstractSeries*))); | ||
Jani Honkonen
|
r2110 | QSignalSpy spy3(m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*))); | ||
Michal Klocek
|
r910 | |||
Michal Klocek
|
r2273 | m_dataset->addAxis(axis,Qt::AlignBottom); | ||
QCOMPARE(m_dataset->axes().count(),1); | ||||
TRY_COMPARE(spy0.count(), 1); | ||||
Tero Ahola
|
r1109 | TRY_COMPARE(spy1.count(), 0); | ||
TRY_COMPARE(spy2.count(), 0); | ||||
TRY_COMPARE(spy3.count(), 0); | ||||
Michal Klocek
|
r910 | } | ||
Michal Klocek
|
r2273 | void tst_ChartDataSet::removeAxis_data() | ||
Michal Klocek
|
r771 | { | ||
Michal Klocek
|
r2273 | addAxis_data(); | ||
Michal Klocek
|
r771 | } | ||
Michal Klocek
|
r2273 | void tst_ChartDataSet::removeAxis() | ||
Michal Klocek
|
r771 | { | ||
Michal Klocek
|
r2273 | QFETCH(QAbstractAxis*, axis); | ||
QVERIFY(m_dataset->series().isEmpty()); | ||||
m_dataset->addAxis(axis,Qt::AlignBottom); | ||||
Michal Klocek
|
r910 | |||
Michal Klocek
|
r2273 | QSignalSpy spy0(m_dataset, SIGNAL(axisAdded(QAbstractAxis*))); | ||
Jani Honkonen
|
r2110 | QSignalSpy spy1(m_dataset, SIGNAL(axisRemoved(QAbstractAxis*))); | ||
Michal Klocek
|
r2273 | QSignalSpy spy2(m_dataset, SIGNAL(seriesAdded(QAbstractSeries*))); | ||
Michal Klocek
|
r1078 | QSignalSpy spy3(m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*))); | ||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | m_dataset->removeAxis(axis); | ||
Michal Klocek
|
r771 | |||
Tero Ahola
|
r2384 | QCOMPARE(m_dataset->axes().count(),0); | ||
Michal Klocek
|
r2273 | QCOMPARE(m_dataset->series().count(),0); | ||
Tero Ahola
|
r1109 | TRY_COMPARE(spy0.count(), 0); | ||
Michal Klocek
|
r2273 | TRY_COMPARE(spy1.count(), 1); | ||
Tero Ahola
|
r1109 | TRY_COMPARE(spy2.count(), 0); | ||
TRY_COMPARE(spy3.count(), 0); | ||||
Michal Klocek
|
r2273 | } | ||
Michal Klocek
|
r910 | |||
Michal Klocek
|
r2273 | void tst_ChartDataSet::attachAxis_data() | ||
Michal Klocek
|
r771 | { | ||
Michal Klocek
|
r2284 | |||
Michal Klocek
|
r2273 | QTest::addColumn<QList<QAbstractSeries*> >("series"); | ||
QTest::addColumn<QList<QAbstractAxis*> >("axis"); | ||||
QTest::addColumn<QList<Qt::Alignment> >("alignment"); | ||||
QTest::addColumn<QAbstractSeries*>("attachSeries"); | ||||
QTest::addColumn<QAbstractAxis*>("attachAxis"); | ||||
QTest::addColumn<bool>("success"); | ||||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2284 | //QAbstractSeries* area = new QAreaSeries(static_cast<QLineSeries*>(line)); | ||
Michal Klocek
|
r2273 | QAbstractSeries* scatter = new QScatterSeries(this); | ||
QAbstractSeries* spline = new QSplineSeries(this); | ||||
QAbstractSeries* pie = new QPieSeries(this); | ||||
QAbstractSeries* bar = new QBarSeries(this); | ||||
QAbstractSeries* percent = new QPercentBarSeries(this); | ||||
QAbstractSeries* stacked = new QStackedBarSeries(this); | ||||
Michal Klocek
|
r1568 | |||
Michal Klocek
|
r2273 | QAbstractAxis* category = new QCategoryAxis(this); | ||
QAbstractAxis* barcategory = new QBarCategoryAxis(this); | ||||
Marek Rosa
|
r2391 | #ifndef Q_WS_QWS | ||
Michal Klocek
|
r2273 | QAbstractAxis* datetime = new QDateTimeAxis(this); | ||
Marek Rosa
|
r2391 | #endif | ||
Michal Klocek
|
r2284 | { | ||
QList<QAbstractSeries*> series; | ||||
QList<QAbstractAxis*> axes; | ||||
QList<Qt::Alignment> alignment; | ||||
QAbstractSeries* line = new QLineSeries(this); | ||||
QAbstractAxis* value1 = new QValueAxis(this); | ||||
QAbstractAxis* value2 = new QValueAxis(this); | ||||
series << line << 0; | ||||
axes << value1 << value2; | ||||
alignment << Qt::AlignBottom << Qt::AlignLeft; | ||||
QTest::newRow("first") << series << axes << alignment << line << value2 << true ; | ||||
} | ||||
Michal Klocek
|
r1593 | |||
Michal Klocek
|
r2284 | { | ||
QList<QAbstractSeries*> series; | ||||
QList<QAbstractAxis*> axes; | ||||
QList<Qt::Alignment> alignment; | ||||
QAbstractSeries* line = new QLineSeries(this); | ||||
QAbstractAxis* value1 = new QValueAxis(this); | ||||
QAbstractAxis* value2 = new QValueAxis(this); | ||||
series << 0 << line; | ||||
axes << value1 << value2; | ||||
alignment << Qt::AlignBottom << Qt::AlignLeft; | ||||
QTest::newRow("second") << series << axes << alignment << line << value1 << true; | ||||
} | ||||
Michal Klocek
|
r1593 | |||
Michal Klocek
|
r771 | } | ||
Michal Klocek
|
r2273 | void tst_ChartDataSet::attachAxis() | ||
Michal Klocek
|
r771 | { | ||
Michal Klocek
|
r2273 | QFETCH(QList<QAbstractSeries*>, series); | ||
QFETCH(QList<QAbstractAxis*>, axis); | ||||
QFETCH(QList<Qt::Alignment>, alignment); | ||||
QFETCH(QAbstractSeries*, attachSeries); | ||||
QFETCH(QAbstractAxis*, attachAxis); | ||||
QFETCH(bool, success); | ||||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | Q_ASSERT(series.count() == axis.count()); | ||
Q_ASSERT(series.count() == alignment.count()); | ||||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | QVERIFY(m_dataset->series().isEmpty()); | ||
QVERIFY(m_dataset->axes().isEmpty()); | ||||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | for(int i = 0 ; i < series.count() ; i++){ | ||
if(series[i]) m_dataset->addSeries(series[i]); | ||||
if(axis[i]) m_dataset->addAxis(axis[i],alignment[i]); | ||||
if(series[i] && axis[i]) m_dataset->attachAxis(series[i],axis[i]); | ||||
Michal Klocek
|
r1593 | } | ||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | QSignalSpy spy0(m_dataset, SIGNAL(axisAdded(QAbstractAxis*))); | ||
QSignalSpy spy1(m_dataset, SIGNAL(axisRemoved(QAbstractAxis*))); | ||||
QSignalSpy spy2(m_dataset, SIGNAL(seriesAdded(QAbstractSeries*))); | ||||
QSignalSpy spy3(m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*))); | ||||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | QCOMPARE(m_dataset->attachAxis(attachSeries,attachAxis),success); | ||
Michal Klocek
|
r1593 | |||
Michal Klocek
|
r771 | } | ||
Michal Klocek
|
r2273 | void tst_ChartDataSet::detachAxis_data() | ||
Michal Klocek
|
r771 | { | ||
Michal Klocek
|
r2273 | QTest::addColumn<QList<QAbstractSeries*> >("series"); | ||
QTest::addColumn<QList<QAbstractAxis*> >("axis"); | ||||
QTest::addColumn<QAbstractSeries*>("detachSeries"); | ||||
QTest::addColumn<QAbstractAxis*>("detachAxis"); | ||||
QTest::addColumn<bool>("success"); | ||||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2284 | { | ||
Michal Klocek
|
r2273 | QList<QAbstractSeries*> series; | ||
QList<QAbstractAxis*> axes; | ||||
QAbstractSeries* line = new QLineSeries(this); | ||||
QAbstractAxis* value = new QValueAxis(this); | ||||
series << line; | ||||
axes << value; | ||||
Michal Klocek
|
r2284 | QTest::newRow("first") << series << axes << line << value << true; | ||
} | ||||
Michal Klocek
|
r2273 | } | ||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | void tst_ChartDataSet::detachAxis() | ||
{ | ||||
QFETCH(QList<QAbstractSeries*>, series); | ||||
QFETCH(QList<QAbstractAxis*>, axis); | ||||
QFETCH(QAbstractSeries*, detachSeries); | ||||
QFETCH(QAbstractAxis*, detachAxis); | ||||
QFETCH(bool, success); | ||||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | Q_ASSERT(series.count() == axis.count()); | ||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | QVERIFY(m_dataset->series().isEmpty()); | ||
QVERIFY(m_dataset->axes().isEmpty()); | ||||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | for(int i = 0; i < series.count(); i++) { | ||
if(series[i]) m_dataset->addSeries(series[i]); | ||||
if(axis[i]) m_dataset->addAxis(axis[i],Qt::AlignBottom); | ||||
if(series[i] && axis[i]) m_dataset->attachAxis(series[i],axis[i]); | ||||
Michal Klocek
|
r1593 | } | ||
Michal Klocek
|
r771 | |||
Michal Klocek
|
r2273 | QSignalSpy spy0(m_dataset, SIGNAL(axisAdded(QAbstractAxis*))); | ||
QSignalSpy spy1(m_dataset, SIGNAL(axisRemoved(QAbstractAxis*))); | ||||
QSignalSpy spy2(m_dataset, SIGNAL(seriesAdded(QAbstractSeries*))); | ||||
QSignalSpy spy3(m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*))); | ||||
QCOMPARE(m_dataset->detachAxis(detachSeries,detachAxis),success); | ||||
Michal Klocek
|
r771 | } | ||
Michal Klocek
|
r1593 | |||
Michal Klocek
|
r224 | QTEST_MAIN(tst_ChartDataSet) | ||
#include "tst_chartdataset.moc" | ||||
Michal Klocek
|
r1977 | #endif | ||