mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-16 02:45:06 +02:00
Reformatting per coding standard.
This commit is contained in:
parent
8c1a4e058e
commit
5806605439
6 changed files with 31 additions and 45 deletions
|
@ -39,8 +39,7 @@ bool Test::compareImageLists(QStringList expectedImages, QStringList resultImage
|
|||
double similarityIndex; // in [-1.0 .. 1.0], where 1.0 means images are identical
|
||||
try {
|
||||
similarityIndex = imageComparer.compareImages(resultImage, expectedImage);
|
||||
}
|
||||
catch (...) {
|
||||
} catch (...) {
|
||||
messageBox.critical(0, "Internal error", "Image not in expected format");
|
||||
exit(-1);
|
||||
}
|
||||
|
@ -56,17 +55,18 @@ bool Test::compareImageLists(QStringList expectedImages, QStringList resultImage
|
|||
mismatchWindow.exec();
|
||||
|
||||
switch (mismatchWindow.getUserResponse()) {
|
||||
case USER_RESPONSE_PASS:
|
||||
break;
|
||||
case USE_RESPONSE_FAIL:
|
||||
success = false;
|
||||
break;
|
||||
case USER_RESPONSE_ABORT:
|
||||
keepOn = false;
|
||||
success = false;
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
case USER_RESPONSE_PASS:
|
||||
break;
|
||||
case USE_RESPONSE_FAIL:
|
||||
success = false;
|
||||
break;
|
||||
case USER_RESPONSE_ABORT:
|
||||
keepOn = false;
|
||||
success = false;
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
|
||||
class TestFailure {
|
||||
public:
|
||||
TestFailure(float error, QString pathname, QString expectedImageFilename, QString actualImageFilename) {
|
||||
_error = error;
|
||||
_pathname = pathname;
|
||||
_expectedImageFilename = expectedImageFilename;
|
||||
_actualImageFilename = actualImageFilename;
|
||||
}
|
||||
TestFailure(float error, QString pathname, QString expectedImageFilename, QString actualImageFilename) :
|
||||
_error(error),
|
||||
_pathname(pathname),
|
||||
_expectedImageFilename(expectedImageFilename),
|
||||
_actualImageFilename(actualImageFilename)
|
||||
{}
|
||||
|
||||
double _error;
|
||||
QString _pathname;
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
#include <QtWidgets/QApplication>
|
||||
#include "ui/AutoTester.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int main(int argc, char *argv[]) {
|
||||
QApplication application(argc, argv);
|
||||
|
||||
AutoTester autoTester;
|
||||
|
|
|
@ -10,33 +10,26 @@
|
|||
//
|
||||
#include "AutoTester.h"
|
||||
|
||||
AutoTester::AutoTester(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
{
|
||||
AutoTester::AutoTester(QWidget *parent) : QMainWindow(parent) {
|
||||
ui.setupUi(this);
|
||||
}
|
||||
|
||||
void AutoTester::on_evaluateTestsButton_clicked()
|
||||
{
|
||||
void AutoTester::on_evaluateTestsButton_clicked() {
|
||||
test.evaluateTests();
|
||||
}
|
||||
|
||||
void AutoTester::on_evaluateTestsRecursivelyButton_clicked()
|
||||
{
|
||||
void AutoTester::on_evaluateTestsRecursivelyButton_clicked() {
|
||||
test.evaluateTestsRecursively();
|
||||
}
|
||||
|
||||
void AutoTester::on_createRecursiveScriptButton_clicked()
|
||||
{
|
||||
void AutoTester::on_createRecursiveScriptButton_clicked() {
|
||||
test.createRecursiveScript();
|
||||
}
|
||||
|
||||
void AutoTester::on_createTestButton_clicked()
|
||||
{
|
||||
void AutoTester::on_createTestButton_clicked() {
|
||||
test.createTest();
|
||||
}
|
||||
|
||||
void AutoTester::on_closeButton_clicked()
|
||||
{
|
||||
void AutoTester::on_closeButton_clicked() {
|
||||
exit(0);
|
||||
}
|
|
@ -15,8 +15,7 @@
|
|||
#include "ui_AutoTester.h"
|
||||
#include "../Test.h"
|
||||
|
||||
class AutoTester : public QMainWindow
|
||||
{
|
||||
class AutoTester : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
|
||||
#include <QtCore/QFileInfo>
|
||||
|
||||
MismatchWindow::MismatchWindow(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
MismatchWindow::MismatchWindow(QWidget *parent) : QDialog(parent) {
|
||||
setupUi(this);
|
||||
|
||||
expectedImage->setScaledContents(true);
|
||||
|
@ -32,20 +30,17 @@ void MismatchWindow::setTestFailure(TestFailure testFailure) {
|
|||
resultImage->setPixmap(QPixmap(testFailure._pathname + testFailure._actualImageFilename));
|
||||
}
|
||||
|
||||
void MismatchWindow::on_passTestButton_clicked()
|
||||
{
|
||||
void MismatchWindow::on_passTestButton_clicked() {
|
||||
_userResponse = USER_RESPONSE_PASS;
|
||||
close();
|
||||
}
|
||||
|
||||
void MismatchWindow::on_failTestButton_clicked()
|
||||
{
|
||||
void MismatchWindow::on_failTestButton_clicked() {
|
||||
_userResponse = USE_RESPONSE_FAIL;
|
||||
close();
|
||||
}
|
||||
|
||||
void MismatchWindow::on_abortTestsButton_clicked()
|
||||
{
|
||||
void MismatchWindow::on_abortTestsButton_clicked() {
|
||||
_userResponse = USER_RESPONSE_ABORT;
|
||||
close();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue