1 /*
2  *    Copyright 2012, 2013 Thomas Schöps
3  *    Copyright 2012-2019 Kai Pastor
4  *
5  *    This file is part of OpenOrienteering.
6  *
7  *    OpenOrienteering is free software: you can redistribute it and/or modify
8  *    it under the terms of the GNU General Public License as published by
9  *    the Free Software Foundation, either version 3 of the License, or
10  *    (at your option) any later version.
11  *
12  *    OpenOrienteering is distributed in the hope that it will be useful,
13  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *    GNU General Public License for more details.
16  *
17  *    You should have received a copy of the GNU General Public License
18  *    along with OpenOrienteering.  If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef OPENORIENTEERING_FILE_FORMAT_T_H
22 #define OPENORIENTEERING_FILE_FORMAT_T_H
23 
24 #include <QObject>
25 #include <QString>
26 
27 
28 /**
29  * @test Tests concerning the file formats, registry, import and export.
30  *
31  */
32 class FileFormatTest : public QObject
33 {
34 Q_OBJECT
35 
36 private slots:
37 	void initTestCase();
38 
39 	/**
40 	 * Tests the MapCoord::toString() implementation which is used for export.
41 	 */
42 	void mapCoordtoString();
43 	void mapCoordtoString_data();
44 
45 	/**
46 	 * Tests FileFormat::understands() implementations.
47 	 */
48 	void understandsTest();
49 	void understandsTest_data();
50 
51 	/**
52 	 * Tests FileFormatRegistry::formatForData().
53 	 */
54 	void formatForDataTest();
55 	void formatForDataTest_data();
56 
57 	/**
58 	 * Tests that high coordinates are correctly moved to the central region
59 	 * of the map.
60 	 *
61 	 * \see issue #513
62 	 */
63 	void issue_513_high_coordinates();
64 	void issue_513_high_coordinates_data();
65 
66 	/**
67 	 * Tests that maps contain the same information before and after saving
68      * them and loading them again.
69      */
70 	void saveAndLoad();
71 	void saveAndLoad_data();
72 
73 	/**
74 	 * Tests saving and loading a map which is created in memory and does not go
75 	 * through an implicit export-import-cycle before the test.
76 	 */
77 	void pristineMapTest();
78 
79 	/**
80 	 * Tests export of geospatial vector data via OGR.
81 	 */
82 	void ogrExportTest();
83 	void ogrExportTest_data();
84 
85 };
86 
87 #endif // OPENORIENTEERING_FILE_FORMAT_T_H
88