File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ class TestQgsMapLayer : public QObject
73
73
void layerRef ();
74
74
void layerRefListUtils ();
75
75
76
+ void styleCategories ();
77
+
76
78
77
79
private:
78
80
QgsVectorLayer *mpLayer = nullptr ;
@@ -283,8 +285,19 @@ void TestQgsMapLayer::layerRefListUtils()
283
285
QCOMPARE ( refs.size (), 2 );
284
286
QCOMPARE ( refs.at ( 0 ).get (), vlA );
285
287
QCOMPARE ( refs.at ( 1 ).get (), vlC );
288
+ }
286
289
287
-
290
+ void TestQgsMapLayer::styleCategories ()
291
+ {
292
+ // control that AllStyleCategories is actually complete
293
+ QgsMapLayer::StyleCategories allStyleCategories = QgsMapLayer::AllCategories;
294
+ for ( QgsMapLayer::StyleCategory category : qgsEnumMap<QgsMapLayer::StyleCategory>().keys () )
295
+ {
296
+ if ( category == QgsMapLayer::AllCategories )
297
+ continue ;
298
+
299
+ QVERIFY ( allStyleCategories.testFlag ( category ) );
300
+ }
288
301
}
289
302
290
303
QGSTEST_MAIN ( TestQgsMapLayer )
You can’t perform that action at this time.
0 commit comments