Skip to content

Commit

Permalink
Add missing constness in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Jan 5, 2025
1 parent 645b9c8 commit 12ecea8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions tests/ExportDsvTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void ExportDsvTest::testEmptyTable_data()
QTest::newRow("CSV empty table") << ',';
}

void ExportDsvTest::testEmptyTable()
void ExportDsvTest::testEmptyTable() const
{
QFETCH(const char, separator);

Expand All @@ -35,7 +35,7 @@ void ExportDsvTest::testEmptyTable()
QCOMPARE(exportedByteArray, emptyData_);
}

void ExportDsvTest::testHeadersOnly_data()
void ExportDsvTest::testHeadersOnly_data() const
{
QTest::addColumn<char>("separator");
QTest::addColumn<QString>("expected");
Expand Down Expand Up @@ -63,7 +63,7 @@ void ExportDsvTest::testHeadersOnly()
QCOMPARE(exportedByteArray, expected);
}

void ExportDsvTest::testSimpleTable_data()
void ExportDsvTest::testSimpleTable_data() const
{
QTest::addColumn<char>("separator");
QTest::addColumn<QString>("expected");
Expand Down Expand Up @@ -91,7 +91,7 @@ void ExportDsvTest::testSimpleTable()
QCOMPARE(exportedByteArray, expected);
}

void ExportDsvTest::testViewWithMultiSelection_data()
void ExportDsvTest::testViewWithMultiSelection_data() const
{
QTest::addColumn<char>("separator");
QTest::addColumn<QString>("expected");
Expand Down Expand Up @@ -124,7 +124,7 @@ void ExportDsvTest::testViewWithMultiSelection()
QCOMPARE(exportedByteArray, expected);
}

void ExportDsvTest::testSpecialCharInStringField_data()
void ExportDsvTest::testSpecialCharInStringField_data() const
{
QTest::addColumn<char>("separator");
QTest::addColumn<char>("specialChar");
Expand Down Expand Up @@ -167,7 +167,7 @@ void ExportDsvTest::testSpecialCharInStringField()
QCOMPARE(exportedByteArray, expected);
}

void ExportDsvTest::testCustomDateFormat()
void ExportDsvTest::testCustomDateFormat() const
{
TestTableModel model(3, 1);
QTableView view;
Expand All @@ -184,7 +184,7 @@ void ExportDsvTest::testCustomDateFormat()
QCOMPARE(exportedByteArray, customDateFormatData_);
}

void ExportDsvTest::testIsoShortDate()
void ExportDsvTest::testIsoShortDate() const
{
TestTableModel model(3, 1);
QTableView view;
Expand All @@ -201,7 +201,7 @@ void ExportDsvTest::testIsoShortDate()
QCOMPARE(exportedByteArray, isoShortDateData_);
}

void ExportDsvTest::testLocaleForNumbers()
void ExportDsvTest::testLocaleForNumbers() const
{
TestTableModel model(3, 1);
QTableView view;
Expand Down
16 changes: 8 additions & 8 deletions tests/ExportDsvTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ class ExportDsvTest : public QObject

private Q_SLOTS:
static void testEmptyTable_data();
void testEmptyTable();
void testEmptyTable() const;

void testHeadersOnly_data();
void testHeadersOnly_data() const;
static void testHeadersOnly();

void testSimpleTable_data();
void testSimpleTable_data() const;
static void testSimpleTable();

void testViewWithMultiSelection_data();
void testViewWithMultiSelection_data() const;
static void testViewWithMultiSelection();

void testSpecialCharInStringField_data();
void testSpecialCharInStringField_data() const;
static void testSpecialCharInStringField();

void testCustomDateFormat();
void testIsoShortDate();
void testCustomDateFormat() const;
void testIsoShortDate() const;

void testLocaleForNumbers();
void testLocaleForNumbers() const;

void benchmark_data();
void benchmark();
Expand Down

0 comments on commit 12ecea8

Please sign in to comment.