summaryrefslogtreecommitdiffhomepage
path: root/src/test-unicode.cpp
blob: 9d41e6716342dff3fa232d874007cb4241340edf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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");
}