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

Method testWriteFromStringData

3rdparty/qtcsv-qt5/tests/testwriter.cpp:70–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void TestWriter::testWriteFromStringData()
71{
72 QStringList strList;
73 strList << "one" << "two" << "three";
74
75 QtCSV::StringData strData;
76 strData.addRow(strList);
77
78 bool writeResult = QtCSV::Writer::write(getFilePath(), strData);
79 QVERIFY2(true == writeResult, "Failed to write to file");
80
81 QList<QStringList> data = QtCSV::Reader::readToList(getFilePath());
82 QVERIFY2(false == data.isEmpty(), "Failed to read file content");
83 QVERIFY2(1 == data.size(), "Wrong number of rows");
84 QVERIFY2(strList == data.at(0), "Wrong data");
85}
86
87void TestWriter::testWriteFromVariantData()
88{

Callers

nothing calls this directly

Calls 4

addRowMethod · 0.45
isEmptyMethod · 0.45
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected