diff options
author | Roland Reichwein <mail@reichwein.it> | 2021-01-24 18:48:42 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2021-01-24 18:48:42 +0100 |
commit | 5f7ae62649c79683597e33af673ae1dcf5267917 (patch) | |
tree | fd84b19959ec3880a171ad512910eab522060058 /src/test-unicode.cpp |
Initial commit: Non working initial code
Diffstat (limited to 'src/test-unicode.cpp')
-rw-r--r-- | src/test-unicode.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test-unicode.cpp b/src/test-unicode.cpp new file mode 100644 index 0000000..9d41e67 --- /dev/null +++ b/src/test-unicode.cpp @@ -0,0 +1,17 @@ +#define BOOST_TEST_MODULE unicode_test + +#include <boost/test/included/unit_test.hpp> + +#include <string> + +#include <unicode.h> + +BOOST_AUTO_TEST_CASE(utf8_to_utf16) +{ + std::u8string u8{"ascii string1"}; + + std::u16string u16{unicode::utf8_to_utf16(u8)}; + + BOOST_CHECK_EQ(u16, u"ascii string1"); +} + |