Skip to content

Commit

Permalink
fix(mainwindow): use simplified instead of trimmed in diff
Browse files Browse the repository at this point in the history
  • Loading branch information
ouuan committed Dec 13, 2019
1 parent 0b0704f commit 6e32392
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ void MainWindow::firstExecutionFinished(QString Stdout, QString Stderr) {
Log::MessageLogger::error("Runner[1]:[STDERR]", Stderr.toStdString(), true);
if (Stdout.isEmpty() || expected1->isEmpty())
return;
bool isSame = Stdout.trimmed() == expected1->trimmed();
bool isSame = Stdout.simplified() == expected1->simplified();

if (isSame)
updateVerdict(Core::Verdict::ACCEPTED, 1);
Expand All @@ -839,7 +839,7 @@ void MainWindow::secondExecutionFinished(QString Stdout, QString Stderr) {
Log::MessageLogger::error("Runner[2]:[STDERR]", Stderr.toStdString(), true);
if (Stdout.isEmpty() || expected2->isEmpty())
return;
bool isSame = Stdout.trimmed() == expected2->trimmed();
bool isSame = Stdout.simplified() == expected2->simplified();

if (isSame)
updateVerdict(Core::Verdict::ACCEPTED, 2);
Expand All @@ -855,7 +855,7 @@ void MainWindow::thirdExecutionFinished(QString Stdout, QString Stderr) {
Log::MessageLogger::error("Runner[3]:[STDERR]", Stderr.toStdString(), true);
if (Stdout.isEmpty() || expected3->isEmpty())
return;
bool isSame = Stdout.trimmed() == expected3->trimmed();
bool isSame = Stdout.simplified() == expected3->simplified();

if (isSame)
updateVerdict(Core::Verdict::ACCEPTED, 3);
Expand Down

0 comments on commit 6e32392

Please sign in to comment.