mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
b9a3dfb86b
In the original version, parsing and comparing output was done in separate test methods. This was forbidding use of QTest cleanup to call clear_dive_file_data(). As a side effect a failure in one test would make other tests failing too (since call to clear_dive_file_data was skipped by QCOMPARE failure). Added a FILE_COMPARE macro to avoid code duplication. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
30 lines
470 B
C++
30 lines
470 B
C++
#ifndef TESTPARSE_H
|
|
#define TESTPARSE_H
|
|
|
|
#include <QtTest>
|
|
#include <sqlite3.h>
|
|
|
|
class TestParse : public QObject{
|
|
Q_OBJECT
|
|
private slots:
|
|
void initTestCase();
|
|
void init();
|
|
void cleanup();
|
|
|
|
int parseCSV();
|
|
int parseDivingLog();
|
|
int parseV2NoQuestion();
|
|
int parseV3();
|
|
void testParse();
|
|
|
|
void testParseDM4();
|
|
void testParseHUDC();
|
|
void testParseNewFormat();
|
|
void testParseDLD();
|
|
void testParseMerge();
|
|
|
|
private:
|
|
sqlite3 *_sqlite3_handle = NULL;
|
|
};
|
|
|
|
#endif
|