MCPcopy Create free account
hub / github.com/KDAB/GammaRay / testAssociativeContainer

Method testAssociativeContainer

tests/propertyadaptortest.cpp:165–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163 }
164
165 void testAssociativeContainer()
166 {
167 QHash<QString, int> h;
168 h["A"] = 2;
169 h["B"] = 3;
170 h["C"] = 5;
171
172 auto adaptor = PropertyAdaptorFactory::create(ObjectInstance(QVariant::fromValue(h)), this);
173
174 QVERIFY(adaptor);
175 QCOMPARE(adaptor->count(), 3);
176 verifyPropertyData(adaptor);
177 testProperty(adaptor, "A", "int", "QHash<QString,int>", PropertyData::Readable);
178 testProperty(adaptor, "C", "int", "QHash<QString,int>", PropertyData::Readable);
179 QVERIFY(!adaptor->canAddProperty());
180 }
181
182 void testQtObject()
183 {

Callers

nothing calls this directly

Calls 3

ObjectInstanceClass · 0.50
countMethod · 0.45
canAddPropertyMethod · 0.45

Tested by

no test coverage detected