##// END OF EJS Templates
QML unit tests for setting illegal axes
Tero Ahola -
r2330:2968500e2441
parent child
Show More
@@ -56,13 +56,24 Rectangle {
56 }
56 }
57
57
58 function test_axes() {
58 function test_axes() {
59 // Axis initialization
59 compare(chartView.axes.length, 2);
60 compare(chartView.axes.length, 2);
60 verify(chartView.axes[0] == lineSeries.axisX || chartView.axes[1] == lineSeries.axisX);
61 verify(chartView.axes[0] == lineSeries.axisX || chartView.axes[1] == lineSeries.axisX);
61 verify(chartView.axes[0] == lineSeries.axisY || chartView.axes[1] == lineSeries.axisY);
62 verify(chartView.axes[0] == lineSeries.axisY || chartView.axes[1] == lineSeries.axisY);
62 verify(lineSeries.axisX == splineSeries.axisX);
63 compare(lineSeries.axisX, splineSeries.axisX);
63 verify(lineSeries.axisY == splineSeries.axisY);
64 compare(lineSeries.axisY, splineSeries.axisY);
64 verify(lineSeries.axisX == areaSeries.axisX);
65 compare(lineSeries.axisX, areaSeries.axisX);
65 verify(lineSeries.axisY == areaSeries.axisY);
66 compare(lineSeries.axisY, areaSeries.axisY);
67
68 // Set illegal axes
69 lineSeries.axisX = lineSeries.axisY;
70 compare(lineSeries.axisX, splineSeries.axisX);
71 lineSeries.axisXTop = lineSeries.axisX;
72 compare(lineSeries.axisX, splineSeries.axisX);
73 lineSeries.axisY = lineSeries.axisX;
74 compare(lineSeries.axisY, splineSeries.axisY);
75 lineSeries.axisYRight = lineSeries.axisY;
76 compare(lineSeries.axisY, splineSeries.axisY);
66 }
77 }
67
78
68 function test_append() {
79 function test_append() {
General Comments 0
You need to be logged in to leave comments. Login now