mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 09:12:28 +02:00
ifdef auto_ptr
This commit is contained in:
@@ -47,7 +47,11 @@ void HTTPSStreamFactoryTest::testNoRedirect()
|
||||
HTTPSStreamFactory factory;
|
||||
URI uri("https://localhost/large");
|
||||
uri.setPort(server.port());
|
||||
#ifndef POCO_ENABLE_CPP11
|
||||
std::auto_ptr<std::istream> pStr(factory.open(uri));
|
||||
#else
|
||||
std::unique_ptr<std::istream> pStr(factory.open(uri));
|
||||
#endif // POCO_ENABLE_CPP11
|
||||
std::ostringstream ostr;
|
||||
StreamCopier::copyStream(*pStr.get(), ostr);
|
||||
assert (ostr.str() == HTTPSTestServer::LARGE_BODY);
|
||||
@@ -60,7 +64,11 @@ void HTTPSStreamFactoryTest::testEmptyPath()
|
||||
HTTPSStreamFactory factory;
|
||||
URI uri("https://localhost");
|
||||
uri.setPort(server.port());
|
||||
#ifndef POCO_ENABLE_CPP11
|
||||
std::auto_ptr<std::istream> pStr(factory.open(uri));
|
||||
#else
|
||||
std::unique_ptr<std::istream> pStr(factory.open(uri));
|
||||
#endif // POCO_ENABLE_CPP11
|
||||
std::ostringstream ostr;
|
||||
StreamCopier::copyStream(*pStr.get(), ostr);
|
||||
assert (ostr.str() == HTTPSTestServer::SMALL_BODY);
|
||||
@@ -73,7 +81,11 @@ void HTTPSStreamFactoryTest::testRedirect()
|
||||
HTTPSStreamFactory factory;
|
||||
URI uri("https://localhost/redirect");
|
||||
uri.setPort(server.port());
|
||||
#ifndef POCO_ENABLE_CPP11
|
||||
std::auto_ptr<std::istream> pStr(factory.open(uri));
|
||||
#else
|
||||
std::unique_ptr<std::istream> pStr(factory.open(uri));
|
||||
#endif // POCO_ENABLE_CPP11
|
||||
std::ostringstream ostr;
|
||||
StreamCopier::copyStream(*pStr.get(), ostr);
|
||||
assert (ostr.str() == HTTPSTestServer::LARGE_BODY);
|
||||
@@ -88,7 +100,11 @@ void HTTPSStreamFactoryTest::testProxy()
|
||||
Application::instance().config().getInt("testsuite.proxy.port")
|
||||
);
|
||||
URI uri("https://secure.appinf.com/public/poco/NetSSL.txt");
|
||||
#ifndef POCO_ENABLE_CPP11
|
||||
std::auto_ptr<std::istream> pStr(factory.open(uri));
|
||||
#else
|
||||
std::unique_ptr<std::istream> pStr(factory.open(uri));
|
||||
#endif // POCO_ENABLE_CPP11
|
||||
std::ostringstream ostr;
|
||||
StreamCopier::copyStream(*pStr.get(), ostr);
|
||||
assert (ostr.str().length() > 0);
|
||||
|
||||
Reference in New Issue
Block a user