summaryrefslogtreecommitdiffhomepage
path: root/src
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
Initial commit: Non working initial code
Diffstat (limited to 'src')
-rw-r--r--src/recode.cpp4
-rw-r--r--src/test-unicode.cpp17
2 files changed, 21 insertions, 0 deletions
diff --git a/src/recode.cpp b/src/recode.cpp
new file mode 100644
index 0000000..8927fe4
--- /dev/null
+++ b/src/recode.cpp
@@ -0,0 +1,4 @@
+int main(int argc, char* argv[])
+{
+ return 0;
+}
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");
+}
+