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

Method testImportWithoutValidTopics

tests/import_export/MCAP/MCAPFilterTest.cpp:131–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void MCAPFilterTest::testImportWithoutValidTopics() {
132 McapFilter filter;
133
134 Spreadsheet spreadsheet(QStringLiteral("test"), false);
135 const QString& fileName = QFINDTESTDATA(QLatin1String("data/basic_NONE_unsupported_encoding.mcap"));
136 QCOMPARE(filter.getValidTopics(fileName).size(), 0);
137
138 AbstractFileFilter::ImportMode mode = AbstractFileFilter::ImportMode::Replace;
139 filter.readDataFromFile(fileName, &spreadsheet, mode);
140
141 QCOMPARE(filter.lastError(), i18n("No JSON encoded topics found."));
142}
143
144void MCAPFilterTest::testImportWrongFile() {
145 McapFilter filter;

Callers

nothing calls this directly

Calls 4

getValidTopicsMethod · 0.80
lastErrorMethod · 0.80
sizeMethod · 0.45
readDataFromFileMethod · 0.45

Tested by

no test coverage detected