diff options
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp b/sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp index 7c9d20ede..cbeb216c9 100644 --- a/sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp +++ b/sources/shiboken2/ApiExtractor/tests/testarrayargument.cpp @@ -128,7 +128,7 @@ void TestArrayArgument::testArrayArgumentWithSizeDefinedByEnumValue() AbstractMetaEnum* someEnum = classA->findEnum(QLatin1String("SomeEnum")); QVERIFY(someEnum); - AbstractMetaEnumValue* nvalues = classA->findEnumValue(QLatin1String("NValues"), someEnum); + AbstractMetaEnumValue *nvalues = classA->findEnumValue(QLatin1String("NValues")); QVERIFY(nvalues); const AbstractMetaArgument* arg = classA->functions().last()->arguments().first(); @@ -159,14 +159,7 @@ void TestArrayArgument::testArrayArgumentWithSizeDefinedByEnumValueFromGlobalEnu AbstractMetaEnum* someEnum = builder->globalEnums().first(); QVERIFY(someEnum); - AbstractMetaEnumValue* nvalues = 0; - const AbstractMetaEnumValueList &values = someEnum->values(); - for (AbstractMetaEnumValue *enumValue : values) { - if (enumValue->name() == QLatin1String("NValues")) { - nvalues = enumValue; - break; - } - } + const AbstractMetaEnumValue *nvalues = someEnum->findEnumValue(QLatin1String("NValues")); QVERIFY(nvalues); const AbstractMetaArgument* arg = classA->functions().last()->arguments().first(); |