File indexing completed on 2024-05-12 16:45:24

0001 /***************************************************************************
0002  * SPDX-FileCopyrightText: 2022 S. MANKOWSKI stephane@mankowski.fr
0003  * SPDX-FileCopyrightText: 2022 G. DE BURE support@mankowski.fr
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  ***************************************************************************/
0006 /** @file
0007  * This file is a test script.
0008  *
0009  * @author Stephane MANKOWSKI / Guillaume DE BURE
0010  */
0011 #include <qfile.h>
0012 
0013 #include "skgdocumentbank.h"
0014 #include "skgtestmacro.h"
0015 
0016 /**
0017  * The main function of the unit test
0018  * @param argc the number of arguments
0019  * @param argv the list of arguments
0020  */
0021 int main(int argc, char** argv)
0022 {
0023     Q_UNUSED(argc)
0024     Q_UNUSED(argv)
0025 
0026     // Init test
0027     SKGINITTEST(true) {
0028         // Test load old version of files
0029         {
0030             SKGDocumentBank document1;
0031             SKGTESTERROR(QStringLiteral("DOC:load"), document1.load(SKGTest::getTestPath(QStringLiteral("IN")) % "/skgtestmigration/version_0.1.skg"), true)
0032         }
0033         {
0034             SKGDocumentBank document1;
0035             SKGTESTERROR(QStringLiteral("DOC:load"), document1.load(SKGTest::getTestPath(QStringLiteral("IN")) % "/skgtestmigration/version_0.3.skg"), true)
0036         }
0037         {
0038             SKGDocumentBank document1;
0039             SKGTESTERROR(QStringLiteral("DOC:load"), document1.load(SKGTest::getTestPath(QStringLiteral("IN")) % "/skgtestmigration/version_1.12.skg"), true)
0040         }
0041     }
0042 
0043     // End test
0044     SKGENDTEST()
0045 }