summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp')
-rw-r--r--tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp b/tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp
index cdba077c..b0408b8b 100644
--- a/tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp
+++ b/tests/auto/qhorizontalpercentbarseries/tst_qhorizontalpercentbarseries.cpp
@@ -45,6 +45,7 @@ private slots:
void type();
void setLabelsFormat();
void setLabelsPosition();
+ void setLabelsAngle();
void mouseclicked_data();
void mouseclicked();
void mousehovered_data();
@@ -155,6 +156,19 @@ void tst_QHorizontalPercentBarSeries::setLabelsPosition()
QCOMPARE(m_barseries->labelsPosition(), QHorizontalPercentBarSeries::LabelsCenter);
}
+void tst_QHorizontalPercentBarSeries::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_QHorizontalPercentBarSeries::mouseclicked_data()
{