Navigation Menu

Skip to content

Commit

Permalink
fix test by using non deprecated enum
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 1, 2021
1 parent bb1693b commit 084a2b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/src/core/testqgis.cpp
Expand Up @@ -24,7 +24,7 @@
#include "qgis.h"
#include "qgsmaplayermodel.h"
#include "qgsattributeeditorelement.h"
#include "qgsattributeeditorrelation.h"
#include "qgsfieldproxymodel.h"

/**
* \ingroup UnitTests
Expand Down Expand Up @@ -451,13 +451,13 @@ void TestQgis::testQgsEnumKeyToValue()

void TestQgis::testQgsFlagValueToKeys()
{
QgsAttributeEditorRelation::Buttons buttons = QgsAttributeEditorRelation::Button::Link | QgsAttributeEditorRelation::Button::AddChildFeature;
QCOMPARE( qgsFlagValueToKeys( buttons ), QStringLiteral( "Link|AddChildFeature" ) );
QgsFieldProxyModel::Filters filters = QgsFieldProxyModel::Filter::String | QgsFieldProxyModel::Filter::Double;
QCOMPARE( qgsFlagValueToKeys( filters ), QStringLiteral( "String|Double" ) );
}
void TestQgis::testQgsFlagKeysToValue()
{
QCOMPARE( qgsFlagKeysToValue( QStringLiteral( "Link|AddChildFeature" ), QgsAttributeEditorRelation::Buttons( QgsAttributeEditorRelation::Button::AllButtons ) ), QgsAttributeEditorRelation::Button::Link | QgsAttributeEditorRelation::Button::AddChildFeature );
QCOMPARE( qgsFlagKeysToValue( QStringLiteral( "UnknownKey" ), QgsAttributeEditorRelation::Buttons( QgsAttributeEditorRelation::Button::AllButtons ) ), QgsAttributeEditorRelation::Buttons( QgsAttributeEditorRelation::Button::AllButtons ) );
QCOMPARE( qgsFlagKeysToValue( QStringLiteral( "String|Double" ), QgsFieldProxyModel::Filters( QgsFieldProxyModel::Filter::AllTypes ) ), QgsFieldProxyModel::Filter::String | QgsFieldProxyModel::Filter::Double );
QCOMPARE( qgsFlagKeysToValue( QStringLiteral( "UnknownKey" ), QgsFieldProxyModel::Filters( QgsFieldProxyModel::Filter::AllTypes ) ), QgsFieldProxyModel::Filters( QgsFieldProxyModel::Filter::AllTypes ) );
}

void TestQgis::testQMapQVariantList()
Expand Down

0 comments on commit 084a2b8

Please sign in to comment.