@@ -101,6 +101,9 @@ class TestQgsVectorLayer : public QObject
101
101
void QgsVectorLayersetRendererV2 ();
102
102
void QgsVectorLayersetFeatureBlendMode ();
103
103
void QgsVectorLayersetLayerTransparency ();
104
+ void uniqueValues ();
105
+ void minimumValue ();
106
+ void maximumValue ();
104
107
};
105
108
106
109
void TestQgsVectorLayer::initTestCase ()
@@ -312,5 +315,31 @@ void TestQgsVectorLayer::QgsVectorLayersetLayerTransparency()
312
315
QCOMPARE ( vLayer->layerTransparency (), 50 );
313
316
}
314
317
318
+ void TestQgsVectorLayer::uniqueValues ()
319
+ {
320
+ QgsVectorLayer* vLayer = static_cast < QgsVectorLayer * >( mpPointsLayer );
321
+
322
+ // test with invalid field
323
+ QList<QVariant> values;
324
+ vLayer->uniqueValues ( 1000 , values );
325
+ QCOMPARE ( values.length (), 0 );
326
+ }
327
+
328
+ void TestQgsVectorLayer::minimumValue ()
329
+ {
330
+ QgsVectorLayer* vLayer = static_cast < QgsVectorLayer * >( mpPointsLayer );
331
+
332
+ // test with invalid field
333
+ QCOMPARE ( vLayer->minimumValue ( 1000 ), QVariant () );
334
+ }
335
+
336
+ void TestQgsVectorLayer::maximumValue ()
337
+ {
338
+ QgsVectorLayer* vLayer = static_cast < QgsVectorLayer * >( mpPointsLayer );
339
+
340
+ // test with invalid field
341
+ QCOMPARE ( vLayer->maximumValue ( 1000 ), QVariant () );
342
+ }
343
+
315
344
QTEST_MAIN ( TestQgsVectorLayer )
316
345
#include " testqgsvectorlayer.moc"
0 commit comments