Mercurial > hg > svcore
diff data/fileio/test/CSVFormatTest.h @ 1873:1d44fdc8196c csv-import-headers
Extend tests to include testing (at least some of) the actual data as well as the layout
author | Chris Cannam |
---|---|
date | Thu, 18 Jun 2020 13:42:48 +0100 |
parents | 1b8c4ee06f6d |
children |
line wrap: on
line diff
--- a/data/fileio/test/CSVFormatTest.h Thu Jun 18 11:55:28 2020 +0100 +++ b/data/fileio/test/CSVFormatTest.h Thu Jun 18 13:42:48 2020 +0100 @@ -236,9 +236,10 @@ void modelType2DImplicit() { CSVFormat f; QVERIFY(f.guessFormatFor(csvDir.filePath("model-type-2d-implicit.csv"))); - QCOMPARE(f.getColumnCount(), 1); + QCOMPARE(f.getColumnCount(), 2); QCOMPARE(f.getHeaderStatus(), CSVFormat::HeaderAbsent); QCOMPARE(f.getColumnPurpose(0), CSVFormat::ColumnValue); + QCOMPARE(f.getColumnPurpose(1), CSVFormat::ColumnLabel); QCOMPARE(f.getTimingType(), CSVFormat::ImplicitTiming); } @@ -248,6 +249,7 @@ QCOMPARE(f.getColumnCount(), 2); QCOMPARE(f.getHeaderStatus(), CSVFormat::HeaderPresent); QCOMPARE(f.getColumnPurpose(0), CSVFormat::ColumnValue); + QCOMPARE(f.getColumnPurpose(1), CSVFormat::ColumnLabel); QCOMPARE(f.getTimingType(), CSVFormat::ImplicitTiming); }