From 69e14c9f3a9fe35a80a22f121969cef914ede063 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Thu, 6 Jan 2022 15:30:02 +0100 Subject: Adjustments for msbuild --- msbuild/libunicode.vcxproj | 13 ++++++++++ msbuild/libunicode.vcxproj.filters | 41 ++++++++++++++++++++++++++++++++ msbuild/test-performance.vcxproj | 5 +++- msbuild/test-performance.vcxproj.filters | 7 +++++- msbuild/test-unicode.vcxproj | 5 +++- msbuild/test-unicode.vcxproj.filters | 7 +++++- src/test-helper.cpp | 25 +++++++++++++++++++ src/test-helper.h | 6 +++++ 8 files changed, 105 insertions(+), 4 deletions(-) diff --git a/msbuild/libunicode.vcxproj b/msbuild/libunicode.vcxproj index f5387c3..e057fca 100644 --- a/msbuild/libunicode.vcxproj +++ b/msbuild/libunicode.vcxproj @@ -76,11 +76,24 @@ + + + + + + + + + + + + + diff --git a/msbuild/libunicode.vcxproj.filters b/msbuild/libunicode.vcxproj.filters index 7b2e69a..375381f 100644 --- a/msbuild/libunicode.vcxproj.filters +++ b/msbuild/libunicode.vcxproj.filters @@ -9,6 +9,12 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + {c7957421-abb0-42f5-a876-76c068c9994b} + + + {992a4518-a37a-4bae-9afa-00c294516d60} + @@ -17,10 +23,45 @@ Implementation + + API\unicode + + + API\unicode + + + API\unicode + + + API\unicode + + + API\unicode + + + API\unicode + + + API\unicode + + + API\unicode + + + API\unicode + + + API\unicode + Implementation + + + Documentation + + \ No newline at end of file diff --git a/msbuild/test-performance.vcxproj b/msbuild/test-performance.vcxproj index feff0c3..d3c8f6c 100644 --- a/msbuild/test-performance.vcxproj +++ b/msbuild/test-performance.vcxproj @@ -85,7 +85,10 @@ {c53e2afc-ea45-4798-be36-e959bb5c5a53} + + + - + \ No newline at end of file diff --git a/msbuild/test-performance.vcxproj.filters b/msbuild/test-performance.vcxproj.filters index b8488bd..1835851 100644 --- a/msbuild/test-performance.vcxproj.filters +++ b/msbuild/test-performance.vcxproj.filters @@ -14,4 +14,9 @@ Implementation - + + + Implementation + + + \ No newline at end of file diff --git a/msbuild/test-unicode.vcxproj b/msbuild/test-unicode.vcxproj index 3cd66aa..1438584 100644 --- a/msbuild/test-unicode.vcxproj +++ b/msbuild/test-unicode.vcxproj @@ -85,7 +85,10 @@ {c53e2afc-ea45-4798-be36-e959bb5c5a53} + + + - + \ No newline at end of file diff --git a/msbuild/test-unicode.vcxproj.filters b/msbuild/test-unicode.vcxproj.filters index 7d53cda..b728e20 100644 --- a/msbuild/test-unicode.vcxproj.filters +++ b/msbuild/test-unicode.vcxproj.filters @@ -14,4 +14,9 @@ Implementation - + + + Implementation + + + \ No newline at end of file diff --git a/src/test-helper.cpp b/src/test-helper.cpp index d441895..d591916 100644 --- a/src/test-helper.cpp +++ b/src/test-helper.cpp @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include #include #include @@ -50,6 +52,29 @@ namespace std { return os; } +#ifdef __cpp_char8_t + std::ostream& operator<<(std::ostream& os, utf8_t const& c) + { + os << "\\x" << std::setfill('0') << std::setw(2) << std::right << std::hex << static_cast(c); + + return os; + } +#endif + + std::ostream& operator<<(std::ostream& os, char16_t const& c) + { + os << "\\u" << std::setfill('0') << std::setw(4) << std::right << std::hex << static_cast(c); + + return os; + } + + std::ostream& operator<<(std::ostream& os, char32_t const& c) + { + os << "\\U" << std::setfill('0') << std::setw(8) << std::right << std::hex << static_cast(c); + + return os; + } + } // namespace std namespace { diff --git a/src/test-helper.h b/src/test-helper.h index c3e2900..676af73 100644 --- a/src/test-helper.h +++ b/src/test-helper.h @@ -14,6 +14,12 @@ namespace std { std::ostream& operator<<(std::ostream& os, std::basic_string const& s); std::ostream& operator<<(std::ostream& os, std::basic_string const& s); +#ifdef __cpp_char8_t + std::ostream& operator<<(std::ostream& os, utf8_t const& c); +#endif + std::ostream& operator<<(std::ostream& os, char16_t const& c); + std::ostream& operator<<(std::ostream& os, char32_t const& c); + } // namespace std template -- cgit v1.2.3