aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libminimal
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-02-27 10:54:01 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-03-20 09:37:04 +0100
commit667cb4a4ee3fac1cd818b9689886470c1dffdac9 (patch)
treeb7a152d307d74c356f9fe327259c146a3cd6a782 /sources/shiboken6/tests/libminimal
parent58a7066609938c04f5d5214a326d6220e8c062e0 (diff)
shiboken6: Test opaque container for span
Task-number: PYSIDE-2174 Change-Id: I812bef400ef2a006eb6aaca749d8961dc3aa7330 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/tests/libminimal')
-rw-r--r--sources/shiboken6/tests/libminimal/spanuser.cpp6
-rw-r--r--sources/shiboken6/tests/libminimal/spanuser.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libminimal/spanuser.cpp b/sources/shiboken6/tests/libminimal/spanuser.cpp
index e2e1ca1f5..fea9cd68e 100644
--- a/sources/shiboken6/tests/libminimal/spanuser.cpp
+++ b/sources/shiboken6/tests/libminimal/spanuser.cpp
@@ -35,6 +35,12 @@ ConstIntSpan3 SpanUser::getConstIntSpan3()
return ConstIntSpan3(civ);
}
+IntSpan3 SpanUser::getIntSpan3_OpaqueContainer()
+{
+ static int iv[] = {1, 2, 3};
+ return IntSpan3(iv);
+}
+
int SpanUser::sumIntSpan3(IntSpan3 isp3)
{
return std::accumulate(isp3.begin(), isp3.end(), 0);
diff --git a/sources/shiboken6/tests/libminimal/spanuser.h b/sources/shiboken6/tests/libminimal/spanuser.h
index 810aa9f84..c78ba35e7 100644
--- a/sources/shiboken6/tests/libminimal/spanuser.h
+++ b/sources/shiboken6/tests/libminimal/spanuser.h
@@ -24,6 +24,7 @@ struct LIBMINIMAL_API SpanUser
static IntSpan3 getIntSpan3();
static IntSpan getIntSpan();
static ConstIntSpan3 getConstIntSpan3();
+ static IntSpan3 getIntSpan3_OpaqueContainer();
static int sumIntSpan3(IntSpan3 isp3);
static int sumIntSpan(IntSpan isp);