File indexing completed on 2024-04-28 03:45:19
0001 /* 0002 SPDX-FileCopyrightText: 2012 Rishab Arora <ra.rishab@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "ksparser.h" 0010 0011 #include <QTest> 0012 0013 class TestCSVParser : public QObject 0014 { 0015 Q_OBJECT 0016 public: 0017 TestCSVParser(); 0018 ~TestCSVParser() override = default; 0019 0020 private slots: 0021 void initTestCase(); 0022 void cleanupTestCase(); 0023 void CSVMixedInputs(); 0024 void CSVQuotesInQuotes(); 0025 void CSVEmptyRow(); 0026 void CSVNoRow(); 0027 void CSVIgnoreHasNextRow(); 0028 void CSVReadMissingFile(); 0029 0030 private: 0031 QStringList test_cases_; 0032 QList<QPair<QString, KSParser::DataTypes>> sequence_; 0033 QString test_file_name_; 0034 KSParser *test_parser_ { nullptr }; 0035 };