summaryrefslogtreecommitdiff
path: root/desktop/qa
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-01 10:22:17 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-01 10:22:17 +0000
commit2562ad74d1945322e9fdf8af5fc0b1f17e854c9b (patch)
treebb70cde1c7842f2e1f46750491f0b127b6e18276 /desktop/qa
parentdfdd01d12226cfbd9b9d2618bd9da71191bfc4b9 (diff)
stoi not a member of std under android toolchain
Change-Id: I73a4e7894e33dd95ca50ea25f5f95bf94a43531e
Diffstat (limited to 'desktop/qa')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 4312089e0eb8..175947b8c7c2 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -863,13 +863,13 @@ void DesktopLOKTest::testSheetSelections()
{
char* pUsedMimeType = nullptr;
char* pCopiedContent = pDocument->pClass->getTextSelection(pDocument, nullptr, &pUsedMimeType);
- std::vector<int> aExpected = {5, 6, 7, 8, 9};
+ std::vector<long> aExpected = {5, 6, 7, 8, 9};
std::istringstream iss(pCopiedContent);
for (size_t i = 0; i < aExpected.size(); i++)
{
std::string token;
iss >> token;
- CPPUNIT_ASSERT_EQUAL(aExpected[i], std::stoi(token));
+ CPPUNIT_ASSERT_EQUAL(aExpected[i], strtol(token.c_str(), nullptr, 10));
}
free(pUsedMimeType);
@@ -909,13 +909,13 @@ void DesktopLOKTest::testSheetSelections()
{
char* pUsedMimeType = nullptr;
char* pCopiedContent = pDocument->pClass->getTextSelection(pDocument, nullptr, &pUsedMimeType);
- std::vector<int> aExpected = { 8 };
+ std::vector<long> aExpected = { 8 };
std::istringstream iss(pCopiedContent);
for (size_t i = 0; i < aExpected.size(); i++)
{
std::string token;
iss >> token;
- CPPUNIT_ASSERT_EQUAL(aExpected[i], std::stoi(token));
+ CPPUNIT_ASSERT_EQUAL(aExpected[i], strtol(token.c_str(), nullptr, 10));
}
free(pUsedMimeType);