Poco 1.9.1 assert true (#2255)

* Rename assert by assertTrue

* Update submodules

* Missing assertTrue

* Rename poco_assertTrue to poco_assert

* Rename poco_assertTrue to poco_assert
This commit is contained in:
zosrothko
2018-03-29 19:12:54 +02:00
committed by Aleksandar Fabijanic
parent 5a1bf5eb4a
commit 960ecb38f0
232 changed files with 16274 additions and 16265 deletions

View File

@@ -140,9 +140,9 @@ void HTTPSServerTest::testIdentityRequest()
HTTPResponse response;
std::string rbody;
cs.receiveResponse(response) >> rbody;
assert (response.getContentLength() == body.size());
assert (response.getContentType() == "text/plain");
assert (rbody == body);
assertTrue (response.getContentLength() == body.size());
assertTrue (response.getContentType() == "text/plain");
assertTrue (rbody == body);
}
@@ -163,10 +163,10 @@ void HTTPSServerTest::testChunkedRequest()
HTTPResponse response;
std::string rbody;
cs.receiveResponse(response) >> rbody;
assert (response.getContentLength() == HTTPMessage::UNKNOWN_CONTENT_LENGTH);
assert (response.getContentType() == "text/plain");
assert (response.getChunkedTransferEncoding());
assert (rbody == body);
assertTrue (response.getContentLength() == HTTPMessage::UNKNOWN_CONTENT_LENGTH);
assertTrue (response.getContentType() == "text/plain");
assertTrue (response.getChunkedTransferEncoding());
assertTrue (rbody == body);
}
@@ -188,20 +188,20 @@ void HTTPSServerTest::testIdentityRequestKeepAlive()
HTTPResponse response;
std::string rbody;
cs.receiveResponse(response) >> rbody;
assert (response.getContentLength() == body.size());
assert (response.getContentType() == "text/plain");
assert (response.getKeepAlive());
assert (rbody == body);
assertTrue (response.getContentLength() == body.size());
assertTrue (response.getContentType() == "text/plain");
assertTrue (response.getKeepAlive());
assertTrue (rbody == body);
body.assign(1000, 'y');
request.setContentLength((int) body.length());
request.setKeepAlive(false);
cs.sendRequest(request) << body;
cs.receiveResponse(response) >> rbody;
assert (response.getContentLength() == body.size());
assert (response.getContentType() == "text/plain");
assert (!response.getKeepAlive());
assert (rbody == body);}
assertTrue (response.getContentLength() == body.size());
assertTrue (response.getContentType() == "text/plain");
assertTrue (!response.getKeepAlive());
assertTrue (rbody == body);}
void HTTPSServerTest::testChunkedRequestKeepAlive()
@@ -222,20 +222,20 @@ void HTTPSServerTest::testChunkedRequestKeepAlive()
HTTPResponse response;
std::string rbody;
cs.receiveResponse(response) >> rbody;
assert (response.getContentLength() == HTTPMessage::UNKNOWN_CONTENT_LENGTH);
assert (response.getContentType() == "text/plain");
assert (response.getChunkedTransferEncoding());
assert (rbody == body);
assertTrue (response.getContentLength() == HTTPMessage::UNKNOWN_CONTENT_LENGTH);
assertTrue (response.getContentType() == "text/plain");
assertTrue (response.getChunkedTransferEncoding());
assertTrue (rbody == body);
body.assign(1000, 'y');
request.setKeepAlive(false);
cs.sendRequest(request) << body;
cs.receiveResponse(response) >> rbody;
assert (response.getContentLength() == HTTPMessage::UNKNOWN_CONTENT_LENGTH);
assert (response.getContentType() == "text/plain");
assert (response.getChunkedTransferEncoding());
assert (!response.getKeepAlive());
assert (rbody == body);
assertTrue (response.getContentLength() == HTTPMessage::UNKNOWN_CONTENT_LENGTH);
assertTrue (response.getContentType() == "text/plain");
assertTrue (response.getChunkedTransferEncoding());
assertTrue (!response.getKeepAlive());
assertTrue (rbody == body);
}
@@ -257,9 +257,9 @@ void HTTPSServerTest::test100Continue()
HTTPResponse response;
std::string rbody;
cs.receiveResponse(response) >> rbody;
assert (response.getContentLength() == body.size());
assert (response.getContentType() == "text/plain");
assert (rbody == body);
assertTrue (response.getContentLength() == body.size());
assertTrue (response.getContentType() == "text/plain");
assertTrue (rbody == body);
}
@@ -277,9 +277,9 @@ void HTTPSServerTest::testRedirect()
HTTPResponse response;
std::string rbody;
cs.receiveResponse(response) >> rbody;
assert (response.getStatus() == HTTPResponse::HTTP_FOUND);
assert (response.get("Location") == "http://www.appinf.com/");
assert (rbody.empty());
assertTrue (response.getStatus() == HTTPResponse::HTTP_FOUND);
assertTrue (response.get("Location") == "http://www.appinf.com/");
assertTrue (rbody.empty());
}
@@ -297,9 +297,9 @@ void HTTPSServerTest::testAuth()
HTTPResponse response;
std::string rbody;
cs.receiveResponse(response) >> rbody;
assert (response.getStatus() == HTTPResponse::HTTP_UNAUTHORIZED);
assert (response.get("WWW-Authenticate") == "Basic realm=\"/auth\"");
assert (rbody.empty());
assertTrue (response.getStatus() == HTTPResponse::HTTP_UNAUTHORIZED);
assertTrue (response.get("WWW-Authenticate") == "Basic realm=\"/auth\"");
assertTrue (rbody.empty());
}
@@ -317,8 +317,8 @@ void HTTPSServerTest::testNotImpl()
HTTPResponse response;
std::string rbody;
cs.receiveResponse(response) >> rbody;
assert (response.getStatus() == HTTPResponse::HTTP_NOT_IMPLEMENTED);
assert (rbody.empty());
assertTrue (response.getStatus() == HTTPResponse::HTTP_NOT_IMPLEMENTED);
assertTrue (rbody.empty());
}