2 Gwenview: an image viewer
3 Copyright 2008 Aurélien Gâteau <aurelien.gateau@free.fr>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
31 * This file contains simple helpers to access test files
34 inline QString
pathForTestFile(const QString
& name
) {
35 return QString("%1/%2").arg(KDESRCDIR
).arg(name
);
38 inline KUrl
urlForTestFile(const QString
& name
) {
40 url
.setPath(pathForTestFile(name
));
44 inline QString
pathForTestOutputFile(const QString
& name
) {
45 return QString("%1/%2").arg(QDir::currentPath()).arg(name
);
48 inline KUrl
urlForTestOutputFile(const QString
& name
) {
50 url
.setPath(pathForTestOutputFile(name
));
54 bool waitForSignal(const QSignalSpy
& spy
, int timeout
= 5) {
55 for (int x
= 0; x
< timeout
; ++x
) {
56 if (spy
.count() > 0) {
64 #endif /* TESTUTILS_H */