diff options
Diffstat (limited to 'tests/auto/qhorizontalstackedbarseries/tst_qhorizontalstackedbarseries.cpp')
-rw-r--r-- | tests/auto/qhorizontalstackedbarseries/tst_qhorizontalstackedbarseries.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qhorizontalstackedbarseries/tst_qhorizontalstackedbarseries.cpp b/tests/auto/qhorizontalstackedbarseries/tst_qhorizontalstackedbarseries.cpp index 0eb00fe2..73e75a25 100644 --- a/tests/auto/qhorizontalstackedbarseries/tst_qhorizontalstackedbarseries.cpp +++ b/tests/auto/qhorizontalstackedbarseries/tst_qhorizontalstackedbarseries.cpp @@ -45,6 +45,7 @@ private slots: void type(); void setLabelsFormat(); void setLabelsPosition(); + void setLabelsAngle(); void mouseclicked_data(); void mouseclicked(); void mousehovered_data(); @@ -154,6 +155,19 @@ void tst_QHorizontalStackedBarSeries::setLabelsPosition() QCOMPARE(m_barseries->labelsPosition(), QHorizontalStackedBarSeries::LabelsCenter); } +void tst_QHorizontalStackedBarSeries::setLabelsAngle() +{ + QSignalSpy labelsAngleSpy(m_barseries, + SIGNAL(labelsAngleChanged(qreal))); + QCOMPARE(m_barseries->labelsAngle(), 0.0); + + m_barseries->setLabelsAngle(55.0); + TRY_COMPARE(labelsAngleSpy.count(), 1); + QList<QVariant> arguments = labelsAngleSpy.takeFirst(); + QVERIFY(arguments.at(0).value<qreal>() == 55.0); + QCOMPARE(m_barseries->labelsAngle(), 55.0); +} + void tst_QHorizontalStackedBarSeries::mouseclicked_data() { |