Handle disabled gtests more correctly

Test summary now displays the number of disabled tests instead of having
them printed as loose messages.

Change-Id: I8ea736f789afc7c8ad6101a03fa5ca6428d92744
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
Christian Stenger
2015-12-14 12:48:58 +01:00
parent c8c79c409f
commit ce926564b0
5 changed files with 14 additions and 2 deletions

View File

@@ -344,9 +344,10 @@ void TestOutputReader::processGTestOutput()
description.clear();
} else if (disabledTests.exactMatch(line)) {
auto testResult = new GTestResult();
testResult->setResult(Result::MessageInternal);
testResult->setResult(Result::MessageDisabledTests);
int disabled = disabledTests.cap(1).toInt();
testResult->setDescription(tr("You have %n disabled test(s).", 0, disabled));
testResult->setLine(disabled); // misuse line property to hold number of disabled
testResultCreated(testResult);
description.clear();
}