Skip to content

Commit

Permalink
tst_QStringView: add missing CanConvert from char16_t/wchar_t arrays
Browse files Browse the repository at this point in the history
QChar[N] and ushort[N] are being checked, it's unclear why char16_t[N]
and wchar_t[N] were missing.

Add them.

Pick-to: 6.9 6.8 6.5 5.15
Change-Id: I9a2df2a75886b950e8c2bdec843e3e693e536f86
Reviewed-by: Ivan Solovev <[email protected]>
  • Loading branch information
marcmutz committed Dec 11, 2024
1 parent 01f0305 commit 8940185
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/auto/corelib/text/qstringview/tst_qstringview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ static_assert(!CanConvert<std::list<ushort>>::value);

static_assert(!CanConvert<char16_t>::value);

static_assert(CanConvert<char16_t[123]>::value);

static_assert(CanConvert< char16_t*>::value);
static_assert(CanConvert<const char16_t*>::value);

Expand Down Expand Up @@ -111,6 +113,8 @@ constexpr bool CanConvertFromWCharT =

static_assert(!CanConvert<wchar_t>::value);

static_assert(CanConvert<wchar_t[123]>::value == CanConvertFromWCharT);

static_assert(CanConvert< wchar_t*>::value == CanConvertFromWCharT);
static_assert(CanConvert<const wchar_t*>::value == CanConvertFromWCharT);

Expand Down

0 comments on commit 8940185

Please sign in to comment.