MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / testClearNotEmptyData

Method testClearNotEmptyData

3rdparty/qtcsv/tests/testvariantdata.cpp:110–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void TestVariantData::testClearNotEmptyData() {
111 double expectedValue = 42.12309;
112 QVariant firstRow(expectedValue);
113
114 QList<QVariant> secondRow;
115 secondRow << QVariant("kkoo") << QVariant(771) << QVariant(3.14);
116
117 QStringList thirdRow;
118 thirdRow << "one" << "two" << "three";
119
120 QtCSV::VariantData varData;
121 varData.addRow(firstRow);
122 varData.addRow(secondRow);
123 varData.addRow(thirdRow);
124
125 QVERIFY2(!varData.isEmpty(), "VariantData is empty");
126 QVERIFY2(3 == varData.rowCount(), "Wrong number of rows");
127
128 varData.clear();
129 QVERIFY2(varData.isEmpty(), "VariantData is not empty");
130 QVERIFY2(0 == varData.rowCount(), "Wrong number of rows");
131}
132
133void TestVariantData::testInsertRows() {
134 double expectedValue = 42.12309;

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