You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be seen as a bug or a feature request. GTest fails to print std::basic_string_view<T> for any non-char T (e.g. wstring_view or u8string_view) which is a bit surprising since it does print anything else (wchar_t const*, char8_t const*, char16_t const*, char32_t const*, wstring, u8string, u16string, u32string).
There's also no good way to inject custom printers for this since adding them to either the std or testing::internal namespaces quickly introduces ODR-violations.
#1 - Expected equality of these values:
"a"sv
Which is: "a"
""sv
Which is: ""
#2 - Expected equality of these values:
L"w"sv
Which is: { L'w' (119, 0x77) }
L""sv
Which is: {}
#3 - Expected equality of these values:
u8"u"sv
Which is: { U+0075 }
u8""sv
Which is: {}
#4 - Expected equality of these values:
"a"s
Which is: "a"
""s
Which is: ""
#5 - Expected equality of these values:
L"w"s
Which is: L"w"
L""s
Which is: L""
#6 - Expected equality of these values:
u8"u"s
Which is: u8"u"
u8""s
Which is: u8""
What version of GoogleTest are you using?
1.13.0
What operating system and version are you using?
Doesn't matter.
What compiler and version are you using?
Doesn't matter.
What build system are you using?
Doesn't matter.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Here is the example. Compare the output for string_view's as opposed to the stirng's. I replaced the u8 strings 'cause apparently the library itself was compiled without support of u8, so the linker complains about a missing function. Instead I threw in some u and U strings.
Describe the issue
This could be seen as a bug or a feature request. GTest fails to print
std::basic_string_view<T>
for any non-charT
(e.g.wstring_view
oru8string_view
) which is a bit surprising since it does print anything else (wchar_t const*
,char8_t const*
,char16_t const*
,char32_t const*
,wstring
,u8string
,u16string
,u32string
).There's also no good way to inject custom printers for this since adding them to either the
std
ortesting::internal
namespaces quickly introduces ODR-violations.Steps to reproduce the problem
which gives:
What version of GoogleTest are you using?
1.13.0
What operating system and version are you using?
Doesn't matter.
What compiler and version are you using?
Doesn't matter.
What build system are you using?
Doesn't matter.
Additional context
No response
The text was updated successfully, but these errors were encountered: