trunk/branch integration: unit test integration

This commit is contained in:
Marian Krivos
2011-08-23 09:16:33 +00:00
parent fd733bcca4
commit 53eff41df8
48 changed files with 1939 additions and 697 deletions

View File

@@ -141,9 +141,21 @@ void StreamConverterTest::testIdentityUTF8In()
std::istringstream istr4(text);
std::ostringstream ostr4;
InputStreamConverter converter4(istr4, encoding, encoding);
StreamCopier::copyStream(converter4, ostr4);
assert (ostr4.str() == text);
assert (converter4.errors() == 0);
StreamCopier::copyStream(converter4, ostr4);
assert (ostr4.str() == text);
assert (converter4.errors() == 0);
const unsigned char supp[] = {0x41, 0x42, 0xf0, 0x90, 0x82, 0xa4, 0xf0, 0xaf, 0xa6, 0xa0, 0xf0, 0xaf, 0xa8, 0x9d, 0x00};
std::string text2((const char*) supp);
std::istringstream istr5(text2);
std::ostringstream ostr5;
InputStreamConverter converter5(istr5, encoding, encoding);
StreamCopier::copyStream(converter5, ostr5);
assert (ostr5.str() == text2);
assert (converter5.errors() == 0);
}