@@ -0,0 +1,6 | |||||
|
1 | !include( ../auto.pri ) { | |||
|
2 | error( "Couldn't find the auto.pri file!" ) | |||
|
3 | } | |||
|
4 | SOURCES += tst_qlineseries.cpp | |||
|
5 | ||||
|
6 | !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR" |
This diff has been collapsed as it changes many lines, (648 lines changed) Show them Hide them | |||||
@@ -0,0 +1,648 | |||||
|
1 | #include <QtTest/QtTest> | |||
|
2 | #include <qlineseries.h> | |||
|
3 | ||||
|
4 | QTCOMMERCIALCHART_USE_NAMESPACE | |||
|
5 | ||||
|
6 | class tst_QLineSeries : public QObject | |||
|
7 | { | |||
|
8 | Q_OBJECT | |||
|
9 | ||||
|
10 | public slots: | |||
|
11 | void initTestCase(); | |||
|
12 | void cleanupTestCase(); | |||
|
13 | void init(); | |||
|
14 | void cleanup(); | |||
|
15 | ||||
|
16 | private slots: | |||
|
17 | void qxyseries_data(); | |||
|
18 | void qxyseries(); | |||
|
19 | ||||
|
20 | void append_data(); | |||
|
21 | void append(); | |||
|
22 | void brush_data(); | |||
|
23 | void brush(); | |||
|
24 | void count_data(); | |||
|
25 | void count(); | |||
|
26 | void data_data(); | |||
|
27 | void data(); | |||
|
28 | void oper_data(); | |||
|
29 | void oper(); | |||
|
30 | void pen_data(); | |||
|
31 | void pen(); | |||
|
32 | void pointsVisible_data(); | |||
|
33 | void pointsVisible(); | |||
|
34 | void remove_data(); | |||
|
35 | void remove(); | |||
|
36 | void removeAll_data(); | |||
|
37 | void removeAll(); | |||
|
38 | void replace_data(); | |||
|
39 | void replace(); | |||
|
40 | void setBrush_data(); | |||
|
41 | void setBrush(); | |||
|
42 | void setModel_data(); | |||
|
43 | void setModel(); | |||
|
44 | void setModelMapping_data(); | |||
|
45 | void setModelMapping(); | |||
|
46 | void setPen_data(); | |||
|
47 | void setPen(); | |||
|
48 | void setPointsVisible_data(); | |||
|
49 | void setPointsVisible(); | |||
|
50 | void x_data(); | |||
|
51 | void x(); | |||
|
52 | void y_data(); | |||
|
53 | void y(); | |||
|
54 | void clicked_data(); | |||
|
55 | void clicked(); | |||
|
56 | void selected_data(); | |||
|
57 | void selected(); | |||
|
58 | }; | |||
|
59 | ||||
|
60 | // Subclass that exposes the protected functions. | |||
|
61 | class SubQXYSeries : public QLineSeries | |||
|
62 | { | |||
|
63 | public: | |||
|
64 | void call_clicked(QPointF const& point) | |||
|
65 | { return SubQXYSeries::clicked(point); } | |||
|
66 | ||||
|
67 | void call_selected() | |||
|
68 | { return SubQXYSeries::selected(); } | |||
|
69 | ||||
|
70 | }; | |||
|
71 | ||||
|
72 | // This will be called before the first test function is executed. | |||
|
73 | // It is only called once. | |||
|
74 | void tst_QLineSeries::initTestCase() | |||
|
75 | { | |||
|
76 | } | |||
|
77 | ||||
|
78 | // This will be called after the last test function is executed. | |||
|
79 | // It is only called once. | |||
|
80 | void tst_QLineSeries::cleanupTestCase() | |||
|
81 | { | |||
|
82 | } | |||
|
83 | ||||
|
84 | // This will be called before each test function is executed. | |||
|
85 | void tst_QLineSeries::init() | |||
|
86 | { | |||
|
87 | } | |||
|
88 | ||||
|
89 | // This will be called after every test function. | |||
|
90 | void tst_QLineSeries::cleanup() | |||
|
91 | { | |||
|
92 | } | |||
|
93 | ||||
|
94 | void tst_QLineSeries::qxyseries_data() | |||
|
95 | { | |||
|
96 | } | |||
|
97 | ||||
|
98 | void tst_QLineSeries::qxyseries() | |||
|
99 | { | |||
|
100 | SubQXYSeries series; | |||
|
101 | #if 0 | |||
|
102 | series.append(QList<QPointF> const); | |||
|
103 | series.append(qreal, qreal); | |||
|
104 | series.append(QPointF()); | |||
|
105 | QCOMPARE(series.brush(), QBrush); | |||
|
106 | QCOMPARE(series.count(), -1); | |||
|
107 | QCOMPARE(series.data(), QList<QPointF>()); | |||
|
108 | QCOMPARE(series.operator<<(QList<QPointF> const), QXYSeries&); | |||
|
109 | QCOMPARE(series.operator<<(QPointF()), QXYSeries&); | |||
|
110 | QCOMPARE(series.pen(), QPen); | |||
|
111 | QCOMPARE(series.pointsVisible(), false); | |||
|
112 | series.remove(qreal, qreal); | |||
|
113 | series.remove(QPointF()); | |||
|
114 | series.remove(qreal); | |||
|
115 | series.removeAll(); | |||
|
116 | series.replace(QPointF()); | |||
|
117 | series.replace(qreal, qreal); | |||
|
118 | series.setBrush(QBrush()); | |||
|
119 | QCOMPARE(series.setModel((QAbstractItemModel*)0), false); | |||
|
120 | series.setModelMapping(-1, -1, Qt::Orientation); | |||
|
121 | series.setPen(QPen()); | |||
|
122 | series.setPointsVisible(false); | |||
|
123 | QCOMPARE(series.x(-1), qreal); | |||
|
124 | QCOMPARE(series.y(-1), qreal); | |||
|
125 | series.call_clicked(QPointF()); | |||
|
126 | series.call_selected(); | |||
|
127 | #endif | |||
|
128 | QSKIP("Test is not implemented.", SkipAll); | |||
|
129 | } | |||
|
130 | ||||
|
131 | Q_DECLARE_METATYPE(QList<QPointF>) | |||
|
132 | void tst_QLineSeries::append_data() | |||
|
133 | { | |||
|
134 | #if 0 | |||
|
135 | QTest::addColumn<QList<QPointF>>("points"); | |||
|
136 | QTest::newRow("null") << QList<QPointF>(); | |||
|
137 | #endif | |||
|
138 | } | |||
|
139 | ||||
|
140 | // public void append(QList<QPointF> const points) | |||
|
141 | void tst_QLineSeries::append() | |||
|
142 | { | |||
|
143 | #if 0 | |||
|
144 | QFETCH(QList<QPointF>, points); | |||
|
145 | ||||
|
146 | SubQXYSeries series; | |||
|
147 | ||||
|
148 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
149 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
150 | ||||
|
151 | series.append(points); | |||
|
152 | ||||
|
153 | QCOMPARE(spy0.count(), 0); | |||
|
154 | QCOMPARE(spy1.count(), 0); | |||
|
155 | #endif | |||
|
156 | QSKIP("Test is not implemented.", SkipAll); | |||
|
157 | } | |||
|
158 | ||||
|
159 | Q_DECLARE_METATYPE(QBrush) | |||
|
160 | void tst_QLineSeries::brush_data() | |||
|
161 | { | |||
|
162 | #if 0 | |||
|
163 | QTest::addColumn<QBrush>("brush"); | |||
|
164 | QTest::newRow("null") << QBrush(); | |||
|
165 | #endif | |||
|
166 | } | |||
|
167 | ||||
|
168 | // public QBrush brush() const | |||
|
169 | void tst_QLineSeries::brush() | |||
|
170 | { | |||
|
171 | #if 0 | |||
|
172 | QFETCH(QBrush, brush); | |||
|
173 | ||||
|
174 | SubQXYSeries series; | |||
|
175 | ||||
|
176 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
177 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
178 | ||||
|
179 | QCOMPARE(series.brush(), brush); | |||
|
180 | ||||
|
181 | QCOMPARE(spy0.count(), 0); | |||
|
182 | QCOMPARE(spy1.count(), 0); | |||
|
183 | #endif | |||
|
184 | QSKIP("Test is not implemented.", SkipAll); | |||
|
185 | } | |||
|
186 | ||||
|
187 | void tst_QLineSeries::count_data() | |||
|
188 | { | |||
|
189 | QTest::addColumn<int>("count"); | |||
|
190 | QTest::newRow("0") << 0; | |||
|
191 | QTest::newRow("-1") << -1; | |||
|
192 | } | |||
|
193 | ||||
|
194 | // public int count() const | |||
|
195 | void tst_QLineSeries::count() | |||
|
196 | { | |||
|
197 | #if 0 | |||
|
198 | QFETCH(int, count); | |||
|
199 | ||||
|
200 | SubQXYSeries series; | |||
|
201 | ||||
|
202 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
203 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
204 | ||||
|
205 | QCOMPARE(series.count(), count); | |||
|
206 | ||||
|
207 | QCOMPARE(spy0.count(), 0); | |||
|
208 | QCOMPARE(spy1.count(), 0); | |||
|
209 | #endif | |||
|
210 | QSKIP("Test is not implemented.", SkipAll); | |||
|
211 | } | |||
|
212 | ||||
|
213 | void tst_QLineSeries::data_data() | |||
|
214 | { | |||
|
215 | #if 0 | |||
|
216 | QTest::addColumn<QList<QPointF>>("data"); | |||
|
217 | QTest::newRow("null") << QList<QPointF>(); | |||
|
218 | #endif | |||
|
219 | } | |||
|
220 | ||||
|
221 | // public QList<QPointF> data() | |||
|
222 | void tst_QLineSeries::data() | |||
|
223 | { | |||
|
224 | #if 0 | |||
|
225 | QFETCH(QList<QPointF>, data); | |||
|
226 | ||||
|
227 | SubQXYSeries series; | |||
|
228 | ||||
|
229 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
230 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
231 | ||||
|
232 | QCOMPARE(series.data(), data); | |||
|
233 | ||||
|
234 | QCOMPARE(spy0.count(), 0); | |||
|
235 | QCOMPARE(spy1.count(), 0); | |||
|
236 | #endif | |||
|
237 | QSKIP("Test is not implemented.", SkipAll); | |||
|
238 | } | |||
|
239 | ||||
|
240 | void tst_QLineSeries::oper_data() | |||
|
241 | { | |||
|
242 | #if 0 | |||
|
243 | QTest::addColumn<QList<QPointF>>("points"); | |||
|
244 | QTest::addColumn<QXYSeries&>("operator<<"); | |||
|
245 | QTest::newRow("null") << QList<QPointF>() << QXYSeries&(); | |||
|
246 | #endif | |||
|
247 | } | |||
|
248 | ||||
|
249 | // public QXYSeries& operator<<(QList<QPointF> const points) | |||
|
250 | void tst_QLineSeries::oper() | |||
|
251 | { | |||
|
252 | #if 0 | |||
|
253 | QFETCH(QList<QPointF>, points); | |||
|
254 | QFETCH(QXYSeries&, operator<<); | |||
|
255 | ||||
|
256 | SubQXYSeries series; | |||
|
257 | ||||
|
258 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
259 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
260 | ||||
|
261 | QCOMPARE(series.operator<<(points), operator<<); | |||
|
262 | ||||
|
263 | QCOMPARE(spy0.count(), 0); | |||
|
264 | QCOMPARE(spy1.count(), 0); | |||
|
265 | #endif | |||
|
266 | QSKIP("Test is not implemented.", SkipAll); | |||
|
267 | } | |||
|
268 | ||||
|
269 | Q_DECLARE_METATYPE(QPen) | |||
|
270 | void tst_QLineSeries::pen_data() | |||
|
271 | { | |||
|
272 | #if 0 | |||
|
273 | QTest::addColumn<QPen>("pen"); | |||
|
274 | QTest::newRow("null") << QPen(); | |||
|
275 | #endif | |||
|
276 | } | |||
|
277 | ||||
|
278 | // public QPen pen() const | |||
|
279 | void tst_QLineSeries::pen() | |||
|
280 | { | |||
|
281 | #if 0 | |||
|
282 | QFETCH(QPen, pen); | |||
|
283 | ||||
|
284 | SubQXYSeries series; | |||
|
285 | ||||
|
286 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
287 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
288 | ||||
|
289 | QCOMPARE(series.pen(), pen); | |||
|
290 | ||||
|
291 | QCOMPARE(spy0.count(), 0); | |||
|
292 | QCOMPARE(spy1.count(), 0); | |||
|
293 | #endif | |||
|
294 | QSKIP("Test is not implemented.", SkipAll); | |||
|
295 | } | |||
|
296 | ||||
|
297 | void tst_QLineSeries::pointsVisible_data() | |||
|
298 | { | |||
|
299 | QTest::addColumn<bool>("pointsVisible"); | |||
|
300 | QTest::newRow("true") << true; | |||
|
301 | QTest::newRow("false") << false; | |||
|
302 | } | |||
|
303 | ||||
|
304 | // public bool pointsVisible() const | |||
|
305 | void tst_QLineSeries::pointsVisible() | |||
|
306 | { | |||
|
307 | #if 0 | |||
|
308 | QFETCH(bool, pointsVisible); | |||
|
309 | ||||
|
310 | SubQXYSeries series; | |||
|
311 | ||||
|
312 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
313 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
314 | ||||
|
315 | QCOMPARE(series.pointsVisible(), pointsVisible); | |||
|
316 | ||||
|
317 | QCOMPARE(spy0.count(), 0); | |||
|
318 | QCOMPARE(spy1.count(), 0); | |||
|
319 | #endif | |||
|
320 | QSKIP("Test is not implemented.", SkipAll); | |||
|
321 | } | |||
|
322 | ||||
|
323 | void tst_QLineSeries::remove_data() | |||
|
324 | { | |||
|
325 | QTest::addColumn<qreal>("x"); | |||
|
326 | QTest::addColumn<qreal>("y"); | |||
|
327 | QTest::newRow("null") << 0.0 << 0.0; | |||
|
328 | } | |||
|
329 | ||||
|
330 | // public void remove(qreal x, qreal y) | |||
|
331 | void tst_QLineSeries::remove() | |||
|
332 | { | |||
|
333 | #if 0 | |||
|
334 | QFETCH(qreal, x); | |||
|
335 | QFETCH(qreal, y); | |||
|
336 | ||||
|
337 | SubQXYSeries series; | |||
|
338 | ||||
|
339 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
340 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
341 | ||||
|
342 | series.remove(x, y); | |||
|
343 | ||||
|
344 | QCOMPARE(spy0.count(), 0); | |||
|
345 | QCOMPARE(spy1.count(), 0); | |||
|
346 | #endif | |||
|
347 | QSKIP("Test is not implemented.", SkipAll); | |||
|
348 | } | |||
|
349 | ||||
|
350 | void tst_QLineSeries::removeAll_data() | |||
|
351 | { | |||
|
352 | QTest::addColumn<int>("foo"); | |||
|
353 | QTest::newRow("0") << 0; | |||
|
354 | QTest::newRow("-1") << -1; | |||
|
355 | } | |||
|
356 | ||||
|
357 | // public void removeAll() | |||
|
358 | void tst_QLineSeries::removeAll() | |||
|
359 | { | |||
|
360 | #if 0 | |||
|
361 | QFETCH(int, foo); | |||
|
362 | ||||
|
363 | SubQXYSeries series; | |||
|
364 | ||||
|
365 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
366 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
367 | ||||
|
368 | series.removeAll(); | |||
|
369 | ||||
|
370 | QCOMPARE(spy0.count(), 0); | |||
|
371 | QCOMPARE(spy1.count(), 0); | |||
|
372 | #endif | |||
|
373 | QSKIP("Test is not implemented.", SkipAll); | |||
|
374 | } | |||
|
375 | ||||
|
376 | void tst_QLineSeries::replace_data() | |||
|
377 | { | |||
|
378 | QTest::addColumn<QPointF>("point"); | |||
|
379 | QTest::newRow("null") << QPointF(); | |||
|
380 | } | |||
|
381 | ||||
|
382 | // public void replace(QPointF const& point) | |||
|
383 | void tst_QLineSeries::replace() | |||
|
384 | { | |||
|
385 | #if 0 | |||
|
386 | QFETCH(QPointF, point); | |||
|
387 | ||||
|
388 | SubQXYSeries series; | |||
|
389 | ||||
|
390 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
391 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
392 | ||||
|
393 | series.replace(point); | |||
|
394 | ||||
|
395 | QCOMPARE(spy0.count(), 0); | |||
|
396 | QCOMPARE(spy1.count(), 0); | |||
|
397 | #endif | |||
|
398 | QSKIP("Test is not implemented.", SkipAll); | |||
|
399 | } | |||
|
400 | ||||
|
401 | void tst_QLineSeries::setBrush_data() | |||
|
402 | { | |||
|
403 | #if 0 | |||
|
404 | QTest::addColumn<QBrush>("brush"); | |||
|
405 | QTest::newRow("null") << QBrush(); | |||
|
406 | #endif | |||
|
407 | } | |||
|
408 | ||||
|
409 | // public void setBrush(QBrush const& brush) | |||
|
410 | void tst_QLineSeries::setBrush() | |||
|
411 | { | |||
|
412 | #if 0 | |||
|
413 | QFETCH(QBrush, brush); | |||
|
414 | ||||
|
415 | SubQXYSeries series; | |||
|
416 | ||||
|
417 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
418 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
419 | ||||
|
420 | series.setBrush(brush); | |||
|
421 | ||||
|
422 | QCOMPARE(spy0.count(), 0); | |||
|
423 | QCOMPARE(spy1.count(), 0); | |||
|
424 | #endif | |||
|
425 | QSKIP("Test is not implemented.", SkipAll); | |||
|
426 | } | |||
|
427 | ||||
|
428 | void tst_QLineSeries::setModel_data() | |||
|
429 | { | |||
|
430 | QTest::addColumn<int>("modelCount"); | |||
|
431 | QTest::addColumn<bool>("setModel"); | |||
|
432 | QTest::newRow("null") << 0 << false; | |||
|
433 | } | |||
|
434 | ||||
|
435 | // public bool setModel(QAbstractItemModel* model) | |||
|
436 | void tst_QLineSeries::setModel() | |||
|
437 | { | |||
|
438 | #if 0 | |||
|
439 | QFETCH(int, modelCount); | |||
|
440 | QFETCH(bool, setModel); | |||
|
441 | ||||
|
442 | SubQXYSeries series; | |||
|
443 | ||||
|
444 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
445 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
446 | ||||
|
447 | QCOMPARE(series.setModel(model), setModel); | |||
|
448 | ||||
|
449 | QCOMPARE(spy0.count(), 0); | |||
|
450 | QCOMPARE(spy1.count(), 0); | |||
|
451 | #endif | |||
|
452 | QSKIP("Test is not implemented.", SkipAll); | |||
|
453 | } | |||
|
454 | ||||
|
455 | Q_DECLARE_METATYPE(Qt::Orientation) | |||
|
456 | void tst_QLineSeries::setModelMapping_data() | |||
|
457 | { | |||
|
458 | #if 0 | |||
|
459 | QTest::addColumn<int>("modelX"); | |||
|
460 | QTest::addColumn<int>("modelY"); | |||
|
461 | QTest::addColumn<Qt::Orientation>("orientation"); | |||
|
462 | QTest::newRow("null") << 0 << 0 << Qt::Orientation(); | |||
|
463 | #endif | |||
|
464 | } | |||
|
465 | ||||
|
466 | // public void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical) | |||
|
467 | void tst_QLineSeries::setModelMapping() | |||
|
468 | { | |||
|
469 | #if 0 | |||
|
470 | QFETCH(int, modelX); | |||
|
471 | QFETCH(int, modelY); | |||
|
472 | QFETCH(Qt::Orientation, orientation); | |||
|
473 | ||||
|
474 | SubQXYSeries series; | |||
|
475 | ||||
|
476 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
477 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
478 | ||||
|
479 | series.setModelMapping(modelX, modelY, orientation); | |||
|
480 | ||||
|
481 | QCOMPARE(spy0.count(), 0); | |||
|
482 | QCOMPARE(spy1.count(), 0); | |||
|
483 | #endif | |||
|
484 | QSKIP("Test is not implemented.", SkipAll); | |||
|
485 | } | |||
|
486 | ||||
|
487 | void tst_QLineSeries::setPen_data() | |||
|
488 | { | |||
|
489 | #if 0 | |||
|
490 | QTest::addColumn<QPen>("pen"); | |||
|
491 | QTest::newRow("null") << QPen(); | |||
|
492 | #endif | |||
|
493 | } | |||
|
494 | ||||
|
495 | // public void setPen(QPen const& pen) | |||
|
496 | void tst_QLineSeries::setPen() | |||
|
497 | { | |||
|
498 | #if 0 | |||
|
499 | QFETCH(QPen, pen); | |||
|
500 | ||||
|
501 | SubQXYSeries series; | |||
|
502 | ||||
|
503 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
504 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
505 | ||||
|
506 | series.setPen(pen); | |||
|
507 | ||||
|
508 | QCOMPARE(spy0.count(), 0); | |||
|
509 | QCOMPARE(spy1.count(), 0); | |||
|
510 | #endif | |||
|
511 | QSKIP("Test is not implemented.", SkipAll); | |||
|
512 | } | |||
|
513 | ||||
|
514 | void tst_QLineSeries::setPointsVisible_data() | |||
|
515 | { | |||
|
516 | QTest::addColumn<bool>("visible"); | |||
|
517 | QTest::newRow("true") << true; | |||
|
518 | QTest::newRow("false") << false; | |||
|
519 | } | |||
|
520 | ||||
|
521 | // public void setPointsVisible(bool visible = true) | |||
|
522 | void tst_QLineSeries::setPointsVisible() | |||
|
523 | { | |||
|
524 | #if 0 | |||
|
525 | QFETCH(bool, visible); | |||
|
526 | ||||
|
527 | SubQXYSeries series; | |||
|
528 | ||||
|
529 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
530 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
531 | ||||
|
532 | series.setPointsVisible(visible); | |||
|
533 | ||||
|
534 | QCOMPARE(spy0.count(), 0); | |||
|
535 | QCOMPARE(spy1.count(), 0); | |||
|
536 | #endif | |||
|
537 | QSKIP("Test is not implemented.", SkipAll); | |||
|
538 | } | |||
|
539 | ||||
|
540 | void tst_QLineSeries::x_data() | |||
|
541 | { | |||
|
542 | QTest::addColumn<int>("pos"); | |||
|
543 | QTest::addColumn<qreal>("x"); | |||
|
544 | QTest::newRow("null") << 0 << 0.0; | |||
|
545 | } | |||
|
546 | ||||
|
547 | // public qreal x(int pos) const | |||
|
548 | void tst_QLineSeries::x() | |||
|
549 | { | |||
|
550 | #if 0 | |||
|
551 | QFETCH(int, pos); | |||
|
552 | QFETCH(qreal, x); | |||
|
553 | ||||
|
554 | SubQXYSeries series; | |||
|
555 | ||||
|
556 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
557 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
558 | ||||
|
559 | QCOMPARE(series.x(pos), x); | |||
|
560 | ||||
|
561 | QCOMPARE(spy0.count(), 0); | |||
|
562 | QCOMPARE(spy1.count(), 0); | |||
|
563 | #endif | |||
|
564 | QSKIP("Test is not implemented.", SkipAll); | |||
|
565 | } | |||
|
566 | ||||
|
567 | void tst_QLineSeries::y_data() | |||
|
568 | { | |||
|
569 | QTest::addColumn<int>("pos"); | |||
|
570 | QTest::addColumn<qreal>("y"); | |||
|
571 | QTest::newRow("null") << 0 << 0.0; | |||
|
572 | } | |||
|
573 | ||||
|
574 | // public qreal y(int pos) const | |||
|
575 | void tst_QLineSeries::y() | |||
|
576 | { | |||
|
577 | #if 0 | |||
|
578 | QFETCH(int, pos); | |||
|
579 | QFETCH(qreal, y); | |||
|
580 | ||||
|
581 | SubQXYSeries series; | |||
|
582 | ||||
|
583 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
584 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
585 | ||||
|
586 | QCOMPARE(series.y(pos), y); | |||
|
587 | ||||
|
588 | QCOMPARE(spy0.count(), 0); | |||
|
589 | QCOMPARE(spy1.count(), 0); | |||
|
590 | #endif | |||
|
591 | QSKIP("Test is not implemented.", SkipAll); | |||
|
592 | } | |||
|
593 | ||||
|
594 | void tst_QLineSeries::clicked_data() | |||
|
595 | { | |||
|
596 | QTest::addColumn<QPointF>("point"); | |||
|
597 | QTest::newRow("null") << QPointF(); | |||
|
598 | } | |||
|
599 | ||||
|
600 | // protected void clicked(QPointF const& point) | |||
|
601 | void tst_QLineSeries::clicked() | |||
|
602 | { | |||
|
603 | #if 0 | |||
|
604 | QFETCH(QPointF, point); | |||
|
605 | ||||
|
606 | SubQXYSeries series; | |||
|
607 | ||||
|
608 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
609 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
610 | ||||
|
611 | series.call_clicked(point); | |||
|
612 | ||||
|
613 | QCOMPARE(spy0.count(), 0); | |||
|
614 | QCOMPARE(spy1.count(), 0); | |||
|
615 | #endif | |||
|
616 | QSKIP("Test is not implemented.", SkipAll); | |||
|
617 | } | |||
|
618 | ||||
|
619 | void tst_QLineSeries::selected_data() | |||
|
620 | { | |||
|
621 | QTest::addColumn<int>("foo"); | |||
|
622 | QTest::newRow("0") << 0; | |||
|
623 | QTest::newRow("-1") << -1; | |||
|
624 | } | |||
|
625 | ||||
|
626 | // protected void selected() | |||
|
627 | void tst_QLineSeries::selected() | |||
|
628 | { | |||
|
629 | #if 0 | |||
|
630 | QFETCH(int, foo); | |||
|
631 | ||||
|
632 | SubQXYSeries series; | |||
|
633 | ||||
|
634 | QSignalSpy spy0(&series, SIGNAL(clicked(QPointF const&))); | |||
|
635 | QSignalSpy spy1(&series, SIGNAL(selected())); | |||
|
636 | ||||
|
637 | series.call_selected(); | |||
|
638 | ||||
|
639 | QCOMPARE(spy0.count(), 0); | |||
|
640 | QCOMPARE(spy1.count(), 0); | |||
|
641 | #endif | |||
|
642 | QSKIP("Test is not implemented.", SkipAll); | |||
|
643 | } | |||
|
644 | ||||
|
645 | QTEST_MAIN(tst_QLineSeries) | |||
|
646 | ||||
|
647 | #include "tst_qlineseries.moc" | |||
|
648 |
General Comments 0
You need to be logged in to leave comments.
Login now