MCPcopy Create free account
hub / github.com/KDE/labplot / NgSpiceDCBinary

Method NgSpiceDCBinary

tests/import_export/Spice/SpiceFilterTest.cpp:136–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136void SpiceFilterTest::NgSpiceDCBinary() {
137 using namespace dc_binary;
138
139 READ_REFDATA(NGSpiceRefDataFile);
140 const QString& ngFile = NGSpiceFile;
141 const int refColumnCount = refData.at(0).count();
142
143 bool binary;
144 QCOMPARE(SpiceFilter::isSpiceFile(ngFile, &binary), true);
145 QCOMPARE(binary, true);
146
147 SpiceFilter filter;
148 auto res = filter.preview(ngFile, numberPreviewData);
149
150 QCOMPARE(res.length(), numberPreviewData);
151 for (int i = 0; i < res.length(); i++)
152 QCOMPARE(res.at(i), refData.at(i));
153
154 QString resFileInfoString = filter.fileInfoString(ngFile);
155 QCOMPARE(resFileInfoString, refFileInfoString);
156
157 Spreadsheet sheet(QStringLiteral("Test"), false);
158 filter.readDataFromFile(ngFile, &sheet, AbstractFileFilter::ImportMode::Replace);
159
160 COMPARE_COLUMN_NAMES_MODE(sheet, columnNames, refColumnCount);
161
162 COMPARE_ROW_VALUES(sheet, refData, refDataRowCount, refColumnCount);
163}
164
165void SpiceFilterTest::NgSpiceACAscii() {
166 using namespace ac_ascii;

Callers

nothing calls this directly

Calls 5

lengthMethod · 0.80
countMethod · 0.45
previewMethod · 0.45
fileInfoStringMethod · 0.45
readDataFromFileMethod · 0.45

Tested by

no test coverage detected