mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
cleanup Data transcode test
This commit is contained in:
parent
6b87beb723
commit
f9677ef89a
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user