From 909c3fab5cc58141b765f67c6e7430986b8531a5 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 9 Dec 2024 17:08:35 +0100 Subject: [PATCH] tst_QByteArrayView: check conversion from various QSpans This is supposed to work, so check it. Conflict resolutions for 6.8: - added missing qspan.h include Change-Id: I201033656f123b09644e5de447cd5d7b038e5155 Reviewed-by: Ivan Solovev (cherry picked from commit 8a3ffe7044249bcfb5185bd87a9713685d48de7b) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 9bcbeea2adeda6b23b030a18af04fce9bf7e5998) Reviewed-by: Ahmad Samir --- .../qbytearrayview/tst_qbytearrayview.cpp | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp b/tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp index 5802f2a583a..3d11598d004 100644 --- a/tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp +++ b/tests/auto/corelib/text/qbytearrayview/tst_qbytearrayview.cpp @@ -5,6 +5,8 @@ #include +#include + // for negative testing (can't convert from) #include #include @@ -76,6 +78,26 @@ static_assert(CanConvert >); static_assert(CanConvert< std::array&>); static_assert(CanConvert&>); +static_assert(CanConvert< QSpan >); +static_assert(CanConvert >); +static_assert(CanConvert< QSpan&>); +static_assert(CanConvert&>); + +static_assert(CanConvert< QSpan >); +static_assert(CanConvert >); +static_assert(CanConvert< QSpan&>); +static_assert(CanConvert&>); + +static_assert(CanConvert< QSpan >); +static_assert(CanConvert >); +static_assert(CanConvert< QSpan&>); +static_assert(CanConvert&>); + +static_assert(CanConvert< QSpan >); +static_assert(CanConvert >); +static_assert(CanConvert< QSpan&>); +static_assert(CanConvert&>); + static_assert(!CanConvert>); static_assert(!CanConvert>);