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

Method testInsertRows

3rdparty/qtcsv-qt5/tests/teststringdata.cpp:104–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void TestStringData::testInsertRows()
105{
106 QStringList valuesFirst, valuesSecond;
107 valuesFirst << "one" << "two" << "three";
108 valuesSecond << "asgreg" << "ertetw" << "";
109
110 QString stringOne("hey test"), stringTwo("sdfwioiouoioi");
111
112 QtCSV::StringData strData;
113 strData.insertRow(0, valuesFirst);
114
115 QVERIFY2(1 == strData.rowCount(), "Wrong number of rows");
116 QVERIFY2(valuesFirst == strData.rowValues(0), "Wrong data for first row");
117
118 strData.addEmptyRow();
119 strData.addRow(stringOne);
120 strData.insertRow(1, valuesSecond);
121 strData.insertRow(100, stringTwo);
122
123 QVERIFY2(5 == strData.rowCount(), "Wrong number of rows");
124 QVERIFY2(valuesFirst == strData.rowValues(0), "Wrong data for first row");
125 QVERIFY2(valuesSecond == strData.rowValues(1), "Wrong data for second row");
126 QVERIFY2(QStringList() == strData.rowValues(2), "Wrong data for third row");
127 QVERIFY2((QStringList() << stringOne) == strData.rowValues(3),
128 "Wrong data for fourth row");
129
130 QVERIFY2((QStringList() << stringTwo) == strData.rowValues(4),
131 "Wrong data for fifth row");
132}
133
134void TestStringData::testCompareForEquality()
135{

Callers

nothing calls this directly

Calls 6

QStringListClass · 0.50
insertRowMethod · 0.45
rowCountMethod · 0.45
rowValuesMethod · 0.45
addEmptyRowMethod · 0.45
addRowMethod · 0.45

Tested by

no test coverage detected