@@ -146,7 +146,7 @@ bool TestAnonymize::testUnitAlgStatScanValue()
146
146
return true ;
147
147
}
148
148
149
- bool TestAnonymize::testAlgStatScanValueCase (QStringList input, const int expectedTotal, QList<QPair<int ,int >> &expectedItems )
149
+ bool TestAnonymize::testAlgStatScanValueCase (QStringList input, const int expectedTotal, QList<QPair<int ,int > > &expectedItems )
150
150
{
151
151
AnonStatAlgValue anonAlgValue;
152
152
AnonAlgStatContext context;
@@ -186,8 +186,8 @@ bool TestAnonymize::testAlgStatScanValueCase(QStringList input, const int expect
186
186
return true ;
187
187
}
188
188
189
- static QList<QPair<int ,int >> itemsForArray ( const int count, const int occurrences1[], const int occurrences2[]) {
190
- QList<QPair<int ,int >> result ;
189
+ static QList<QPair<int ,int > > itemsForArray ( const int count, const int occurrences1[], const int occurrences2[]) {
190
+ QList<QPair<int ,int > > result ;
191
191
FORINT (i, count) {
192
192
QPair<int ,int > newPair (occurrences1[i], occurrences2[i]);
193
193
result.append (newPair);
@@ -198,7 +198,7 @@ static QList<QPair<int,int>> itemsForArray( const int count, const int occurrenc
198
198
bool TestAnonymize::testAlgStatScanValueNull ()
199
199
{
200
200
_subTestName = " testAlgStatScanValue/testAlgStatScanValueNull" ;
201
- QList<QPair<int ,int >> expected ;
201
+ QList<QPair<int ,int > > expected ;
202
202
if (!testAlgStatScanValueCase (QStringList (), 0 , expected)) {
203
203
return false ;
204
204
}
@@ -208,7 +208,7 @@ bool TestAnonymize::testAlgStatScanValueNull()
208
208
bool TestAnonymize::testAlgStatScanValueEmpty ()
209
209
{
210
210
_subTestName = " testAlgStatScanValue/testAlgStatScanValueEmpty" ;
211
- QList<QPair<int ,int >> expected = itemsForArray (0 , NULL , NULL );
211
+ QList<QPair<int ,int > > expected = itemsForArray (0 , NULL , NULL );
212
212
if (!testAlgStatScanValueCase (QStringList ()<<" " , 1 , expected)) {
213
213
return false ;
214
214
}
@@ -220,7 +220,7 @@ bool TestAnonymize::testAlgStatScanValueOneWord()
220
220
_subTestName = " testAlgStatScanValue/testAlgStatScanValueOneWord" ;
221
221
const int expectedKey[] = {1 };
222
222
const int expectedCount[] = {1 };
223
- QList<QPair<int ,int >> expected = itemsForArray (1 , expectedKey, expectedCount);
223
+ QList<QPair<int ,int > > expected = itemsForArray (1 , expectedKey, expectedCount);
224
224
if (!testAlgStatScanValueCase (QStringList ()<<" abc" , 1 , expected)) {
225
225
return false ;
226
226
}
@@ -232,7 +232,7 @@ bool TestAnonymize::testAlgStatScanValueDoubleWord()
232
232
_subTestName = " testAlgStatScanValue/testAlgStatScanValueDoubleWord" ;
233
233
const int expectedKey[] = {2 };
234
234
const int expectedCount[] = {1 };
235
- QList<QPair<int ,int >> expected = itemsForArray (1 , expectedKey, expectedCount);
235
+ QList<QPair<int ,int > > expected = itemsForArray (1 , expectedKey, expectedCount);
236
236
if (!testAlgStatScanValueCase (QStringList ()<<" abc def" , 1 , expected)) {
237
237
return false ;
238
238
}
@@ -244,7 +244,7 @@ bool TestAnonymize::testAlgStatScanValue3Word()
244
244
_subTestName = " testAlgStatScanValue/testAlgStatScanValue3Word" ;
245
245
const int expectedKey[] = {3 };
246
246
const int expectedCount[] = {1 };
247
- QList<QPair<int ,int >> expected = itemsForArray (1 , expectedKey, expectedCount);
247
+ QList<QPair<int ,int > > expected = itemsForArray (1 , expectedKey, expectedCount);
248
248
if (!testAlgStatScanValueCase (QStringList ()<<" abc def k" , 1 , expected)) {
249
249
return false ;
250
250
}
@@ -256,7 +256,7 @@ bool TestAnonymize::testAlgStatScanValueW1()
256
256
_subTestName = " testAlgStatScanValue/testAlgStatScanValueW1" ;
257
257
const int expectedKey[] = {3 , 1 };
258
258
const int expectedCount[] = {1 , 1 };
259
- QList<QPair<int ,int >> expected = itemsForArray (1 , expectedKey, expectedCount);
259
+ QList<QPair<int ,int > > expected = itemsForArray (1 , expectedKey, expectedCount);
260
260
if (!testAlgStatScanValueCase (QStringList ()<<" abc def k" <<" abc" , 2 , expected)) {
261
261
return false ;
262
262
}
@@ -268,7 +268,7 @@ bool TestAnonymize::testAlgStatScanValueW2()
268
268
_subTestName = " testAlgStatScanValue/testAlgStatScanValueW2" ;
269
269
const int expectedKey[] = {1 , 2 , 3 };
270
270
const int expectedCount[] = {2 , 1 , 1 };
271
- QList<QPair<int ,int >> expected = itemsForArray (3 , expectedKey, expectedCount);
271
+ QList<QPair<int ,int > > expected = itemsForArray (3 , expectedKey, expectedCount);
272
272
if (!testAlgStatScanValueCase (QStringList ()<<" abc def k" <<" abc" <<" abc" <<" abc e" , 4 , expected)) {
273
273
return false ;
274
274
}
@@ -280,7 +280,7 @@ bool TestAnonymize::testAlgStatScanValueW3()
280
280
_subTestName = " testAlgStatScanValue/testAlgStatScanValueW3" ;
281
281
const int expectedKey[] = {1 };
282
282
const int expectedCount[] = {1 };
283
- QList<QPair<int ,int >> expected = itemsForArray (1 , expectedKey, expectedCount);
283
+ QList<QPair<int ,int > > expected = itemsForArray (1 , expectedKey, expectedCount);
284
284
if (!testAlgStatScanValueCase (QStringList ()<<" abc\u00C4\00 C8\u00E0 def" , 1 , expected)) {
285
285
return false ;
286
286
}
@@ -292,7 +292,7 @@ bool TestAnonymize::testAlgStatScanValueW4()
292
292
_subTestName = " testAlgStatScanValue/testAlgStatScanValueW4" ;
293
293
const int expectedKey[] = {1 };
294
294
const int expectedCount[] = {1 };
295
- QList<QPair<int ,int >> expected = itemsForArray (1 , expectedKey, expectedCount);
295
+ QList<QPair<int ,int > > expected = itemsForArray (1 , expectedKey, expectedCount);
296
296
if (!testAlgStatScanValueCase (QStringList ()<<" abc\u00C4\u00C8\u00E0 def,4" , 1 , expected)) {
297
297
return false ;
298
298
}
@@ -304,7 +304,7 @@ bool TestAnonymize::testAlgStatScanValueW5()
304
304
_subTestName = " testAlgStatScanValue/testAlgStatScanValueW5" ;
305
305
const int expectedKey[] = {2 };
306
306
const int expectedCount[] = {1 };
307
- QList<QPair<int ,int >> expected = itemsForArray (1 , expectedKey, expectedCount);
307
+ QList<QPair<int ,int > > expected = itemsForArray (1 , expectedKey, expectedCount);
308
308
if (!testAlgStatScanValueCase (QStringList ()<<" abc\u00C4\t\u00C8\u00E0 def,4" , 1 , expected)) {
309
309
return false ;
310
310
}
@@ -316,7 +316,7 @@ bool TestAnonymize::testAlgStatScanValueW6()
316
316
_subTestName = " testAlgStatScanValue/testAlgStatScanValueW6" ;
317
317
const int expectedKey[] = {7 };
318
318
const int expectedCount[] = {1 };
319
- QList<QPair<int ,int >> expected = itemsForArray (1 , expectedKey, expectedCount);
319
+ QList<QPair<int ,int > > expected = itemsForArray (1 , expectedKey, expectedCount);
320
320
if (!testAlgStatScanValueCase (QStringList ()<<" abc\u00C4\t\u00C8 \u00E0 def,\n 45\r 6 7\t\t\n\r ///" , 1 , expected)) {
321
321
return false ;
322
322
}
@@ -609,7 +609,7 @@ bool TestAnonymize::testUnitAnonStatAlgPattern()
609
609
610
610
// --------------------------
611
611
612
- bool TestAnonymize::testAlgStatScanWordCase (QStringList input, const int expectedTotal, QList<QPair<int ,int >> &expectedItems, QStringList expectedPatterns )
612
+ bool TestAnonymize::testAlgStatScanWordCase (QStringList input, const int expectedTotal, QList<QPair<int ,int > > &expectedItems, QStringList expectedPatterns )
613
613
{
614
614
AnonStatAlgWord anonStatAlgWord;
615
615
AnonAlgStatContext context;
@@ -713,7 +713,7 @@ bool TestAnonymize::testUnitAnonStatAlgWordHitPatterns1()
713
713
_subTestName = " testUnitAnonStatAlgWordHitPatterns1" ;
714
714
const int expectedKey[] = {0 };
715
715
const int expectedCount[] = {1 };
716
- QList<QPair<int ,int >> expectedPairs = itemsForArray (1 , expectedKey, expectedCount);
716
+ QList<QPair<int ,int > > expectedPairs = itemsForArray (1 , expectedKey, expectedCount);
717
717
if (!testAlgStatScanWordCase (QStringList ()<<" abc" , 1 , expectedPairs, QStringList ()<<" aaa" )) {
718
718
return false ;
719
719
}
@@ -725,7 +725,7 @@ bool TestAnonymize::testUnitAnonStatAlgWordHitPatternsNsame()
725
725
_subTestName = " testUnitAnonStatAlgWordHitPatternsNsame" ;
726
726
const int expectedKey[] = {0 };
727
727
const int expectedCount[] = {3 };
728
- QList<QPair<int ,int >> expectedPairs = itemsForArray (1 , expectedKey, expectedCount);
728
+ QList<QPair<int ,int > > expectedPairs = itemsForArray (1 , expectedKey, expectedCount);
729
729
if (!testAlgStatScanWordCase (QStringList ()<<" abc" <<" abc" <<" abc" , 3 , expectedPairs, QStringList ()<<" aaa" )) {
730
730
return false ;
731
731
}
@@ -737,7 +737,7 @@ bool TestAnonymize::testUnitAnonStatAlgWordHitPatternsN()
737
737
_subTestName = " testUnitAnonStatAlgWordHitPatternsN" ;
738
738
const int expectedKey[] = {0 ,1 ,2 };
739
739
const int expectedCount[] = {1 ,2 ,1 };
740
- QList<QPair<int ,int >> expectedPairs = itemsForArray (3 , expectedKey, expectedCount);
740
+ QList<QPair<int ,int > > expectedPairs = itemsForArray (3 , expectedKey, expectedCount);
741
741
if (!testAlgStatScanWordCase (QStringList ()<<" abc" <<" 789" <<" 012" <<" Nf/1" , 4 , expectedPairs, QStringList ()<<" aaa" <<" 000" <<" Aa/0" )) {
742
742
return false ;
743
743
}
@@ -1080,7 +1080,7 @@ bool TestAnonymize::checkBaseStatIntervals(AnonAlgFreqCount *accumulator, const
1080
1080
return true ;
1081
1081
}
1082
1082
1083
- bool TestAnonymize::checkStatIntervals (const QStringList &inputs, const QList<QPair<double , double >> &expected )
1083
+ bool TestAnonymize::checkStatIntervals (const QStringList &inputs, const QList<QPair<double , double > > &expected )
1084
1084
{
1085
1085
AnonStatAlgValue chain;
1086
1086
AnonAlgStatContext context;
@@ -1174,23 +1174,23 @@ bool TestAnonymize::testAnonStatMean()
1174
1174
return false ;
1175
1175
}
1176
1176
{
1177
- QList<QPair<double , double >> expected ;
1177
+ QList<QPair<double , double > > expected ;
1178
1178
QPair<double , double > d1 (0 , 1 );
1179
1179
expected.append (d1);
1180
1180
if (!checkStatIntervals (QStringList ()<<" 1" , expected)) {
1181
1181
return false ;
1182
1182
}
1183
1183
}
1184
1184
{
1185
- QList<QPair<double , double >> expected ;
1185
+ QList<QPair<double , double > > expected ;
1186
1186
QPair<double , double > d1 (0 , 1 );
1187
1187
expected.append (d1);
1188
1188
if (!checkStatIntervals (QStringList ()<<" 1" <<" 1" , expected)) {
1189
1189
return false ;
1190
1190
}
1191
1191
}
1192
1192
{
1193
- QList<QPair<double , double >> expected ;
1193
+ QList<QPair<double , double > > expected ;
1194
1194
QPair<double , double > d1 (0 , 0.75 );
1195
1195
QPair<double , double > d2 (0.75 , 1 );
1196
1196
expected.append (d1);
@@ -1200,7 +1200,7 @@ bool TestAnonymize::testAnonStatMean()
1200
1200
}
1201
1201
}
1202
1202
{
1203
- QList<QPair<double , double >> expected ;
1203
+ QList<QPair<double , double > > expected ;
1204
1204
QPair<double , double > d1 (0.75 , 1 );
1205
1205
QPair<double , double > d2 (0 , 0.5 );
1206
1206
QPair<double , double > d3 (0.5 , 0.75 );
0 commit comments