aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-13 10:37:09 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-14 18:55:16 +0000
commita6dd968379935452462b5785e937c37b3561425f (patch)
treea5948a790b2a0f765a1b0e10231b0484b7502fd4 /sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp
parentd06005c8b0acbb52c0ee74f2ccb8bc64fd482d18 (diff)
shiboken6: Use std::optional for returning AbstractMetaType
Remove its invalid state. Remove a few checks that apparently originated from the old code where AbstractMetaType * = 0 meant void. Change-Id: Ifc938c011f07f4b5316f708f6cce1e98bcaa8125 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp b/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp
index 0fab1bf07..e65b0f214 100644
--- a/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp
+++ b/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp
@@ -77,7 +77,7 @@ void TestAbstractMetaType::testConstCharPtrType()
AbstractMetaFunction *func = builder->globalFunctions().constFirst();
AbstractMetaType rtype = func->type();
// Test properties of const char*
- QVERIFY(rtype);
+ QVERIFY(!rtype.isVoid());
QCOMPARE(rtype.package(), QLatin1String("Foo"));
QCOMPARE(rtype.name(), QLatin1String("char"));
QVERIFY(rtype.isConstant());
@@ -150,7 +150,7 @@ void TestAbstractMetaType::testCharType()
AbstractMetaFunction *func = functions.constFirst();
AbstractMetaType rtype = func->type();
// Test properties of const char*
- QVERIFY(rtype);
+ QVERIFY(!rtype.isVoid());
QCOMPARE(rtype.package(), QLatin1String("Foo"));
QCOMPARE(rtype.name(), QLatin1String("char"));
QVERIFY(!rtype.isConstant());