summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhorizontalbarseries/tst_qhorizontalbarseries.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qhorizontalbarseries/tst_qhorizontalbarseries.cpp')
-rw-r--r--tests/auto/qhorizontalbarseries/tst_qhorizontalbarseries.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qhorizontalbarseries/tst_qhorizontalbarseries.cpp b/tests/auto/qhorizontalbarseries/tst_qhorizontalbarseries.cpp
index 643d2214..f32b8f73 100644
--- a/tests/auto/qhorizontalbarseries/tst_qhorizontalbarseries.cpp
+++ b/tests/auto/qhorizontalbarseries/tst_qhorizontalbarseries.cpp
@@ -57,6 +57,7 @@ private slots:
void setLabelsVisible();
void setLabelsFormat();
void setLabelsPosition();
+ void setLabelsAngle();
void mouseclicked_data();
void mouseclicked();
void mousehovered_data();
@@ -370,6 +371,19 @@ void tst_QHorizontalBarSeries::setLabelsPosition()
QCOMPARE(m_barseries->labelsPosition(), QHorizontalBarSeries::LabelsCenter);
}
+void tst_QHorizontalBarSeries::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_QHorizontalBarSeries::mouseclicked_data()
{