Commit 299d0f0e authored by Christian Stenger's avatar Christian Stenger

Tests: Fix compile with MSVC2015

Change-Id: Ic9a1839325febeb6bde0b656dce88342f3955c53
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
parent 300041cc
...@@ -273,7 +273,7 @@ void tst_Algorithm::transform() ...@@ -273,7 +273,7 @@ void tst_Algorithm::transform()
std::vector<int> v({1, 2, 3, 4}); std::vector<int> v({1, 2, 3, 4});
const std::vector<BaseStruct *> trans const std::vector<BaseStruct *> trans
= Utils::transform<std::vector<BaseStruct *>>(v, [](int i) { return new Struct(i); }); = Utils::transform<std::vector<BaseStruct *>>(v, [](int i) { return new Struct(i); });
QCOMPARE(trans.size(), 4ul); QCOMPARE(trans.size(), static_cast<std::vector<int>::size_type>(4ul));
QCOMPARE(trans.at(0)->member, 1); QCOMPARE(trans.at(0)->member, 1);
QCOMPARE(trans.at(1)->member, 2); QCOMPARE(trans.at(1)->member, 2);
QCOMPARE(trans.at(2)->member, 3); QCOMPARE(trans.at(2)->member, 3);
...@@ -287,7 +287,7 @@ void tst_Algorithm::transform() ...@@ -287,7 +287,7 @@ void tst_Algorithm::transform()
= Utils::transform<std::vector<BaseStruct *, std::allocator<BaseStruct *>>>(v, [](int i) { = Utils::transform<std::vector<BaseStruct *, std::allocator<BaseStruct *>>>(v, [](int i) {
return new Struct(i); return new Struct(i);
}); });
QCOMPARE(trans.size(), 4ul); QCOMPARE(trans.size(), static_cast<std::vector<int>::size_type>(4ul));
QCOMPARE(trans.at(0)->member, 1); QCOMPARE(trans.at(0)->member, 1);
QCOMPARE(trans.at(1)->member, 2); QCOMPARE(trans.at(1)->member, 2);
QCOMPARE(trans.at(2)->member, 3); QCOMPARE(trans.at(2)->member, 3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment