From 12ecea850e2b77c52555f28d4e6bd905e506d117 Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Sun, 5 Jan 2025 14:32:23 +0100 Subject: [PATCH] Add missing constness in tests. --- tests/ExportDsvTest.cpp | 16 ++++++++-------- tests/ExportDsvTest.h | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/ExportDsvTest.cpp b/tests/ExportDsvTest.cpp index 91666de..88f9542 100644 --- a/tests/ExportDsvTest.cpp +++ b/tests/ExportDsvTest.cpp @@ -17,7 +17,7 @@ void ExportDsvTest::testEmptyTable_data() QTest::newRow("CSV empty table") << ','; } -void ExportDsvTest::testEmptyTable() +void ExportDsvTest::testEmptyTable() const { QFETCH(const char, separator); @@ -35,7 +35,7 @@ void ExportDsvTest::testEmptyTable() QCOMPARE(exportedByteArray, emptyData_); } -void ExportDsvTest::testHeadersOnly_data() +void ExportDsvTest::testHeadersOnly_data() const { QTest::addColumn("separator"); QTest::addColumn("expected"); @@ -63,7 +63,7 @@ void ExportDsvTest::testHeadersOnly() QCOMPARE(exportedByteArray, expected); } -void ExportDsvTest::testSimpleTable_data() +void ExportDsvTest::testSimpleTable_data() const { QTest::addColumn("separator"); QTest::addColumn("expected"); @@ -91,7 +91,7 @@ void ExportDsvTest::testSimpleTable() QCOMPARE(exportedByteArray, expected); } -void ExportDsvTest::testViewWithMultiSelection_data() +void ExportDsvTest::testViewWithMultiSelection_data() const { QTest::addColumn("separator"); QTest::addColumn("expected"); @@ -124,7 +124,7 @@ void ExportDsvTest::testViewWithMultiSelection() QCOMPARE(exportedByteArray, expected); } -void ExportDsvTest::testSpecialCharInStringField_data() +void ExportDsvTest::testSpecialCharInStringField_data() const { QTest::addColumn("separator"); QTest::addColumn("specialChar"); @@ -167,7 +167,7 @@ void ExportDsvTest::testSpecialCharInStringField() QCOMPARE(exportedByteArray, expected); } -void ExportDsvTest::testCustomDateFormat() +void ExportDsvTest::testCustomDateFormat() const { TestTableModel model(3, 1); QTableView view; @@ -184,7 +184,7 @@ void ExportDsvTest::testCustomDateFormat() QCOMPARE(exportedByteArray, customDateFormatData_); } -void ExportDsvTest::testIsoShortDate() +void ExportDsvTest::testIsoShortDate() const { TestTableModel model(3, 1); QTableView view; @@ -201,7 +201,7 @@ void ExportDsvTest::testIsoShortDate() QCOMPARE(exportedByteArray, isoShortDateData_); } -void ExportDsvTest::testLocaleForNumbers() +void ExportDsvTest::testLocaleForNumbers() const { TestTableModel model(3, 1); QTableView view; diff --git a/tests/ExportDsvTest.h b/tests/ExportDsvTest.h index 37686c8..b4e9640 100644 --- a/tests/ExportDsvTest.h +++ b/tests/ExportDsvTest.h @@ -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();