cleanup Data transcode test

This commit is contained in:
Alex Fabijanic 2022-05-25 22:45:16 -05:00
parent 6b87beb723
commit f9677ef89a

View File

@ -1408,16 +1408,13 @@ void DataTest::testTranscode()
Poco::Data::Test::Extractor ext; Poco::Data::Test::Extractor ext;
ext.setString(latin1Text); ext.setString(latin1Text);
std::string utf8Out; std::string latin1Out;
assertTrue (ext.extract(0, utf8Out)); assertTrue (ext.extract(0, latin1Out));
assertTrue(utf8Out == latin1Text); assertTrue(latin1Out == latin1Text);
Latin1Encoding::Ptr pe = new Latin1Encoding();
auto pUTF8E = Poco::TextEncoding::find("UTF-8");
Poco::Data::Test::Extractor ext2(new Latin1Encoding()); Poco::Data::Test::Extractor ext2(new Latin1Encoding());
ext2.setString(latin1Text); ext2.setString(latin1Text);
utf8Out.clear(); std::string utf8Out;
assertTrue(ext2.extract(0, utf8Out)); assertTrue(ext2.extract(0, utf8Out));
assertTrue(utf8Out == utf8Text); assertTrue(utf8Out == utf8Text);
} }