mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 18:45:10 +01:00
fix Base64Test for gcc
This commit is contained in:
parent
ba876aa4cd
commit
d1189787d6
@ -222,8 +222,8 @@ void Base64Test::testDecoderURL()
|
|||||||
assert (decoder.good() && decoder.get() == -1);
|
assert (decoder.good() && decoder.get() == -1);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::istringstream istr("AAECAw==", Poco::BASE64_URL_ENCODING);
|
std::istringstream istr("AAECAw==");
|
||||||
Base64Decoder decoder(istr);
|
Base64Decoder decoder(istr, Poco::BASE64_URL_ENCODING);
|
||||||
assert (decoder.good() && decoder.get() == 0);
|
assert (decoder.good() && decoder.get() == 0);
|
||||||
assert (decoder.good() && decoder.get() == 1);
|
assert (decoder.good() && decoder.get() == 1);
|
||||||
assert (decoder.good() && decoder.get() == 2);
|
assert (decoder.good() && decoder.get() == 2);
|
||||||
@ -231,8 +231,8 @@ void Base64Test::testDecoderURL()
|
|||||||
assert (decoder.good() && decoder.get() == -1);
|
assert (decoder.good() && decoder.get() == -1);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::istringstream istr("QUJDREVG", Poco::BASE64_URL_ENCODING);
|
std::istringstream istr("QUJDREVG");
|
||||||
Base64Decoder decoder(istr);
|
Base64Decoder decoder(istr, Poco::BASE64_URL_ENCODING);
|
||||||
std::string s;
|
std::string s;
|
||||||
decoder >> s;
|
decoder >> s;
|
||||||
assert (s == "ABCDEF");
|
assert (s == "ABCDEF");
|
||||||
@ -242,9 +242,15 @@ void Base64Test::testDecoderURL()
|
|||||||
{
|
{
|
||||||
std::istringstream istr("QUJ\r\nDRE\r\nVG");
|
std::istringstream istr("QUJ\r\nDRE\r\nVG");
|
||||||
Base64Decoder decoder(istr, Poco::BASE64_URL_ENCODING);
|
Base64Decoder decoder(istr, Poco::BASE64_URL_ENCODING);
|
||||||
std::string s;
|
try
|
||||||
decoder >> s;
|
{
|
||||||
assert (decoder.bad());
|
std::string s;
|
||||||
|
decoder >> s;
|
||||||
|
assert (decoder.bad());
|
||||||
|
}
|
||||||
|
catch (DataFormatException&)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::istringstream istr("QUJD#REVG");
|
std::istringstream istr("QUJD#REVG");
|
||||||
|
Loading…
Reference in New Issue
Block a user