##// END OF EJS Templates
removed count signal test from tst_qbarset
sauimone -
r1467:fda4040aa838
parent child
Show More
@@ -131,7 +131,6 void tst_QBarSet::append()
131 QVERIFY(qFuzzyIsNull(m_barset->sum()));
131 QVERIFY(qFuzzyIsNull(m_barset->sum()));
132
132
133 QSignalSpy valueSpy(m_barset, SIGNAL(valuesAdded(int,int)));
133 QSignalSpy valueSpy(m_barset, SIGNAL(valuesAdded(int,int)));
134 QSignalSpy countSpy(m_barset, SIGNAL(countChanged(int)));
135
134
136 qreal sum(0.0);
135 qreal sum(0.0);
137 qreal value(0.0);
136 qreal value(0.0);
@@ -147,7 +146,6 void tst_QBarSet::append()
147 QVERIFY(qFuzzyCompare(m_barset->sum(), sum));
146 QVERIFY(qFuzzyCompare(m_barset->sum(), sum));
148
147
149 QCOMPARE(valueSpy.count(), count);
148 QCOMPARE(valueSpy.count(), count);
150 QCOMPARE(countSpy.count(), count);
151 }
149 }
152
150
153 void tst_QBarSet::appendOperator_data()
151 void tst_QBarSet::appendOperator_data()
@@ -163,7 +161,6 void tst_QBarSet::appendOperator()
163 QVERIFY(qFuzzyIsNull(m_barset->sum()));
161 QVERIFY(qFuzzyIsNull(m_barset->sum()));
164
162
165 QSignalSpy valueSpy(m_barset,SIGNAL(valuesAdded(int,int)));
163 QSignalSpy valueSpy(m_barset,SIGNAL(valuesAdded(int,int)));
166 QSignalSpy countSpy(m_barset, SIGNAL(countChanged(int)));
167
164
168 qreal sum(0.0);
165 qreal sum(0.0);
169 qreal value(0.0);
166 qreal value(0.0);
@@ -178,7 +175,6 void tst_QBarSet::appendOperator()
178 QCOMPARE(m_barset->count(), count);
175 QCOMPARE(m_barset->count(), count);
179 QVERIFY(qFuzzyCompare(m_barset->sum(), sum));
176 QVERIFY(qFuzzyCompare(m_barset->sum(), sum));
180 QCOMPARE(valueSpy.count(), count);
177 QCOMPARE(valueSpy.count(), count);
181 QCOMPARE(countSpy.count(), count);
182 }
178 }
183
179
184 void tst_QBarSet::insert_data()
180 void tst_QBarSet::insert_data()
@@ -190,7 +186,6 void tst_QBarSet::insert()
190 QCOMPARE(m_barset->count(), 0);
186 QCOMPARE(m_barset->count(), 0);
191 QVERIFY(qFuzzyIsNull(m_barset->sum()));
187 QVERIFY(qFuzzyIsNull(m_barset->sum()));
192 QSignalSpy valueSpy(m_barset,SIGNAL(valuesAdded(int,int)));
188 QSignalSpy valueSpy(m_barset,SIGNAL(valuesAdded(int,int)));
193 QSignalSpy countSpy(m_barset, SIGNAL(countChanged(int)));
194
189
195 m_barset->insert(0, 1.0); // 1.0
190 m_barset->insert(0, 1.0); // 1.0
196 QCOMPARE(m_barset->at(0).y(), 1.0);
191 QCOMPARE(m_barset->at(0).y(), 1.0);
@@ -210,7 +205,6 void tst_QBarSet::insert()
210 QCOMPARE(m_barset->count(), 3);
205 QCOMPARE(m_barset->count(), 3);
211 QVERIFY(qFuzzyCompare(m_barset->sum(), 6.0));
206 QVERIFY(qFuzzyCompare(m_barset->sum(), 6.0));
212 QCOMPARE(valueSpy.count(), 3);
207 QCOMPARE(valueSpy.count(), 3);
213 QCOMPARE(countSpy.count(), 3);
214 }
208 }
215
209
216 void tst_QBarSet::remove_data()
210 void tst_QBarSet::remove_data()
@@ -223,7 +217,6 void tst_QBarSet::remove()
223 QVERIFY(qFuzzyIsNull(m_barset->sum()));
217 QVERIFY(qFuzzyIsNull(m_barset->sum()));
224
218
225 QSignalSpy valueSpy(m_barset,SIGNAL(valuesRemoved(int,int)));
219 QSignalSpy valueSpy(m_barset,SIGNAL(valuesRemoved(int,int)));
226 QSignalSpy countSpy(m_barset, SIGNAL(countChanged(int)));
227
220
228 m_barset->append(1.0);
221 m_barset->append(1.0);
229 m_barset->append(2.0);
222 m_barset->append(2.0);
@@ -247,7 +240,6 void tst_QBarSet::remove()
247 QCOMPARE(m_barset->sum(), 6.0);
240 QCOMPARE(m_barset->sum(), 6.0);
248
241
249 QCOMPARE(valueSpy.count(), 2);
242 QCOMPARE(valueSpy.count(), 2);
250 QCOMPARE(countSpy.count(), 6);
251 }
243 }
252
244
253 void tst_QBarSet::replace_data()
245 void tst_QBarSet::replace_data()
General Comments 0
You need to be logged in to leave comments. Login now