@@ -124,7 +124,7 @@ class TestQgsSpatialIndexKdBush : public QObject
124
124
// create copy of the index
125
125
std::unique_ptr< QgsSpatialIndexKDBush > indexCopy ( new QgsSpatialIndexKDBush ( *index ) );
126
126
127
- QCOMPARE ( index ->d , indexCopy->d );
127
+ QVERIFY ( index ->d == indexCopy->d );
128
128
QVERIFY ( index ->d ->ref == 2 );
129
129
130
130
// test that copied index works
@@ -133,7 +133,7 @@ class TestQgsSpatialIndexKdBush : public QObject
133
133
QVERIFY ( fids.contains ( 1 ) );
134
134
135
135
// check that the index is still shared
136
- QCOMPARE ( index ->d , indexCopy->d );
136
+ QVERIFY ( index ->d == indexCopy->d );
137
137
QVERIFY ( index ->d ->ref == 2 );
138
138
139
139
index .reset ();
@@ -147,13 +147,13 @@ class TestQgsSpatialIndexKdBush : public QObject
147
147
// assignment operator
148
148
std::unique_ptr< QgsVectorLayer > vl2 = qgis::make_unique< QgsVectorLayer >( " Point" , QString (), QStringLiteral ( " memory" ) );
149
149
QgsSpatialIndexKDBush index3 ( *vl2->dataProvider () );
150
- QCOMPARE ( index3.size (), 0 );
150
+ QVERIFY ( index3.size () == 0 );
151
151
fids = index3.intersect ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
152
- QCOMPARE ( fids.count (), 0 );
152
+ QVERIFY ( fids.count () == 0 );
153
153
QVERIFY ( index3.d ->ref == 1 );
154
154
155
155
index3 = *indexCopy;
156
- QCOMPARE ( index3.d , indexCopy->d );
156
+ QVERIFY ( index3.d == indexCopy->d );
157
157
QVERIFY ( index3.d ->ref == 2 );
158
158
fids = index3.intersect ( QgsRectangle ( 0 , 0 , 10 , 10 ) );
159
159
QVERIFY ( fids.count () == 1 );
0 commit comments