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

Method benchIntImport

tests/import_export/Binary/BinaryFilterTest.cpp:317–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317void BinaryFilterTest::benchIntImport() {
318 Spreadsheet spreadsheet(QStringLiteral("test"), false);
319 BinaryFilter filter;
320 filter.setDataType(BinaryFilter::DataType::INT32);
321 filter.setByteOrder(QDataStream::ByteOrder::BigEndian);
322 filter.setVectors(3);
323
324 QBENCHMARK {
325 filter.readDataFromFile(benchDataFileName, &spreadsheet, AbstractFileFilter::ImportMode::Replace);
326
327 QCOMPARE(spreadsheet.columnCount(), 3);
328 QCOMPARE(spreadsheet.rowCount(), lines);
329
330 QCOMPARE(spreadsheet.column(0)->valueAt(0), 0);
331 QCOMPARE(spreadsheet.column(1)->valueAt(0), 0);
332 QCOMPARE(spreadsheet.column(2)->valueAt(0), 100);
333 }
334}
335
336void BinaryFilterTest::benchIntImport_cleanup() {

Callers

nothing calls this directly

Calls 8

setByteOrderMethod · 0.80
setVectorsMethod · 0.80
setDataTypeMethod · 0.45
readDataFromFileMethod · 0.45
columnCountMethod · 0.45
rowCountMethod · 0.45
valueAtMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected