File: TestUtils.h

package info (click to toggle)
sfxr-qt 1.5.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,988 kB
  • sloc: cpp: 48,737; python: 1,885; sh: 385; makefile: 4
file content (27 lines) | stat: -rw-r--r-- 519 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef TESTUTILS_H
#define TESTUTILS_H

#include <QString>
#include <QUrl>

#include <fstream>

QByteArray loadFile(const QString& path);

/**
 * Disable all qDebug output while it is alive
 */
class QtDebugSilencer {
public:
    QtDebugSilencer();
    ~QtDebugSilencer();

private:
    QtMessageHandler mOldHandler;
};

// Let Catch know how to print some Qt types
std::ostream& operator<<(std::ostream& ostr, const QString& str);
std::ostream& operator<<(std::ostream& ostr, const QUrl& url);

#endif // TESTUTILS_H