Skip to content
Permalink
Browse files
fix test by using non deprecated enum
  • Loading branch information
3nids committed Jun 1, 2021
1 parent bb1693b commit 084a2b8659b886b4b007ee4e7eeca46f988c38c8
Showing with 5 additions and 5 deletions.
  1. +5 −5 tests/src/core/testqgis.cpp
@@ -24,7 +24,7 @@
#include "qgis.h"
#include "qgsmaplayermodel.h"
#include "qgsattributeeditorelement.h"
#include "qgsattributeeditorrelation.h"
#include "qgsfieldproxymodel.h"

/**
* \ingroup UnitTests
@@ -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()

0 comments on commit 084a2b8

Please sign in to comment.