diff --git a/tests/auto/qabstractaxis/tst_qabstractaxis.cpp b/tests/auto/qabstractaxis/tst_qabstractaxis.cpp index 1fc451f..eab0856 100644 --- a/tests/auto/qabstractaxis/tst_qabstractaxis.cpp +++ b/tests/auto/qabstractaxis/tst_qabstractaxis.cpp @@ -21,6 +21,7 @@ #include "tst_qabstractaxis.h" Q_DECLARE_METATYPE(QPen) +Q_DECLARE_METATYPE(Qt::Orientation) void tst_QAbstractAxis::initTestCase() { @@ -30,9 +31,10 @@ void tst_QAbstractAxis::cleanupTestCase() { } -void tst_QAbstractAxis::init(QAbstractAxis* axis) +void tst_QAbstractAxis::init(QAbstractAxis* axis,QAbstractSeries* series) { m_axis = axis; + m_series = series; m_view = new QChartView(new QChart()); m_chart = m_view->chart(); } @@ -101,7 +103,6 @@ void tst_QAbstractAxis::axisPen_data() void tst_QAbstractAxis::axisPen() { - QFETCH(QPen, axisPen); QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); @@ -127,46 +128,19 @@ void tst_QAbstractAxis::axisPen() QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); + m_chart->setAxisX(m_axis, m_series); + m_view->show(); + QTest::qWaitForWindowShown(m_view); + //TODO QCOMPARE(m_axis->axisPen(), axisPen); } void tst_QAbstractAxis::axisPenColor_data() { -#if 0 - QTest::addColumn("axisPenColor"); - QTest::newRow("null") << QColor(); -#endif } void tst_QAbstractAxis::axisPenColor() { -#if 0 - QFETCH(QColor, axisPenColor); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - QCOMPARE(axis.axisPenColor(), axisPenColor); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + QSKIP("Test is not implemented. This is depreciated function", SkipAll); } void tst_QAbstractAxis::gridLinePen_data() @@ -207,76 +181,39 @@ void tst_QAbstractAxis::gridLinePen() QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); + m_chart->setAxisX(m_axis, m_series); + m_view->show(); + QTest::qWaitForWindowShown(m_view); + //TODO QCOMPARE(m_axis->gridLinePen(), gridLinePen); } -void tst_QAbstractAxis::hide_data() -{ - QTest::addColumn("foo"); - QTest::newRow("0") << 0; - QTest::newRow("-1") << -1; -} - -// public void hide() -void tst_QAbstractAxis::hide() -{ -#if 0 - QFETCH(int, foo); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.hide(); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::isArrowVisible_data() +void tst_QAbstractAxis::arrowVisible_data() { - QTest::addColumn("isArrowVisible"); + QTest::addColumn("arrowVisible"); QTest::newRow("true") << true; QTest::newRow("false") << false; } -// public bool isArrowVisible() const -void tst_QAbstractAxis::isArrowVisible() +void tst_QAbstractAxis::arrowVisible() { -#if 0 - QFETCH(bool, isArrowVisible); + QFETCH(bool, arrowVisible); - SubQAbstractAxis axis; + m_axis->setArrowVisible(!arrowVisible); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - QCOMPARE(axis.isArrowVisible(), isArrowVisible); + m_axis->setArrowVisible(arrowVisible); + QCOMPARE(m_axis->isArrowVisible(), arrowVisible); - QCOMPARE(spy0.count(), 0); + QCOMPARE(spy0.count(), 1); QCOMPARE(spy1.count(), 0); QCOMPARE(spy2.count(), 0); QCOMPARE(spy3.count(), 0); @@ -285,76 +222,81 @@ void tst_QAbstractAxis::isArrowVisible() QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + + m_chart->setAxisX(m_axis, m_series); + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->isArrowVisible(), arrowVisible); } -void tst_QAbstractAxis::isGridLineVisible_data() +void tst_QAbstractAxis::gridLineVisible_data() { - QTest::addColumn("isGridLineVisible"); + QTest::addColumn("gridLineVisible"); QTest::newRow("true") << true; QTest::newRow("false") << false; } -// public bool isGridLineVisible() const -void tst_QAbstractAxis::isGridLineVisible() +void tst_QAbstractAxis::gridLineVisible() { -#if 0 - QFETCH(bool, isGridLineVisible); + QFETCH(bool, gridLineVisible); - SubQAbstractAxis axis; + m_axis->setGridLineVisible(!gridLineVisible); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - QCOMPARE(axis.isGridLineVisible(), isGridLineVisible); + m_axis->setGridLineVisible(gridLineVisible); + QCOMPARE(m_axis->isGridLineVisible(), gridLineVisible); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); + QCOMPARE(spy2.count(), 1); QCOMPARE(spy3.count(), 0); QCOMPARE(spy4.count(), 0); QCOMPARE(spy5.count(), 0); QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + + m_chart->setAxisX(m_axis, m_series); + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->isGridLineVisible(), gridLineVisible); + } -void tst_QAbstractAxis::isVisible_data() +void tst_QAbstractAxis::visible_data() { - QTest::addColumn("isVisible"); + QTest::addColumn("visible"); QTest::newRow("true") << true; QTest::newRow("false") << false; } -// public bool isVisible() const -void tst_QAbstractAxis::isVisible() +void tst_QAbstractAxis::visible() { -#if 0 - QFETCH(bool, isVisible); + QFETCH(bool, visible); - SubQAbstractAxis axis; + m_axis->setVisible(!visible); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - QCOMPARE(axis.isVisible(), isVisible); + m_axis->setVisible(visible); + QCOMPARE(m_axis->isVisible(), visible); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -364,37 +306,38 @@ void tst_QAbstractAxis::isVisible() QCOMPARE(spy5.count(), 0); QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + QCOMPARE(spy8.count(), 1); + + m_chart->setAxisX(m_axis, m_series); + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->isVisible(), true); } void tst_QAbstractAxis::labelsAngle_data() { QTest::addColumn("labelsAngle"); QTest::newRow("0") << 0; - QTest::newRow("-1") << -1; + QTest::newRow("45") << 45; + QTest::newRow("90") << 90; } -// public int labelsAngle() const void tst_QAbstractAxis::labelsAngle() { -#if 0 QFETCH(int, labelsAngle); - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - QCOMPARE(axis.labelsAngle(), labelsAngle); + m_axis->setLabelsAngle(labelsAngle); + QCOMPARE(m_axis->labelsAngle(), labelsAngle); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -405,38 +348,39 @@ void tst_QAbstractAxis::labelsAngle() QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + + m_chart->setAxisX(m_axis, m_series); + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->labelsAngle(), labelsAngle); } -Q_DECLARE_METATYPE(QBrush) void tst_QAbstractAxis::labelsBrush_data() { -#if 0 QTest::addColumn("labelsBrush"); QTest::newRow("null") << QBrush(); -#endif + QTest::newRow("blue") << QBrush(Qt::blue); + QTest::newRow("black") << QBrush(Qt::black); + } -// public QBrush labelsBrush() const void tst_QAbstractAxis::labelsBrush() { -#if 0 - QFETCH(QBrush, labelsBrush); - SubQAbstractAxis axis; + QFETCH(QBrush, labelsBrush); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - QCOMPARE(axis.labelsBrush(), labelsBrush); + m_axis->setLabelsBrush(labelsBrush); + QCOMPARE(m_axis->labelsBrush(), labelsBrush); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -444,79 +388,50 @@ void tst_QAbstractAxis::labelsBrush() QCOMPARE(spy3.count(), 0); QCOMPARE(spy4.count(), 0); QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); + //TODO QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->labelsBrush(), labelsBrush); + } void tst_QAbstractAxis::labelsColor_data() { -#if 0 - QTest::addColumn("labelsColor"); - QTest::newRow("null") << QColor(); -#endif + } -// public QColor labelsColor() const void tst_QAbstractAxis::labelsColor() { -#if 0 - QFETCH(QColor, labelsColor); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - QCOMPARE(axis.labelsColor(), labelsColor); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + QSKIP("Test is not implemented. This is depreciated function", SkipAll); } void tst_QAbstractAxis::labelsFont_data() { QTest::addColumn("labelsFont"); QTest::newRow("null") << QFont(); + QTest::newRow("serif") << QFont("SansSerif"); } -// public QFont labelsFont() const void tst_QAbstractAxis::labelsFont() { -#if 0 - QFETCH(QFont, labelsFont); - SubQAbstractAxis axis; + QFETCH(QFont, labelsFont); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - QCOMPARE(axis.labelsFont(), labelsFont); + m_axis->setLabelsFont(labelsFont); + QCOMPARE(m_axis->labelsFont(), labelsFont); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -527,37 +442,38 @@ void tst_QAbstractAxis::labelsFont() QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->labelsFont(), labelsFont); + } void tst_QAbstractAxis::labelsPen_data() { -#if 0 QTest::addColumn("labelsPen"); QTest::newRow("null") << QPen(); -#endif + QTest::newRow("blue") << QPen(Qt::blue); + QTest::newRow("black") << QPen(Qt::black); + QTest::newRow("red") << QPen(Qt::red); } -// public QPen labelsPen() const void tst_QAbstractAxis::labelsPen() { -#if 0 QFETCH(QPen, labelsPen); - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - QCOMPARE(axis.labelsPen(), labelsPen); + m_axis->setLabelsPen(labelsPen); + QCOMPARE(m_axis->labelsPen(), labelsPen); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -568,8 +484,11 @@ void tst_QAbstractAxis::labelsPen() QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + + m_chart->setAxisX(m_axis, m_series); + m_view->show(); + QTest::qWaitForWindowShown(m_view); + //TODO QCOMPARE(m_axis->labelsPen(), labelsPen); } void tst_QAbstractAxis::labelsVisible_data() @@ -579,67 +498,68 @@ void tst_QAbstractAxis::labelsVisible_data() QTest::newRow("false") << false; } -// public bool labelsVisible() const void tst_QAbstractAxis::labelsVisible() { -#if 0 QFETCH(bool, labelsVisible); - SubQAbstractAxis axis; + m_axis->setLabelsVisible(!labelsVisible); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - QCOMPARE(axis.labelsVisible(), labelsVisible); + m_axis->setLabelsVisible(labelsVisible); + QCOMPARE(m_axis->labelsVisible(), labelsVisible); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); QCOMPARE(spy2.count(), 0); QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); + QCOMPARE(spy4.count(), 1); QCOMPARE(spy5.count(), 0); QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + + m_chart->setAxisX(m_axis, m_series); + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->labelsVisible(), labelsVisible); } -Q_DECLARE_METATYPE(Qt::Orientation) void tst_QAbstractAxis::orientation_data() { -#if 0 QTest::addColumn("orientation"); - QTest::newRow("null") << Qt::Orientation(); -#endif + QTest::newRow("Vertical") << Qt::Vertical; + QTest::newRow("Horizontal") << Qt::Horizontal; } -// public Qt::Orientation orientation() void tst_QAbstractAxis::orientation() { -#if 0 QFETCH(Qt::Orientation, orientation); - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - QCOMPARE(axis.orientation(), orientation); + if(orientation==Qt::Vertical){ + m_chart->setAxisY(m_axis,m_series); + }else{ + m_chart->setAxisX(m_axis,m_series); + } + QCOMPARE(m_axis->orientation(), orientation); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -649,78 +569,94 @@ void tst_QAbstractAxis::orientation() QCOMPARE(spy5.count(), 0); QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + QCOMPARE(spy8.count(), 1); + + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->orientation(), orientation); } -void tst_QAbstractAxis::setArrowVisible_data() +void tst_QAbstractAxis::setMax_data() { - QTest::addColumn("visible"); - QTest::newRow("true") << true; - QTest::newRow("false") << false; + //just check if it does not crash + QTest::addColumn("max"); + QTest::newRow("something") << QVariant("something"); + QTest::newRow("1.0") << QVariant(1.0); } -// public void setArrowVisible(bool visible = true) -void tst_QAbstractAxis::setArrowVisible() +void tst_QAbstractAxis::setMax() { -#if 0 - QFETCH(bool, visible); + QFETCH(QVariant, max); + m_axis->setMax(max); +} - SubQAbstractAxis axis; +void tst_QAbstractAxis::setMin_data() +{ + //just check if it does not crash + QTest::addColumn("min"); + QTest::newRow("something") << QVariant("something"); + QTest::newRow("1.0") << QVariant(1.0); +} - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); +// public void setMin(QVariant const& min) +void tst_QAbstractAxis::setMin() +{ + QFETCH(QVariant, min); + m_axis->setMin(min); +} - axis.setArrowVisible(visible); +void tst_QAbstractAxis::setRange_data() +{ + //just check if it does not crash + QTest::addColumn("min"); + QTest::addColumn("max"); + QTest::newRow("something") << QVariant("something0") << QVariant("something1"); + QTest::newRow("-1 1") << QVariant(-1.0) << QVariant(1.0); +} - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); +// public void setRange(QVariant const& min, QVariant const& max) +void tst_QAbstractAxis::setRange() +{ + + QFETCH(QVariant, min); + QFETCH(QVariant, max); + m_axis->setRange(min,max); } -void tst_QAbstractAxis::setAxisPen_data() +void tst_QAbstractAxis::shadesBorderColor_data() { -#if 0 - QTest::addColumn("pen"); - QTest::newRow("null") << QPen(); -#endif + +} + +void tst_QAbstractAxis::shadesBorderColor() +{ + QSKIP("Test is not implemented. This is depreciated function", SkipAll); } -// public void setAxisPen(QPen const& pen) -void tst_QAbstractAxis::setAxisPen() +void tst_QAbstractAxis::shadesBrush_data() { -#if 0 - QFETCH(QPen, pen); + QTest::addColumn("shadesBrush"); + QTest::newRow("null") << QBrush(); + QTest::newRow("blue") << QBrush(Qt::blue); + QTest::newRow("black") << QBrush(Qt::black); +} - SubQAbstractAxis axis; +void tst_QAbstractAxis::shadesBrush() +{ + QFETCH(QBrush, shadesBrush); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - axis.setAxisPen(pen); + m_axis->setShadesBrush(shadesBrush); + QCOMPARE(m_axis->shadesBrush(), shadesBrush); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -728,40 +664,50 @@ void tst_QAbstractAxis::setAxisPen() QCOMPARE(spy3.count(), 0); QCOMPARE(spy4.count(), 0); QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); + //TODO QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->shadesBrush(), shadesBrush); +} + +void tst_QAbstractAxis::shadesColor_data() +{ } -void tst_QAbstractAxis::setAxisPenColor_data() +// public QColor shadesColor() const +void tst_QAbstractAxis::shadesColor() { -#if 0 - QTest::addColumn("color"); - QTest::newRow("null") << QColor(); -#endif + QSKIP("Test is not implemented. This is depreciated function", SkipAll); } -// public void setAxisPenColor(QColor color) -void tst_QAbstractAxis::setAxisPenColor() +void tst_QAbstractAxis::shadesPen_data() { -#if 0 - QFETCH(QColor, color); + QTest::addColumn("shadesPen"); + QTest::newRow("null") << QPen(); + QTest::newRow("blue") << QPen(Qt::blue); + QTest::newRow("black") << QPen(Qt::black); + QTest::newRow("red") << QPen(Qt::red); +} - SubQAbstractAxis axis; +void tst_QAbstractAxis::shadesPen() +{ + QFETCH(QPen, shadesPen); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - axis.setAxisPenColor(color); + m_axis->setShadesPen(shadesPen); + QCOMPARE(m_axis->shadesPen(), shadesPen); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -772,1096 +718,38 @@ void tst_QAbstractAxis::setAxisPenColor() QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} -void tst_QAbstractAxis::setGridLinePen_data() -{ -#if 0 - QTest::addColumn("pen"); - QTest::newRow("null") << QPen(); -#endif + m_chart->setAxisX(m_axis, m_series); + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->shadesPen(), shadesPen); } -// public void setGridLinePen(QPen const& pen) -void tst_QAbstractAxis::setGridLinePen() -{ -#if 0 - QFETCH(QPen, pen); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setGridLinePen(pen); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setGridLineVisible_data() -{ - QTest::addColumn("visible"); - QTest::newRow("true") << true; - QTest::newRow("false") << false; -} - -// public void setGridLineVisible(bool visible = true) -void tst_QAbstractAxis::setGridLineVisible() -{ -#if 0 - QFETCH(bool, visible); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setGridLineVisible(visible); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setLabelsAngle_data() -{ - QTest::addColumn("angle"); - QTest::newRow("0") << 0; - QTest::newRow("-1") << -1; -} - -// public void setLabelsAngle(int angle) -void tst_QAbstractAxis::setLabelsAngle() -{ -#if 0 - QFETCH(int, angle); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setLabelsAngle(angle); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setLabelsBrush_data() -{ -#if 0 - QTest::addColumn("brush"); - QTest::newRow("null") << QBrush(); -#endif -} - -// public void setLabelsBrush(QBrush const& brush) -void tst_QAbstractAxis::setLabelsBrush() -{ -#if 0 - QFETCH(QBrush, brush); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setLabelsBrush(brush); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setLabelsColor_data() -{ -#if 0 - QTest::addColumn("color"); - QTest::newRow("null") << QColor(); -#endif -} - -// public void setLabelsColor(QColor color) -void tst_QAbstractAxis::setLabelsColor() -{ -#if 0 - QFETCH(QColor, color); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setLabelsColor(color); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setLabelsFont_data() -{ - QTest::addColumn("font"); - QTest::newRow("null") << QFont(); -} - -// public void setLabelsFont(QFont const& font) -void tst_QAbstractAxis::setLabelsFont() -{ -#if 0 - QFETCH(QFont, font); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setLabelsFont(font); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setLabelsPen_data() -{ -#if 0 - QTest::addColumn("pen"); - QTest::newRow("null") << QPen(); -#endif -} - -// public void setLabelsPen(QPen const& pen) -void tst_QAbstractAxis::setLabelsPen() -{ -#if 0 - QFETCH(QPen, pen); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setLabelsPen(pen); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setLabelsVisible_data() -{ - QTest::addColumn("visible"); - QTest::newRow("true") << true; - QTest::newRow("false") << false; -} - -// public void setLabelsVisible(bool visible = true) -void tst_QAbstractAxis::setLabelsVisible() -{ -#if 0 - QFETCH(bool, visible); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setLabelsVisible(visible); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -Q_DECLARE_METATYPE(QVariant) -void tst_QAbstractAxis::setMax_data() -{ -#if 0 - QTest::addColumn("max"); - QTest::newRow("null") << QVariant(); -#endif -} - -// public void setMax(QVariant const& max) -void tst_QAbstractAxis::setMax() -{ -#if 0 - QFETCH(QVariant, max); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setMax(max); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setMin_data() -{ -#if 0 - QTest::addColumn("min"); - QTest::newRow("null") << QVariant(); -#endif -} - -// public void setMin(QVariant const& min) -void tst_QAbstractAxis::setMin() -{ -#if 0 - QFETCH(QVariant, min); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setMin(min); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setRange_data() -{ -#if 0 - QTest::addColumn("min"); - QTest::addColumn("max"); - QTest::newRow("null") << QVariant() << QVariant(); -#endif -} - -// public void setRange(QVariant const& min, QVariant const& max) -void tst_QAbstractAxis::setRange() -{ -#if 0 - QFETCH(QVariant, min); - QFETCH(QVariant, max); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setRange(min, max); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setShadesBorderColor_data() -{ -#if 0 - QTest::addColumn("color"); - QTest::newRow("null") << QColor(); -#endif -} - -// public void setShadesBorderColor(QColor color) -void tst_QAbstractAxis::setShadesBorderColor() -{ -#if 0 - QFETCH(QColor, color); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setShadesBorderColor(color); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setShadesBrush_data() -{ -#if 0 - QTest::addColumn("brush"); - QTest::newRow("null") << QBrush(); -#endif -} - -// public void setShadesBrush(QBrush const& brush) -void tst_QAbstractAxis::setShadesBrush() -{ -#if 0 - QFETCH(QBrush, brush); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setShadesBrush(brush); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setShadesColor_data() -{ -#if 0 - QTest::addColumn("color"); - QTest::newRow("null") << QColor(); -#endif -} - -// public void setShadesColor(QColor color) -void tst_QAbstractAxis::setShadesColor() -{ -#if 0 - QFETCH(QColor, color); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setShadesColor(color); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setShadesPen_data() -{ -#if 0 - QTest::addColumn("pen"); - QTest::newRow("null") << QPen(); -#endif -} - -// public void setShadesPen(QPen const& pen) -void tst_QAbstractAxis::setShadesPen() -{ -#if 0 - QFETCH(QPen, pen); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setShadesPen(pen); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setShadesVisible_data() -{ - QTest::addColumn("visible"); - QTest::newRow("true") << true; - QTest::newRow("false") << false; -} - -// public void setShadesVisible(bool visible = true) -void tst_QAbstractAxis::setShadesVisible() -{ -#if 0 - QFETCH(bool, visible); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setShadesVisible(visible); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::setVisible_data() -{ - QTest::addColumn("visible"); - QTest::newRow("true") << true; - QTest::newRow("false") << false; -} - -// public void setVisible(bool visible = true) -void tst_QAbstractAxis::setVisible() -{ -#if 0 - QFETCH(bool, visible); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.setVisible(visible); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::shadesBorderColor_data() -{ -#if 0 - QTest::addColumn("shadesBorderColor"); - QTest::newRow("null") << QColor(); -#endif -} - -// public QColor shadesBorderColor() const -void tst_QAbstractAxis::shadesBorderColor() -{ -#if 0 - QFETCH(QColor, shadesBorderColor); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - QCOMPARE(axis.shadesBorderColor(), shadesBorderColor); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::shadesBrush_data() -{ -#if 0 - QTest::addColumn("shadesBrush"); - QTest::newRow("null") << QBrush(); -#endif -} - -// public QBrush shadesBrush() const -void tst_QAbstractAxis::shadesBrush() -{ -#if 0 - QFETCH(QBrush, shadesBrush); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - QCOMPARE(axis.shadesBrush(), shadesBrush); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::shadesColor_data() -{ -#if 0 - QTest::addColumn("shadesColor"); - QTest::newRow("null") << QColor(); -#endif -} - -// public QColor shadesColor() const -void tst_QAbstractAxis::shadesColor() -{ -#if 0 - QFETCH(QColor, shadesColor); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - QCOMPARE(axis.shadesColor(), shadesColor); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::shadesPen_data() -{ -#if 0 - QTest::addColumn("shadesPen"); - QTest::newRow("null") << QPen(); -#endif -} - -// public QPen shadesPen() const -void tst_QAbstractAxis::shadesPen() -{ -#if 0 - QFETCH(QPen, shadesPen); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - QCOMPARE(axis.shadesPen(), shadesPen); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::shadesVisible_data() +void tst_QAbstractAxis::shadesVisible_data() { QTest::addColumn("shadesVisible"); QTest::newRow("true") << true; QTest::newRow("false") << false; } -// public bool shadesVisible() const void tst_QAbstractAxis::shadesVisible() { -#if 0 QFETCH(bool, shadesVisible); - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - QCOMPARE(axis.shadesVisible(), shadesVisible); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::show_data() -{ - QTest::addColumn("foo"); - QTest::newRow("0") << 0; - QTest::newRow("-1") << -1; -} - -// public void show() -void tst_QAbstractAxis::show() -{ -#if 0 - QFETCH(int, foo); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.show(); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -Q_DECLARE_METATYPE(QAbstractAxis::AxisType) -void tst_QAbstractAxis::type_data() -{ -#if 0 - QTest::addColumn("type"); - QTest::newRow("null") << QAbstractAxis::AxisType(); -#endif -} - -// public QAbstractAxis::AxisType type() const -void tst_QAbstractAxis::type() -{ -#if 0 - QFETCH(QAbstractAxis::AxisType, type); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - QCOMPARE(axis.type(), type); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::arrowVisibleChanged_data() -{ - QTest::addColumn("visible"); - QTest::newRow("true") << true; - QTest::newRow("false") << false; -} - -// protected void arrowVisibleChanged(bool visible) -void tst_QAbstractAxis::arrowVisibleChanged() -{ -#if 0 - QFETCH(bool, visible); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.call_arrowVisibleChanged(visible); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::colorChanged_data() -{ -#if 0 - QTest::addColumn("color"); - QTest::newRow("null") << QColor(); -#endif -} - -// protected void colorChanged(QColor color) -void tst_QAbstractAxis::colorChanged() -{ -#if 0 - QFETCH(QColor, color); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.call_colorChanged(color); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::gridVisibleChanged_data() -{ - QTest::addColumn("visible"); - QTest::newRow("true") << true; - QTest::newRow("false") << false; -} - -// protected void gridVisibleChanged(bool visible) -void tst_QAbstractAxis::gridVisibleChanged() -{ -#if 0 - QFETCH(bool, visible); - - SubQAbstractAxis axis; + m_axis->setShadesVisible(!shadesVisible); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - axis.call_gridVisibleChanged(visible); + m_axis->setShadesVisible(shadesVisible); + QCOMPARE(m_axis->shadesVisible(), shadesVisible); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -1870,79 +758,36 @@ void tst_QAbstractAxis::gridVisibleChanged() QCOMPARE(spy4.count(), 0); QCOMPARE(spy5.count(), 0); QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); + QCOMPARE(spy7.count(), 1); QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} -void tst_QAbstractAxis::labelsColorChanged_data() -{ -#if 0 - QTest::addColumn("color"); - QTest::newRow("null") << QColor(); -#endif + m_chart->setAxisX(m_axis, m_series); + m_view->show(); + QTest::qWaitForWindowShown(m_view); + QCOMPARE(m_axis->shadesVisible(), shadesVisible); } -// protected void labelsColorChanged(QColor color) -void tst_QAbstractAxis::labelsColorChanged() +void tst_QAbstractAxis::show_data() { -#if 0 - QFETCH(QColor, color); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.call_labelsColorChanged(color); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} -void tst_QAbstractAxis::labelsVisibleChanged_data() -{ - QTest::addColumn("visible"); - QTest::newRow("true") << true; - QTest::newRow("false") << false; } -// protected void labelsVisibleChanged(bool visible) -void tst_QAbstractAxis::labelsVisibleChanged() +void tst_QAbstractAxis::show() { -#if 0 - QFETCH(bool, visible); - - SubQAbstractAxis axis; + m_axis->hide(); + QCOMPARE(m_axis->isVisible(), false); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - axis.call_labelsVisibleChanged(visible); + m_axis->show(); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -1952,79 +797,31 @@ void tst_QAbstractAxis::labelsVisibleChanged() QCOMPARE(spy5.count(), 0); QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} - -void tst_QAbstractAxis::shadesBorderColorChanged_data() -{ -#if 0 - QTest::addColumn("color"); - QTest::newRow("null") << QColor(); -#endif + QCOMPARE(spy8.count(), 1); + QCOMPARE(m_axis->isVisible(), true); } -// protected void shadesBorderColorChanged(QColor color) -void tst_QAbstractAxis::shadesBorderColorChanged() +void tst_QAbstractAxis::hide_data() { -#if 0 - QFETCH(QColor, color); - - SubQAbstractAxis axis; - - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - - axis.call_shadesBorderColorChanged(color); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} -void tst_QAbstractAxis::shadesColorChanged_data() -{ -#if 0 - QTest::addColumn("color"); - QTest::newRow("null") << QColor(); -#endif } -// protected void shadesColorChanged(QColor color) -void tst_QAbstractAxis::shadesColorChanged() +void tst_QAbstractAxis::hide() { -#if 0 - QFETCH(QColor, color); - - SubQAbstractAxis axis; + m_axis->show(); + QCOMPARE(m_axis->isVisible(),true); - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); + QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); + QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); + QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); + QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); + QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); + QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); + QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); + QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); + QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); - axis.call_shadesColorChanged(color); + m_axis->hide(); QCOMPARE(spy0.count(), 0); QCOMPARE(spy1.count(), 0); @@ -2034,87 +831,18 @@ void tst_QAbstractAxis::shadesColorChanged() QCOMPARE(spy5.count(), 0); QCOMPARE(spy6.count(), 0); QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); + QCOMPARE(spy8.count(), 1); + QCOMPARE(m_axis->isVisible(),false); } -void tst_QAbstractAxis::shadesVisibleChanged_data() -{ - QTest::addColumn("visible"); - QTest::newRow("true") << true; - QTest::newRow("false") << false; -} -// protected void shadesVisibleChanged(bool visible) -void tst_QAbstractAxis::shadesVisibleChanged() -{ -#if 0 - QFETCH(bool, visible); - SubQAbstractAxis axis; - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - axis.call_shadesVisibleChanged(visible); - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} -void tst_QAbstractAxis::visibleChanged_data() -{ - QTest::addColumn("visible"); - QTest::newRow("true") << true; - QTest::newRow("false") << false; -} -// protected void visibleChanged(bool visible) -void tst_QAbstractAxis::visibleChanged() -{ -#if 0 - QFETCH(bool, visible); - SubQAbstractAxis axis; - QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); - QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); - QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); - QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); - QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); - QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); - QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); - QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); - QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); - axis.call_visibleChanged(visible); - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - QCOMPARE(spy7.count(), 0); - QCOMPARE(spy8.count(), 0); -#endif - QSKIP("Test is not implemented.", SkipAll); -} diff --git a/tests/auto/qabstractaxis/tst_qabstractaxis.h b/tests/auto/qabstractaxis/tst_qabstractaxis.h index d3794b2..da0a643 100644 --- a/tests/auto/qabstractaxis/tst_qabstractaxis.h +++ b/tests/auto/qabstractaxis/tst_qabstractaxis.h @@ -35,7 +35,7 @@ class tst_QAbstractAxis : public QObject public slots: virtual void initTestCase(); virtual void cleanupTestCase(); - virtual void init(QAbstractAxis* axis); + virtual void init(QAbstractAxis* axis,QAbstractSeries* series); virtual void cleanup(); private slots: @@ -45,14 +45,12 @@ private slots: void axisPenColor(); void gridLinePen_data(); void gridLinePen(); - void hide_data(); - void hide(); - void isArrowVisible_data(); - void isArrowVisible(); - void isGridLineVisible_data(); - void isGridLineVisible(); - void isVisible_data(); - void isVisible(); + void arrowVisible_data(); + void arrowVisible(); + void gridLineVisible_data(); + void gridLineVisible(); + void visible_data(); + void visible(); void labelsAngle_data(); void labelsAngle(); void labelsBrush_data(); @@ -67,46 +65,12 @@ private slots: void labelsVisible(); void orientation_data(); void orientation(); - void setArrowVisible_data(); - void setArrowVisible(); - void setAxisPen_data(); - void setAxisPen(); - void setAxisPenColor_data(); - void setAxisPenColor(); - void setGridLinePen_data(); - void setGridLinePen(); - void setGridLineVisible_data(); - void setGridLineVisible(); - void setLabelsAngle_data(); - void setLabelsAngle(); - void setLabelsBrush_data(); - void setLabelsBrush(); - void setLabelsColor_data(); - void setLabelsColor(); - void setLabelsFont_data(); - void setLabelsFont(); - void setLabelsPen_data(); - void setLabelsPen(); - void setLabelsVisible_data(); - void setLabelsVisible(); void setMax_data(); void setMax(); void setMin_data(); void setMin(); void setRange_data(); void setRange(); - void setShadesBorderColor_data(); - void setShadesBorderColor(); - void setShadesBrush_data(); - void setShadesBrush(); - void setShadesColor_data(); - void setShadesColor(); - void setShadesPen_data(); - void setShadesPen(); - void setShadesVisible_data(); - void setShadesVisible(); - void setVisible_data(); - void setVisible(); void shadesBorderColor_data(); void shadesBorderColor(); void shadesBrush_data(); @@ -119,26 +83,8 @@ private slots: void shadesVisible(); void show_data(); void show(); - void type_data(); - void type(); - void arrowVisibleChanged_data(); - void arrowVisibleChanged(); - void colorChanged_data(); - void colorChanged(); - void gridVisibleChanged_data(); - void gridVisibleChanged(); - void labelsColorChanged_data(); - void labelsColorChanged(); - void labelsVisibleChanged_data(); - void labelsVisibleChanged(); - void shadesBorderColorChanged_data(); - void shadesBorderColorChanged(); - void shadesColorChanged_data(); - void shadesColorChanged(); - void shadesVisibleChanged_data(); - void shadesVisibleChanged(); - void visibleChanged_data(); - void visibleChanged(); + void hide_data(); + void hide(); protected: void qabstractaxis(); @@ -146,6 +92,7 @@ protected: QChartView* m_view; QChart* m_chart; QAbstractAxis* m_axis; + QAbstractSeries* m_series; }; #endif diff --git a/tests/auto/qvaluesaxis/tst_qvaluesaxis.cpp b/tests/auto/qvaluesaxis/tst_qvaluesaxis.cpp index cb2fc71..02cb76a 100644 --- a/tests/auto/qvaluesaxis/tst_qvaluesaxis.cpp +++ b/tests/auto/qvaluesaxis/tst_qvaluesaxis.cpp @@ -75,9 +75,9 @@ void tst_QValuesAxis::cleanupTestCase() void tst_QValuesAxis::init() { m_valuesaxis = new QValuesAxis(); - tst_QAbstractAxis::init(m_valuesaxis); m_series = new QLineSeries(); *m_series << QPointF(-100, -100) << QPointF(0, 0) << QPointF(100, 100); + tst_QAbstractAxis::init(m_valuesaxis,m_series); m_chart->addSeries(m_series); m_chart->createDefaultAxes(); }