Some test madness

This commit is contained in:
Petr Mrázek
2013-12-17 02:09:58 +01:00
parent 20e86801b3
commit d6c71488b3
22 changed files with 457 additions and 201 deletions

View File

@ -77,6 +77,15 @@ void DebugOutputDestination::write(const QString &message)
QsDebugOutput::output(message);
}
class QDebugDestination : public Destination
{
public:
virtual void write(const QString &message)
{
qDebug() << message;
};
};
DestinationPtr DestinationFactory::MakeFileDestination(const QString &filePath)
{
return DestinationPtr(new FileDestination(filePath));
@ -87,4 +96,9 @@ DestinationPtr DestinationFactory::MakeDebugOutputDestination()
return DestinationPtr(new DebugOutputDestination);
}
DestinationPtr DestinationFactory::MakeQDebugDestination()
{
return DestinationPtr(new QDebugDestination);
}
} // end namespace

View File

@ -47,6 +47,7 @@ class DestinationFactory
public:
static DestinationPtr MakeFileDestination(const QString &filePath);
static DestinationPtr MakeDebugOutputDestination();
static DestinationPtr MakeQDebugDestination();
};
} // end namespace