aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/tests/testabstractmetatype.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-04 13:01:46 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-11 19:01:53 +0000
commitf2443b02fce5dd4182e80ed0e5343586cbd72a31 (patch)
tree31745405aa0f8f17b5339fe145134c31da150d4a /sources/shiboken2/ApiExtractor/tests/testabstractmetatype.cpp
parent0a8e37cd60863773940d9d7f21403a841d744720 (diff)
shiboken: Improve const handling
- Use new enum in code. - Rewrite the Clang type parsing to make use of it. - Adapt some typesystem files. This enables the distinction between "int *" and "int *const" and fixes the signatures from "int const &" to the more common "const int&". Task-number: PYSIDE-672 Change-Id: Ic1bff0015188c32f53d0e6f347b1523254cb7e4f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testabstractmetatype.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testabstractmetatype.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testabstractmetatype.cpp b/sources/shiboken2/ApiExtractor/tests/testabstractmetatype.cpp
index 3f31f06e..86bf6449 100644
--- a/sources/shiboken2/ApiExtractor/tests/testabstractmetatype.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testabstractmetatype.cpp
@@ -44,6 +44,12 @@ void TestAbstractMetaType::parsing_data()
<< QString::fromLatin1("int &") << QString::fromLatin1("int&");
QTest::newRow("pointer")
<< QString::fromLatin1("int **") << QString::fromLatin1("int**");
+ QTest::newRow("const ref")
+ << QString::fromLatin1("const int &") << QString::fromLatin1("const int&");
+ QTest::newRow("const pointer")
+ << QString::fromLatin1("const int **") << QString::fromLatin1("const int**");
+ QTest::newRow("const pointer const")
+ << QString::fromLatin1("const int *const*") << QString::fromLatin1("const int*const*");
}
void TestAbstractMetaType::parsing()