#include "problemcasevalidator.h" #include "../utils.h" ProblemCaseValidator::ProblemCaseValidator() { } bool ProblemCaseValidator::validate(POJProblemCase problemCase, bool ignoreSpaces) { if (!problemCase) return false; QStringList output = textToLines(problemCase->output); QStringList expected = textToLines(problemCase->expected); if (output.count()!=expected.count()) return false; for (int i=0;iunicode()!=0) { if (p->isSpace()) { if (!start->isSpace()) { result.append(QString(start,p-start)); } start = p; } else if (start->isSpace()) { start = p; } p++; } if (!start->isSpace()) { result.append(QString(start,p-start)); } return result; }