31#define UTF8_INIT "This is a test of UTF-8: ü‱☺😕😱"
51 UTF8 utf8_copied_from_stdstr = str;
53 BOOST_CHECK_EQUAL( utf8_inited, utf8_copied_from_stdstr );
55 UTF8 utf8_copied_from_utf8 = utf8_inited;
57 BOOST_CHECK_EQUAL( utf8_inited, utf8_copied_from_utf8 );
67 wxString wx_inited = wxString::FromUTF8(
UTF8_INIT );
70 wxString wx_copied_from_utf8 = utf8_inited;
71 BOOST_CHECK_EQUAL( wx_inited, wx_copied_from_utf8 );
74 UTF8 utf8_copied_from_wxstring = wx_inited;
75 BOOST_CHECK_EQUAL( utf8_inited, utf8_copied_from_wxstring );
87 BOOST_CHECK( it == null );
91 BOOST_CHECK( uNull.ubegin() == uNull.uend() );
99 UTF8 u0 {
"inp\ua740t" };
107 BOOST_CHECK( it == begin );
108 BOOST_CHECK( it >= begin );
111 BOOST_CHECK_EQUAL( *it,
'i' );
115 BOOST_CHECK( it != begin );
116 BOOST_CHECK( it > begin );
117 BOOST_CHECK( !( begin >= it ) );
118 BOOST_CHECK( it < end );
119 BOOST_CHECK( it <= end );
120 BOOST_CHECK_EQUAL( *it,
'n' );
124 BOOST_CHECK_EQUAL( *it,
'p' );
128 BOOST_CHECK_EQUAL( *it, 0xA740 );
132 BOOST_CHECK_EQUAL( *it,
't' );
136 BOOST_CHECK( it == end );
137 BOOST_CHECK( it <= end );
138 BOOST_CHECK( !( it < end ) );
uni_iter is a non-mutating iterator that walks through unicode code points in the UTF8 encoded string...
An 8 bit string that is assuredly encoded in UTF8, and supplies special conversion support to and fro...
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(Utf8AndStdString)
Declares a struct as the Boost test fixture.