summaryrefslogtreecommitdiffstats
path: root/tests/HTTP/UrlClientTest.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-08-16 11:55:49 +0200
committerMattes D <github@xoft.cz>2016-08-22 23:44:37 +0200
commit74918ce805de260371ad1be0604ee7369f5f809b (patch)
tree26218e8053606d920b16796b517dc4f030042b65 /tests/HTTP/UrlClientTest.cpp
parentcTCPLink supports TLS out of the box. (diff)
downloadcuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar.gz
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar.bz2
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar.lz
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar.xz
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.tar.zst
cuberite-74918ce805de260371ad1be0604ee7369f5f809b.zip
Diffstat (limited to 'tests/HTTP/UrlClientTest.cpp')
-rw-r--r--tests/HTTP/UrlClientTest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/HTTP/UrlClientTest.cpp b/tests/HTTP/UrlClientTest.cpp
index 97cdc6d6e..d8412fddf 100644
--- a/tests/HTTP/UrlClientTest.cpp
+++ b/tests/HTTP/UrlClientTest.cpp
@@ -106,10 +106,10 @@ static int TestRequest1()
{
LOG("Running test 1");
cEvent evtFinished;
- cCallbacks callbacks(evtFinished);
+ auto callbacks = cpp14::make_unique<cCallbacks>(evtFinished);
AStringMap options;
options["MaxRedirects"] = "0";
- auto res = cUrlClient::Get("http://github.com", callbacks, AStringMap(), AString(), options);
+ auto res = cUrlClient::Get("http://github.com", std::move(callbacks), AStringMap(), AString(), options);
if (res.first)
{
evtFinished.Wait();
@@ -130,8 +130,8 @@ static int TestRequest2()
{
LOG("Running test 2");
cEvent evtFinished;
- cCallbacks callbacks(evtFinished);
- auto res = cUrlClient::Get("http://github.com", callbacks);
+ auto callbacks = cpp14::make_unique<cCallbacks>(evtFinished);
+ auto res = cUrlClient::Get("http://github.com", std::move(callbacks));
if (res.first)
{
evtFinished.Wait();
@@ -152,10 +152,10 @@ static int TestRequest3()
{
LOG("Running test 3");
cEvent evtFinished;
- cCallbacks callbacks(evtFinished);
+ auto callbacks = cpp14::make_unique<cCallbacks>(evtFinished);
AStringMap options;
options["MaxRedirects"] = "0";
- auto res = cUrlClient::Get("https://github.com", callbacks, AStringMap(), AString(), options);
+ auto res = cUrlClient::Get("https://github.com", std::move(callbacks), AStringMap(), AString(), options);
if (res.first)
{
evtFinished.Wait();
@@ -176,8 +176,8 @@ static int TestRequest4()
{
LOG("Running test 4");
cEvent evtFinished;
- cCallbacks callbacks(evtFinished);
- auto res = cUrlClient::Get("https://github.com", callbacks);
+ auto callbacks = cpp14::make_unique<cCallbacks>(evtFinished);
+ auto res = cUrlClient::Get("https://github.com", std::move(callbacks));
if (res.first)
{
evtFinished.Wait();