| 134 | } |
| 135 | |
| 136 | void 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 | |
| 165 | void SpiceFilterTest::NgSpiceACAscii() { |
| 166 | using namespace ac_ascii; |
nothing calls this directly
no test coverage detected