summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/kernel')
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp33
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp6
2 files changed, 20 insertions, 19 deletions
diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
index 0091636172..a8f6914115 100644
--- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
@@ -1320,13 +1320,13 @@ void tst_QMetaObject::normalizedSignature_data()
QTest::newRow("function ptr spaces") << "void foo( void ( * ) ( void ))" << "void foo(void(*)())";
QTest::newRow("function ptr void*") << "void foo(void(*)(void*))" << "void foo(void(*)(void*))";
QTest::newRow("function ptr void* spaces") << "void foo( void ( * ) ( void * ))" << "void foo(void(*)(void*))";
- QTest::newRow("template args") << " void foo( QMap<a, a>, QVector<b>) "
- << "void foo(QMap<a,a>,QVector<b>)";
+ QTest::newRow("template args") << " void foo( QMap<a, a>, QList<b>) "
+ << "void foo(QMap<a,a>,QList<b>)";
QTest::newRow("void template args") << " void foo( Foo<void>, Bar<void> ) "
<< "void foo(Foo<void>,Bar<void>)";
QTest::newRow("void* template args") << " void foo( Foo<void*>, Bar<void *> ) "
<< "void foo(Foo<void*>,Bar<void*>)";
- QTest::newRow("rettype") << "QVector<int, int> foo()" << "QVector<int,int>foo()";
+ QTest::newRow("rettype") << "QList<int, int> foo()" << "QList<int,int>foo()";
QTest::newRow("rettype void template") << "Foo<void> foo()" << "Foo<void>foo()";
QTest::newRow("const rettype") << "const QString *foo()" << "const QString*foo()";
QTest::newRow("const ref") << "const QString &foo()" << "const QString&foo()";
@@ -1337,18 +1337,18 @@ void tst_QMetaObject::normalizedSignature_data()
QTest::newRow("const4") << "void foo(const int)" << "void foo(int)";
QTest::newRow("const5") << "void foo(const int, int const, const int &, int const &)"
<< "void foo(int,int,int,int)";
- QTest::newRow("const6") << "void foo(QVector<const int>)" << "void foo(QVector<const int>)";
- QTest::newRow("const7") << "void foo(QVector<const int*>)" << "void foo(QVector<const int*>)";
- QTest::newRow("const8") << "void foo(QVector<int const*>)" << "void foo(QVector<const int*>)";
+ QTest::newRow("const6") << "void foo(QList<const int>)" << "void foo(QList<const int>)";
+ QTest::newRow("const7") << "void foo(QList<const int*>)" << "void foo(QList<const int*>)";
+ QTest::newRow("const8") << "void foo(QList<int const*>)" << "void foo(QList<const int*>)";
QTest::newRow("const9") << "void foo(const Foo<Bar>)" << "void foo(Foo<Bar>)";
QTest::newRow("const10") << "void foo(Foo<Bar>const)" << "void foo(Foo<Bar>)";
QTest::newRow("const11") << "void foo(Foo<Bar> *const)" << "void foo(Foo<Bar>*)";
QTest::newRow("const12") << "void foo(Foo<Bar>const*const *const)" << "void foo(const Foo<Bar>*const*)";
QTest::newRow("const13") << "void foo(const Foo<Bar>&)" << "void foo(Foo<Bar>)";
QTest::newRow("const14") << "void foo(Foo<Bar>const&)" << "void foo(Foo<Bar>)";
- QTest::newRow("QList") << "void foo(QList<int>)" << "void foo(QVector<int>)";
- QTest::newRow("QList1") << "void foo(const Template<QList, MyQList const>)"
- << "void foo(Template<QVector,const MyQList>)";
+ QTest::newRow("QVector") << "void foo(QVector<int>)" << "void foo(QList<int>)";
+ QTest::newRow("QVector1") << "void foo(const Template<QVector, MyQList const>)"
+ << "void foo(Template<QList,const MyQList>)";
QTest::newRow("refref") << "const char* foo(const X &&,X const &&, const X* &&) && "
<< "const char*foo(const X&&,const X&&,const X*&&)&&";
@@ -1373,13 +1373,13 @@ void tst_QMetaObject::normalizedType_data()
QTest::newRow("white") << " int " << "int";
QTest::newRow("const1") << "int const *" << "const int*";
QTest::newRow("const2") << "const int *" << "const int*";
- QTest::newRow("template1") << "QVector<int const *>" << "QVector<const int*>";
- QTest::newRow("template2") << "QVector<const int *>" << "QVector<const int*>";
+ QTest::newRow("template1") << "QList<int const *>" << "QList<const int*>";
+ QTest::newRow("template2") << "QList<const int *>" << "QList<const int*>";
QTest::newRow("template3") << "QMap<QString, int>" << "QMap<QString,int>";
QTest::newRow("template4") << "const QMap<QString, int> &" << "QMap<QString,int>";
- QTest::newRow("template5") << "QVector< ::Foo::Bar>" << "QVector<::Foo::Bar>";
- QTest::newRow("template6") << "QVector<::Foo::Bar>" << "QVector<::Foo::Bar>";
- QTest::newRow("template7") << "QVector<QVector<int> >" << "QVector<QVector<int>>";
+ QTest::newRow("template5") << "QList< ::Foo::Bar>" << "QList<::Foo::Bar>";
+ QTest::newRow("template6") << "QList<::Foo::Bar>" << "QList<::Foo::Bar>";
+ QTest::newRow("template7") << "QList<QList<int> >" << "QList<QList<int>>";
QTest::newRow("template8") << "QMap<const int, const short*>" << "QMap<const int,const short*>";
QTest::newRow("template9") << "QPair<const QPair<int, int const *> , QPair<QHash<int, const char*> > >"
#ifdef _LIBCPP_VERSION
@@ -1387,7 +1387,7 @@ void tst_QMetaObject::normalizedType_data()
#else
<< "std::pair<const std::pair<int,const int*>,std::pair<QHash<int,const char*>>>";
#endif
- QTest::newRow("template10") << "QList<int const * const> const" << "QVector<const int*const>";
+ QTest::newRow("template10") << "QVector<int const * const> const" << "QList<const int*const>";
QTest::newRow("template11") << " QSharedPointer<QVarLengthArray< QString const, ( 16>> 2 )> > const & "
<< "QSharedPointer<QVarLengthArray<const QString,(16>>2)>>";
QTest::newRow("template_sub") << "X<( Y < 8), (Y >6)> const & " << "X<(Y<8),(Y>6)>";
@@ -1402,7 +1402,8 @@ void tst_QMetaObject::normalizedType_data()
QTest::newRow("struct2") << "struct foo const*" << "const foo*";
QTest::newRow("enum") << "enum foo" << "foo";
QTest::newRow("void") << "void" << "void";
- QTest::newRow("QList") << "QList<int>" << "QVector<int>";
+ QTest::newRow("QList") << "QList<int>" << "QList<int>";
+ QTest::newRow("QVector") << "QVector<int>" << "QList<int>";
QTest::newRow("refref") << "X const*const&&" << "const X*const&&";
QTest::newRow("refref2") << "const X<T const&&>&&" << "const X<const T&&>&&";
QTest::newRow("long1") << "long unsigned int long" << "unsigned long long";
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index 651efa53cf..48b46dd98f 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -583,11 +583,11 @@ void tst_QMetaType::typeName_data()
// automatic registration
QTest::newRow("QHash<int,int>") << ::qMetaTypeId<QHash<int, int> >() << QString::fromLatin1("QHash<int,int>");
QTest::newRow("QMap<int,int>") << ::qMetaTypeId<QMap<int, int> >() << QString::fromLatin1("QMap<int,int>");
- QTest::newRow("QVector<QMap<int,int>>") << ::qMetaTypeId<QVector<QMap<int, int> > >() << QString::fromLatin1("QVector<QMap<int,int>>");
+ QTest::newRow("QVector<QMap<int,int>>") << ::qMetaTypeId<QVector<QMap<int, int> > >() << QString::fromLatin1("QList<QMap<int,int>>");
// automatic registration with automatic QList to QVector aliasing
- QTest::newRow("QList<int>") << ::qMetaTypeId<QList<int> >() << QString::fromLatin1("QVector<int>");
- QTest::newRow("QVector<QList<int>>") << ::qMetaTypeId<QVector<QList<int> > >() << QString::fromLatin1("QVector<QVector<int>>");
+ QTest::newRow("QList<int>") << ::qMetaTypeId<QList<int> >() << QString::fromLatin1("QList<int>");
+ QTest::newRow("QVector<QList<int>>") << ::qMetaTypeId<QVector<QList<int> > >() << QString::fromLatin1("QList<QList<int>>");
QTest::newRow("CustomQObject*") << ::qMetaTypeId<CustomQObject*>() << QString::fromLatin1("CustomQObject*");
QTest::newRow("CustomGadget") << ::qMetaTypeId<CustomGadget>() << QString::fromLatin1("CustomGadget");