Commit 9096ca38 authored by Csaba Kertesz's avatar Csaba Kertesz

Update the source format with clang-format

parent 679fbc8b
This diff is collapsed.
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
* * * *
***************************************************************************/ ***************************************************************************/
#ifndef TESTCACHINGDMS_H #ifndef TESTCACHINGDMS_H
#define TESTCACHINGDMS_H #define TESTCACHINGDMS_H
...@@ -33,33 +31,31 @@ ...@@ -33,33 +31,31 @@
class TestCachingDms : public QObject class TestCachingDms : public QObject
{ {
Q_OBJECT
Q_OBJECT public:
/**
public:
/**
* @short Constructor * @short Constructor
*/ */
TestCachingDms(); TestCachingDms();
/** /**
* @short Destructor * @short Destructor
*/ */
~TestCachingDms(); ~TestCachingDms();
private slots: private slots:
void defaultCtor(); void defaultCtor();
void explicitSexigesimalCtor(); void explicitSexigesimalCtor();
void angleCtor(); void angleCtor();
void stringCtor(); void stringCtor();
void setUsing_atan2(); void setUsing_atan2();
void setUsing_asin(); void setUsing_asin();
void setUsing_acos(); void setUsing_acos();
void additionOperator(); void additionOperator();
void subtractionOperator(); void subtractionOperator();
void unaryMinusOperator(); void unaryMinusOperator();
void testFailsafeUseOfBaseClassPtr(); void testFailsafeUseOfBaseClassPtr();
}; };
#endif #endif
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <QDir> #include <QDir>
#include <QTemporaryFile> #include <QTemporaryFile>
TestCSVParser::TestCSVParser(): QObject() TestCSVParser::TestCSVParser() : QObject()
{ {
} }
...@@ -72,7 +72,7 @@ void TestCSVParser::initTestCase() ...@@ -72,7 +72,7 @@ void TestCSVParser::initTestCase()
"3," "3,"
"\"isn't, pi\"," "\"isn't, pi\","
"and," "and,"
"\"\",")); // less than required fields "\"\",")); // less than required fields
test_cases_.append(QString("," test_cases_.append(QString(","
"isn't," "isn't,"
"it," "it,"
...@@ -81,7 +81,7 @@ void TestCSVParser::initTestCase() ...@@ -81,7 +81,7 @@ void TestCSVParser::initTestCase()
"3," "3,"
"\"isn't, pi\"," "\"isn't, pi\","
"and," "and,"
"\"," // no matching " "\"," // no matching "
"-3.141," "-3.141,"
"isn't," "isn't,"
"either\n")); "either\n"));
...@@ -94,7 +94,7 @@ void TestCSVParser::initTestCase() ...@@ -94,7 +94,7 @@ void TestCSVParser::initTestCase()
QVERIFY(temp_file.open()); QVERIFY(temp_file.open());
test_file_name_ = temp_file.fileName(); test_file_name_ = temp_file.fileName();
QTextStream out_stream(&temp_file); QTextStream out_stream(&temp_file);
foreach(const QString &test_case, test_cases_) foreach (const QString &test_case, test_cases_)
out_stream << test_case; out_stream << test_case;
temp_file.close(); temp_file.close();
...@@ -125,7 +125,6 @@ void TestCSVParser::cleanupTestCase() ...@@ -125,7 +125,6 @@ void TestCSVParser::cleanupTestCase()
delete test_parser_; delete test_parser_;
} }
/* /*
* The following tests checks for the following cases for CSV files * The following tests checks for the following cases for CSV files
* 1. Mixed inputs (See test case for description) * 1. Mixed inputs (See test case for description)
...@@ -138,7 +137,6 @@ void TestCSVParser::cleanupTestCase() ...@@ -138,7 +137,6 @@ void TestCSVParser::cleanupTestCase()
* *
*/ */
void TestCSVParser::CSVMixedInputs() void TestCSVParser::CSVMixedInputs()
{ {
/* /*
...@@ -194,7 +192,6 @@ void TestCSVParser::CSVQuotesInQuotes() ...@@ -194,7 +192,6 @@ void TestCSVParser::CSVQuotesInQuotes()
QCOMPARE(row_content["field12"].toString(), QString("either")); QCOMPARE(row_content["field12"].toString(), QString("either"));
} }
void TestCSVParser::CSVEmptyRow() void TestCSVParser::CSVEmptyRow()
{ {
/* Test 2. Row with less rows than required (to be skipped) /* Test 2. Row with less rows than required (to be skipped)
...@@ -269,7 +266,6 @@ void TestCSVParser::CSVIgnoreHasNextRow() ...@@ -269,7 +266,6 @@ void TestCSVParser::CSVIgnoreHasNextRow()
} }
} }
void TestCSVParser::CSVReadMissingFile() void TestCSVParser::CSVReadMissingFile()
{ {
/* /*
...@@ -298,5 +294,4 @@ void TestCSVParser::CSVReadMissingFile() ...@@ -298,5 +294,4 @@ void TestCSVParser::CSVReadMissingFile()
} }
} }
QTEST_GUILESS_MAIN(TestCSVParser) QTEST_GUILESS_MAIN(TestCSVParser)
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
* * * *
***************************************************************************/ ***************************************************************************/
#ifndef TESTCSVPARSER_H #ifndef TESTCSVPARSER_H
#define TESTCSVPARSER_H #define TESTCSVPARSER_H
...@@ -24,28 +23,27 @@ ...@@ -24,28 +23,27 @@
#include "ksparser.h" #include "ksparser.h"
#include "ksfilereader.h" #include "ksfilereader.h"
class TestCSVParser : public QObject
class TestCSVParser: public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
TestCSVParser(); TestCSVParser();
~TestCSVParser(); ~TestCSVParser();
private slots: private slots:
void initTestCase(); void initTestCase();
void cleanupTestCase(); void cleanupTestCase();
void CSVMixedInputs(); void CSVMixedInputs();
void CSVQuotesInQuotes(); void CSVQuotesInQuotes();
void CSVEmptyRow(); void CSVEmptyRow();
void CSVNoRow(); void CSVNoRow();
void CSVIgnoreHasNextRow(); void CSVIgnoreHasNextRow();
void CSVReadMissingFile(); void CSVReadMissingFile();
private: private:
QStringList test_cases_; QStringList test_cases_;
QList< QPair<QString, KSParser::DataTypes> > sequence_; QList<QPair<QString, KSParser::DataTypes>> sequence_;
QString test_file_name_; QString test_file_name_;
KSParser * test_parser_; KSParser *test_parser_;
}; };
#endif // TESTKSPARSER_H #endif // TESTKSPARSER_H
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "testdms.h" #include "testdms.h"
#include "nan.h" #include "nan.h"
TestDMS::TestDMS(): QObject() TestDMS::TestDMS() : QObject()
{ {
} }
...@@ -27,7 +27,6 @@ void TestDMS::defaultCtor() ...@@ -27,7 +27,6 @@ void TestDMS::defaultCtor()
// Check default empty constructor // Check default empty constructor
dms d; dms d;
QVERIFY(std::isnan(d.Degrees())); QVERIFY(std::isnan(d.Degrees()));
} }
void TestDMS::explicitSexigesimalCtor() void TestDMS::explicitSexigesimalCtor()
...@@ -44,7 +43,7 @@ void TestDMS::explicitSexigesimalCtor() ...@@ -44,7 +43,7 @@ void TestDMS::explicitSexigesimalCtor()
QVERIFY(d.degree() == 14); QVERIFY(d.degree() == 14);
QVERIFY(d.arcmin() == 55); QVERIFY(d.arcmin() == 55);
QVERIFY(d.arcsec() == 20); QVERIFY(d.arcsec() == 20);
QVERIFY(d.Degrees() == (14.0+55.0/60.0+20.0/3600.0)); QVERIFY(d.Degrees() == (14.0 + 55.0 / 60.0 + 20.0 / 3600.0));
} }