Skip to content

Commit

Permalink
tst_QMetaType: remove defined() test
Browse files Browse the repository at this point in the history
This was testing implementation details that aren't that important any
more and are about to be removed.

Change-Id: I222a463f7fff9ff2de2cfffd77d8cec77510a57e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
  • Loading branch information
thiagomacieira committed Dec 13, 2024
1 parent 438b2f2 commit 176baa9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
22 changes: 0 additions & 22 deletions tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,28 +358,6 @@ void tst_QMetaType::registerGadget(const char *name, const QList<GadgetPropertyT
s_managedTypes[gadgetTypeId] = qMakePair(dynamicGadgetProperties, std::shared_ptr<QMetaObject>{meta, [](QMetaObject *ptr){ ::free(ptr); }});
}

void tst_QMetaType::defined()
{
QCOMPARE(int(QMetaTypeId2<QString>::Defined), 1);
QCOMPARE(int(QMetaTypeId2<Foo>::Defined), 0);
QCOMPARE(int(QMetaTypeId2<void*>::Defined), 1);
QCOMPARE(int(QMetaTypeId2<int*>::Defined), 0);
QCOMPARE(int(QMetaTypeId2<CustomQObject::CustomQEnum>::Defined), 1);
QCOMPARE(int(QMetaTypeId2<CustomGadget>::Defined), 1);
QCOMPARE(int(QMetaTypeId2<CustomGadget*>::Defined), 1);
QVERIFY(!QMetaTypeId2<GadgetDerived>::Defined);
QVERIFY(!QMetaTypeId2<GadgetDerived*>::Defined);
QVERIFY(int(QMetaTypeId2<CustomQObject*>::Defined));
QVERIFY(!QMetaTypeId2<CustomQObject>::Defined);
QVERIFY(!QMetaTypeId2<CustomNonQObject>::Defined);
QVERIFY(!QMetaTypeId2<CustomNonQObject*>::Defined);
QVERIFY(!QMetaTypeId2<CustomGadget_NonDefaultConstructible>::Defined);

// registered with Q_DECLARE_METATYPE
QVERIFY(QMetaTypeId2<GadgetDerivedAndTyped<int>>::Defined);
QVERIFY(QMetaTypeId2<GadgetDerivedAndTyped<int>*>::Defined);
}

struct Bar
{
Bar()
Expand Down
1 change: 0 additions & 1 deletion tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class tst_QMetaType: public QObject
QList<QVariant> propList;

private slots:
void defined();
#if QT_CONFIG(thread)
void threadSafety();
#endif
Expand Down

0 comments on commit 176baa9

Please sign in to comment.