summaryrefslogtreecommitdiffhomepage
path: root/src/test-unicode.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2021-01-24 18:48:42 +0100
committerRoland Reichwein <mail@reichwein.it>2021-01-24 18:48:42 +0100
commit5f7ae62649c79683597e33af673ae1dcf5267917 (patch)
treefd84b19959ec3880a171ad512910eab522060058 /src/test-unicode.cpp
Initial commit: Non working initial code
Diffstat (limited to 'src/test-unicode.cpp')
-rw-r--r--src/test-unicode.cpp17
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");
+}
+