aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/tests/testdroptypeentries.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testdroptypeentries.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testdroptypeentries.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testdroptypeentries.cpp b/sources/shiboken2/ApiExtractor/tests/testdroptypeentries.cpp
index 6abebb922..786c3717e 100644
--- a/sources/shiboken2/ApiExtractor/tests/testdroptypeentries.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testdroptypeentries.cpp
@@ -66,10 +66,12 @@ static const char* xmlCode = "\
void TestDropTypeEntries::testDropEntries()
{
- QStringList droppedEntries(QLatin1String("Foo.ValueB"));
- droppedEntries << QLatin1String("Foo.ObjectB") << QLatin1String("Foo.NamespaceA.InnerClassA");
- droppedEntries << QLatin1String("Foo.NamespaceB") << QLatin1String("Foo.EnumB") << QLatin1String("Foo.funcB()");
- droppedEntries << QLatin1String("Foo.NamespaceA.InnerNamespaceA");
+ const QStringList droppedEntries{QLatin1String("Foo.ValueB"),
+ QLatin1String("ObjectB"), // Check whether module can be omitted
+ QLatin1String("Foo.NamespaceA.InnerClassA"),
+ QLatin1String("Foo.NamespaceB"), QLatin1String("Foo.EnumB"),
+ QLatin1String("Foo.funcB()"),
+ QLatin1String("Foo.NamespaceA.InnerNamespaceA")};
QScopedPointer<AbstractMetaBuilder> builder(TestUtil::parse(cppCode, xmlCode, false,
QString(), droppedEntries));
QVERIFY(!builder.isNull());
@@ -85,7 +87,7 @@ void TestDropTypeEntries::testDropEntries()
AbstractMetaEnumList globalEnums = builder->globalEnums();
QCOMPARE(globalEnums.count(), 1);
- QCOMPARE(globalEnums.first()->name(), QLatin1String("EnumA"));
+ QCOMPARE(globalEnums.constFirst()->name(), QLatin1String("EnumA"));
TypeDatabase* td = TypeDatabase::instance();
QVERIFY(td->findType(QLatin1String("funcA")));