MCPcopy Create free account
hub / github.com/KDE/kdevelop / testInsert

Method testInsert

kdevplatform/util/tests/test_algorithm.cpp:77–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void TestAlgorithm::testInsert()
78{
79 QSet<int> set{5};
80 VERIFY_INSERT_NEW(set, 4);
81 VERIFY_INSERT_EXISTING(set, 5);
82 VERIFY_INSERT_NEW(set, 7);
83 VERIFY_INSERT_EXISTING(set, 7);
84 VERIFY_INSERT_EXISTING(set, 4);
85 set.remove(5);
86 VERIFY_INSERT_NEW(set, 5);
87 set.remove(4);
88 VERIFY_INSERT_NEW(set, 4);
89 VERIFY_INSERT_EXISTING(set, 4);
90 VERIFY_INSERT_NEW(set, 0);
91
92 const QSet expected{5, 7, 4, 0};
93 QCOMPARE(set, expected);
94}
95
96#include "moc_test_algorithm.cpp"

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected