MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / testClearNotEmptyData

Method testClearNotEmptyData

3rdparty/qtcsv-qt5/tests/testvariantdata.cpp:121–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void TestVariantData::testClearNotEmptyData()
122{
123 double expectedValue = 42.12309;
124 QVariant firstRow(expectedValue);
125
126 QList<QVariant> secondRow;
127 secondRow << QVariant("kkoo") << QVariant(771) << QVariant(3.14);
128
129 QStringList thirdRow;
130 thirdRow << "one" << "two" << "three";
131
132 QtCSV::VariantData varData;
133 varData.addRow(firstRow);
134 varData.addRow(secondRow);
135 varData.addRow(thirdRow);
136
137 QVERIFY2(false == varData.isEmpty(), "VariantData is empty");
138 QVERIFY2(3 == varData.rowCount(), "Wrong number of rows");
139
140 varData.clear();
141
142 QVERIFY2(true == varData.isEmpty(), "VariantData is not empty");
143 QVERIFY2(0 == varData.rowCount(), "Wrong number of rows");
144}
145
146void TestVariantData::testInsertRows()
147{

Callers

nothing calls this directly

Calls 5

QVariantClass · 0.50
addRowMethod · 0.45
isEmptyMethod · 0.45
rowCountMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected