[Libreoffice-commits] online.git: loolwsd/test
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Apr 25 02:14:48 UTC 2016
loolwsd/test/httpposttest.cpp | 2 +-
loolwsd/test/httpwstest.cpp | 18 ++++++++++++------
2 files changed, 13 insertions(+), 7 deletions(-)
New commits:
commit afc152b0cee1b1bab3723064e404f6ffb319394a
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Apr 24 22:07:41 2016 -0400
loolwsd: compiler fixes in the tests
GCC 5.x doesn't allow temporary strings in regex_match.
Change-Id: I4c62872661d6b78ce7e949cf524c7b2b36fb0197
Reviewed-on: https://gerrit.libreoffice.org/24357
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/test/httpposttest.cpp b/loolwsd/test/httpposttest.cpp
index 97c8058..0fd5ec6 100644
--- a/loolwsd/test/httpposttest.cpp
+++ b/loolwsd/test/httpposttest.cpp
@@ -96,7 +96,7 @@ void HTTPPostTest::testLOleaflet()
session.sendRequest(request) << body;
Poco::Net::HTTPResponse response;
- std::istream& rs = session.receiveResponse(response);
+ session.receiveResponse(response);
CPPUNIT_ASSERT_EQUAL(Poco::Net::HTTPResponse::HTTP_OK, response.getStatus());
CPPUNIT_ASSERT_EQUAL(std::string("text/html"), response.getContentType());
}
diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index bbeec92..4df44f2 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -938,7 +938,8 @@ void HTTPWSTest::testInsertDelete()
for (std::sregex_iterator it = std::sregex_iterator(response.begin(), response.end(), endLine);
it != std::sregex_iterator(); ++it)
{
- if (std::regex_match((*it).str(), match, number))
+ const auto str = (*it).str();
+ if (std::regex_match(str, match, number))
{
parts.push_back(match.str());
}
@@ -964,7 +965,8 @@ void HTTPWSTest::testInsertDelete()
for (std::sregex_iterator it = std::sregex_iterator(response.begin(), response.end(), endLine);
it != std::sregex_iterator(); ++it)
{
- if (std::regex_match((*it).str(), match, number))
+ const auto str = (*it).str();
+ if (std::regex_match(str, match, number))
{
parts.push_back(match.str());
}
@@ -991,7 +993,8 @@ void HTTPWSTest::testInsertDelete()
for (std::sregex_iterator it = std::sregex_iterator(response.begin(), response.end(), endLine);
it != std::sregex_iterator(); ++it)
{
- if (std::regex_match((*it).str(), match, number))
+ const auto str = (*it).str();
+ if (std::regex_match(str, match, number))
{
parts.push_back(match.str());
}
@@ -1018,7 +1021,8 @@ void HTTPWSTest::testInsertDelete()
for (std::sregex_iterator it = std::sregex_iterator(response.begin(), response.end(), endLine);
it != std::sregex_iterator(); ++it)
{
- if (std::regex_match((*it).str(), match, number))
+ const auto str = (*it).str();
+ if (std::regex_match(str, match, number))
{
parts.push_back(match.str());
}
@@ -1045,7 +1049,8 @@ void HTTPWSTest::testInsertDelete()
for (std::sregex_iterator it = std::sregex_iterator(response.begin(), response.end(), endLine);
it != std::sregex_iterator(); ++it)
{
- if (std::regex_match((*it).str(), match, number))
+ const auto str = (*it).str();
+ if (std::regex_match(str, match, number))
{
parts.push_back(match.str());
}
@@ -1071,7 +1076,8 @@ void HTTPWSTest::testInsertDelete()
for (std::sregex_iterator it = std::sregex_iterator(response.begin(), response.end(), endLine);
it != std::sregex_iterator(); ++it)
{
- if (std::regex_match((*it).str(), match, number))
+ const auto str = (*it).str();
+ if (std::regex_match(str, match, number))
{
parts.push_back(match.str());
}
More information about the Libreoffice-commits
mailing list