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:
@@ -44,7 +44,11 @@ void HTTPStreamFactoryTest::testNoRedirect()
|
||||
HTTPStreamFactory factory;
|
||||
URI uri("http://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() == HTTPTestServer::LARGE_BODY);
|
||||
@@ -57,7 +61,11 @@ void HTTPStreamFactoryTest::testEmptyPath()
|
||||
HTTPStreamFactory factory;
|
||||
URI uri("http://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() == HTTPTestServer::SMALL_BODY);
|
||||
@@ -71,7 +79,11 @@ void HTTPStreamFactoryTest::testRedirect()
|
||||
opener.registerStreamFactory("http", new HTTPStreamFactory);
|
||||
URI uri("http://localhost/redirect");
|
||||
uri.setPort(server.port());
|
||||
#ifndef POCO_ENABLE_CPP11
|
||||
std::auto_ptr<std::istream> pStr(opener.open(uri));
|
||||
#else
|
||||
std::unique_ptr<std::istream> pStr(opener.open(uri));
|
||||
#endif // POCO_ENABLE_CPP11
|
||||
std::ostringstream ostr;
|
||||
StreamCopier::copyStream(*pStr.get(), ostr);
|
||||
assert (ostr.str() == HTTPTestServer::LARGE_BODY);
|
||||
@@ -83,7 +95,11 @@ void HTTPStreamFactoryTest::testProxy()
|
||||
HTTPTestServer server;
|
||||
HTTPStreamFactory factory("localhost", server.port());
|
||||
URI uri("http://www.somehost.com/large");
|
||||
#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() == HTTPTestServer::LARGE_BODY);
|
||||
|
||||
Reference in New Issue
Block a user