This repository has been archived on 2025-12-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
yachat/qa/guitest/guitest.cpp

25 lines
554 B
C++
Raw Permalink Normal View History

2025-12-25 01:37:49 +05:00
#include <QApplication>
#include <QDebug>
#include <iostream>
#include "guitestmanager.h"
int main(int argc, char** argv)
{
if (argc < 2) {
std::cerr << "Usage: " << argv[0] << " <test>" << std::endl << std::endl;
std::cerr << "The following tests are available: " << std::endl;
foreach(QString test, GUITestManager::instance()->getTestNames()) {
std::cerr << " " << (std::string) test << std::endl;
}
return -1;
}
QApplication a(argc, argv);
if (GUITestManager::instance()->runTest(argv[1])) {
return a.exec();
}
return 0;
}