void PreludeTest::testMapMapStlized () { const auto& map = GetSimpleMap (); const auto& list = Map (Stlize (map), [] (const std::pair<int, QString>& pair) { return pair.second; }); QCOMPARE (list, QStringList { map.values () }); }
void PreludeTest::testMapMap () { const auto& map = GetSimpleMap (); const auto& otherList = Map (map, [] (const QString& v) { return v.size (); }); QCOMPARE (otherList, (QList<int> { 3, 3, 3 })); }
void StlizeTest::testRvalue () { QStringList list; for (const auto& pair : Util::Stlize (GetSimpleMap ())) list << pair.second; QCOMPARE (list, (QStringList { "aaa", "bbb", "ccc" })); }