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

Method testInsertRows

3rdparty/qtcsv/tests/teststringdata.cpp:89–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89void TestStringData::testInsertRows() {
90 QList<QString> valuesFirst, valuesSecond;
91 valuesFirst << "one" << "two" << "three";
92 valuesSecond << "asgreg" << "ertetw" << "";
93
94 QString stringOne("hey test"), stringTwo("sdfwioiouoioi");
95
96 QtCSV::StringData strData;
97 strData.insertRow(0, valuesFirst);
98
99 QVERIFY2(1 == strData.rowCount(), "Wrong number of rows");
100 QVERIFY2(valuesFirst == strData.rowValues(0), "Wrong data for first row");
101
102 strData.addEmptyRow();
103 strData.addRow(stringOne);
104 strData.insertRow(1, valuesSecond);
105 strData.insertRow(100, stringTwo);
106
107 QVERIFY2(5 == strData.rowCount(), "Wrong number of rows");
108 QVERIFY2(valuesFirst == strData.rowValues(0), "Wrong data for first row");
109 QVERIFY2(valuesSecond == strData.rowValues(1), "Wrong data for second row");
110 QVERIFY2(strData.rowValues(2).isEmpty(), "Wrong data for third row");
111 QVERIFY2((QList<QString>() << stringOne) == strData.rowValues(3),
112 "Wrong data for fourth row");
113
114 QVERIFY2((QList<QString>() << stringTwo) == strData.rowValues(4),
115 "Wrong data for fifth row");
116}
117
118void TestStringData::testCompareForEquality() {
119 QList<QString> firstRow, secondRow;

Callers

nothing calls this directly

Calls 6

insertRowMethod · 0.45
rowCountMethod · 0.45
rowValuesMethod · 0.45
addEmptyRowMethod · 0.45
addRowMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected