summaryrefslogtreecommitdiffhomepage
path: root/src/test-unicode.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2021-02-13 12:47:39 +0100
committerRoland Reichwein <mail@reichwein.it>2021-02-13 12:47:39 +0100
commit07c77b45ba9f74cfe1bed547bea1eeb705f0582b (patch)
treedde45e92f704229c3ecc129aa2842686f052db6f /src/test-unicode.cpp
parent24ec1d5ba85503599fd301aa8cd56ee65651ab0b (diff)
Support G++, support string type as template argument for convert()
Diffstat (limited to 'src/test-unicode.cpp')
-rw-r--r--src/test-unicode.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test-unicode.cpp b/src/test-unicode.cpp
index 99a8f99..5f5ebbf 100644
--- a/src/test-unicode.cpp
+++ b/src/test-unicode.cpp
@@ -351,6 +351,10 @@ BOOST_AUTO_TEST_CASE(convert)
BOOST_CHECK((unicode::convert<char, wchar_t>(u8"\U0001F63A")) == std::wstring{L"\U0001F63A"});
BOOST_CHECK((unicode::convert<wchar_t, char32_t>(L"\U0001F63A")) == std::u32string{U"\U0001F63A"});
BOOST_CHECK((unicode::convert<wchar_t, char>(L"\U0001F63A")) == std::string{u8"\U0001F63A"});
+
+ BOOST_CHECK((unicode::convert<std::string, std::wstring>(std::string{"äöü"})) == std::wstring{L"äöü"});
+
+ //BOOST_CHECK((unicode::convert<std::vector<char>, std::vector<wchar_t>>(std::vector<char>{})) == std::vector<wchar_t>{});
}
BOOST_AUTO_TEST_CASE(is_valid_utf)
@@ -375,6 +379,5 @@ BOOST_AUTO_TEST_CASE(string_u8string)
// TODO:
//
-// char8_t, char16_t, char32_t, char, wchar_t (UTF-16 on Windows, UTF-32 on Linux)
// string, vector?
// uint8_t, uint16_t, uint32_t?