20 void ViewsTest::testZipView ()
22 QList<int> ints { 1, 2, 3 };
23 QList<QString> strings {
"a",
"b",
"c" };
25 QList<QPair<int, QString>> pairs;
26 for (
const auto& pair :
Views::Zip (ints, strings))
29 QCOMPARE (pairs, (
Zip (ints, strings)));
32 void ViewsTest::testZipViewDifferentLengths ()
34 QList<int> ints { 1, 2, 3, 4, 5 };
35 QList<QString> strings {
"a",
"b",
"c" };
37 QList<QPair<int, QString>> pairs;
38 for (
const auto& pair :
Views::Zip (ints, strings))
41 QCOMPARE (pairs, (
Zip (ints, strings)));
auto Zip(C1 &&c1, C2 &&c2)
auto Zip(const Container< T1 > &c1, const Container< T2 > &c2) -> Container< Pair< T1, T2 > >