aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-05-08 09:47:23 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-05-11 11:46:34 +0200
commit17ef62122f31264942b3799fd502bcbac39fcc1b (patch)
tree54a1bc99b6be664cfe7da912358040495e69fb21 /sources/shiboken6/ApiExtractor/tests
parent3965de109132cafcb4f5c23fdc1c24a7baec9574 (diff)
shiboken6: Correctly register smartpointer signatures
Drop the space before the closing bracket (no longer required in C++) which is causing signatures mismatches when using it signals. Pick-to: 6.5 Task-number: PYSIDE-2316 Change-Id: Ia460a0868454cc7a2a41e82ef921e50a40fcc45d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/tests')
-rw-r--r--sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp2
-rw-r--r--sources/shiboken6/ApiExtractor/tests/testtemplates.cpp16
2 files changed, 9 insertions, 9 deletions
diff --git a/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp b/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp
index 644ae8aa1..4a2821db8 100644
--- a/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp
+++ b/sources/shiboken6/ApiExtractor/tests/testabstractmetatype.cpp
@@ -193,7 +193,7 @@ void TestAbstractMetaType::testTypedefWithTemplates()
QCOMPARE(args.size(), 1);
const AbstractMetaArgument &arg = args.constFirst();
AbstractMetaType metaType = arg.type();
- QCOMPARE(metaType.cppSignature(), u"A<B >");
+ QCOMPARE(metaType.cppSignature(), u"A<B>");
}
diff --git a/sources/shiboken6/ApiExtractor/tests/testtemplates.cpp b/sources/shiboken6/ApiExtractor/tests/testtemplates.cpp
index 1c653df51..eba2ecea9 100644
--- a/sources/shiboken6/ApiExtractor/tests/testtemplates.cpp
+++ b/sources/shiboken6/ApiExtractor/tests/testtemplates.cpp
@@ -64,7 +64,7 @@ namespace Internet {
QVERIFY(func);
AbstractMetaType funcType = func->type();
QVERIFY(!funcType.isVoid());
- QCOMPARE(funcType.cppSignature(), u"QList<Internet::Url >");
+ QCOMPARE(funcType.cppSignature(), u"QList<Internet::Url>");
}
void TestTemplates::testTemplateOnContainers()
@@ -137,7 +137,7 @@ void func(List<int> arg) {}
const auto func = globalFuncs.constFirst();
QCOMPARE(func->minimalSignature(), u"func(List<int>)");
QCOMPARE(func->arguments().constFirst().type().cppSignature(),
- u"List<int >");
+ u"List<int>");
}
void TestTemplates::testTemplatePointerAsArgument()
@@ -162,7 +162,7 @@ void func(List<int>* arg) {}
const auto func = globalFuncs.constFirst();
QCOMPARE(func->minimalSignature(), u"func(List<int>*)");
QCOMPARE(func->arguments().constFirst().type().cppSignature(),
- u"List<int > *");
+ u"List<int> *");
}
void TestTemplates::testTemplateReferenceAsArgument()
@@ -187,7 +187,7 @@ void func(List<int>& arg) {}
const auto func = globalFuncs.constFirst();
QCOMPARE(func->minimalSignature(), u"func(List<int>&)");
QCOMPARE(func->arguments().constFirst().type().cppSignature(),
- u"List<int > &");
+ u"List<int> &");
}
void TestTemplates::testTemplateParameterFixup()
@@ -214,11 +214,11 @@ struct List {
QCOMPARE(templates.size(), 1);
AbstractMetaClassCPtr list = templates.constFirst();
- // Verify that the parameter of "void append(List l)" gets fixed to "List<T >"
+ // Verify that the parameter of "void append(List l)" gets fixed to "List<T>"
const auto append = list->findFunction(QStringLiteral("append"));
QVERIFY(append);
QCOMPARE(append->arguments().size(), 1);
- QCOMPARE(append->arguments().at(0).type().cppSignature(), u"List<T >");
+ QCOMPARE(append->arguments().at(0).type().cppSignature(), u"List<T>");
// Verify that the parameter of "void erase(Iterator)" is not modified
const auto erase = list->findFunction(QStringLiteral("erase"));
QVERIFY(erase);
@@ -424,13 +424,13 @@ typedef Vector<int> IntVector;
const auto method = vector->findFunction(u"method");
QVERIFY(method);
- QCOMPARE(method->signature(), u"method(const Vector<int > & vector)");
+ QCOMPARE(method->signature(), u"method(const Vector<int> & vector)");
const auto otherMethod = vector->findFunction(u"otherMethod");
QVERIFY(otherMethod);
QCOMPARE(otherMethod->signature(), u"otherMethod()");
QVERIFY(!otherMethod->type().isVoid());
- QCOMPARE(otherMethod->type().cppSignature(), u"Vector<int >");
+ QCOMPARE(otherMethod->type().cppSignature(), u"Vector<int>");
}
void TestTemplates::testNonTypeTemplates()