Skip to content

Commit f52cadf

Browse files
committed
b-167 Created test suites for vagrind.
1 parent b9e3dcf commit f52cadf

File tree

4 files changed

+145
-1
lines changed

4 files changed

+145
-1
lines changed

test/TestQXmlEdit.h

+10
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ class TestQXmlEdit : public QObject
112112
TestQXmlEdit();
113113
bool verifyMaps(QMap<int, int> &reference, QMap<int, int> &candidate);
114114

115+
// for valgrind
116+
//private Q_SLOTS:
117+
void vt1();
118+
void vt2();
119+
void vt3();
120+
void vt4();
121+
void vt5();
122+
void vt6();
123+
void vt7();
124+
115125
private Q_SLOTS:
116126
void initTestCase();
117127
void cleanupTestCase();

test/app.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ App::App() : QObject(NULL)
3434
App::~App()
3535
{
3636
if(_mainWindow != NULL) {
37+
_mainWindow->close();
3738
_mainWindow->forgetData();
3839
delete _mainWindow ;
3940
_mainWindow = NULL ;

test/test.pro

+2-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ SOURCES += \
217217
testformattinginfo.cpp \
218218
testhelpers/xsd/testxsdprintinfo.cpp \
219219
teststartupandbehavior.cpp \
220-
testhelp.cpp
220+
testhelp.cpp \
221+
testsuites.cpp
221222

222223
DEFINES += SRCDIR=\\\"$$PWD/\\\"
223224

test/testsuites.cpp

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
/**************************************************************************
2+
* This file is part of QXmlEdit *
3+
* Copyright (C) 2018 by Luca Bellonda and individual contributors *
4+
* as indicated in the AUTHORS file *
5+
* lbellonda _at_ gmail.com *
6+
* *
7+
* This library is free software; you can redistribute it and/or *
8+
* modify it under the terms of the GNU Library General Public *
9+
* License as published by the Free Software Foundation; either *
10+
* version 2 of the License, or (at your option) any later version. *
11+
* *
12+
* This library 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 GNU *
15+
* Library General Public License for more details. *
16+
* *
17+
* You should have received a copy of the GNU Library General Public *
18+
* License along with this library; if not, write to the *
19+
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
20+
* Boston, MA 02110-1301 USA *
21+
**************************************************************************/
22+
23+
#include "TestQXmlEdit.h"
24+
#include "utils.h"
25+
26+
void TestQXmlEdit::vt1(){
27+
testApp();
28+
testSpringAndForces();
29+
testSearch();
30+
testCompareXml();
31+
testExportCSV();
32+
testXSDDiff12();
33+
testXSDDiff2();
34+
testXSDDiff3();
35+
testXSDDiff4();
36+
testXSDDiff5();
37+
testXSDDiff6();
38+
testXSDDiff7();
39+
testXSDDiff8();
40+
testXSDDiff9();
41+
testXSDDiff10();
42+
testXSDDiff11();
43+
}
44+
45+
void TestQXmlEdit::vt2(){
46+
testDocType();
47+
testBase64();
48+
testUndoRedo();
49+
testVis();
50+
testEditing();
51+
testSql();
52+
testSessions();
53+
testFileUI();
54+
testValidation();
55+
testSplit();
56+
testEditingCommands();
57+
test2();
58+
test();
59+
test1();
60+
}
61+
62+
void TestQXmlEdit::vt3(){
63+
testComment();
64+
testXsd();
65+
test_data();
66+
testPaste();
67+
testMixed();
68+
testMixed2();
69+
testMixedContent();
70+
testFilterAttributes();
71+
testCopyAttrs();
72+
testXSDNavigation();
73+
testClipboard();
74+
testNewFromTemplate();
75+
testXSLTMode();
76+
testStyle();
77+
}
78+
79+
void TestQXmlEdit::vt4(){
80+
testXSDCopy();
81+
testBinaryViewer();
82+
testSearchlets();
83+
testReadOnly();
84+
testMetadata();
85+
testExport();
86+
testProlog();
87+
testEncoding();
88+
testLengthAttributes();
89+
testColors();
90+
testIndent();
91+
testContainer();
92+
}
93+
94+
void TestQXmlEdit::vt5(){
95+
testXsdView();
96+
testXsdLoad();
97+
testXsdValidation();
98+
testEncodingUtils();
99+
testSelectXsd();
100+
testXSDMode();
101+
testAnonymize();
102+
testReplace();
103+
testNillable();
104+
testXSIType();
105+
testNamespace();
106+
testXmlUtils();
107+
}
108+
109+
void TestQXmlEdit::vt6(){
110+
testInsertXsdReference();
111+
testSortAttributes();
112+
testOpenInNewWindow();
113+
testElement();
114+
testLoadFile();
115+
testReplica();
116+
testUtils();
117+
testConfig();
118+
testDeleteSiblings();
119+
testCommandLine();
120+
testEditEnum();
121+
}
122+
123+
void TestQXmlEdit::vt7(){
124+
testNamespaces();
125+
testSpecials();
126+
testSCXML();
127+
testExecXSLT();
128+
testSpecialView();
129+
testFormattingInfo();
130+
testStartupAndBehavior();
131+
testHelp();
132+
}

0 commit comments

Comments
 (0)