Mercurial > trustbridge
annotate ui/tests/mainwindowtest.cpp @ 559:dd8a295d5b4d
Add framework for mainwindow testing
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 22 May 2014 10:20:45 +0000 |
parents | |
children | aee3eb10bbba |
rev | line source |
---|---|
559
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
3 * |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=2) |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
6 * See LICENSE.txt for details. |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
7 */ |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
8 |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
9 #include "mainwindowtest.h" |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
10 |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
11 #ifdef Q_OS_WIN |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
12 Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
13 #else |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
14 Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
15 #endif |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
16 |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
17 MainWindowTest::MainWindowTest() : MainWindow(true) { |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
18 } |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
19 |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
20 void MainWindowTest::closeApp() { |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
21 emit closeCalled(); |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
22 } |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
23 |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
24 void MainWindowTest::testInvalidUpdate() { |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
25 // TODO |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 } |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
27 |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
28 void MainWindowTest::testValidUpdate() { |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
29 // TODO |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
30 } |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
31 |
dd8a295d5b4d
Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
32 QTEST_MAIN(MainWindowTest); |