mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
CTest: Simplify some boolean conditions
Directly compare two boolean values instead of spelling out accepted combinations. Issue: #19610
This commit is contained in:
@@ -148,8 +148,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
|
|||||||
this->TestResult.CompletionStatus = s.str();
|
this->TestResult.CompletionStatus = s.str();
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Skipped ");
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Skipped ");
|
||||||
skipped = true;
|
skipped = true;
|
||||||
} else if ((success && !this->TestProperties->WillFail) ||
|
} else if (success != this->TestProperties->WillFail) {
|
||||||
(!success && this->TestProperties->WillFail)) {
|
|
||||||
this->TestResult.Status = cmCTestTestHandler::COMPLETED;
|
this->TestResult.Status = cmCTestTestHandler::COMPLETED;
|
||||||
outputStream << " Passed ";
|
outputStream << " Passed ";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -700,8 +700,7 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
|
|||||||
}
|
}
|
||||||
// if we are doing sub projects and this label is one, then use it
|
// if we are doing sub projects and this label is one, then use it
|
||||||
// if we are not doing sub projects and the label is not one use it
|
// if we are not doing sub projects and the label is not one use it
|
||||||
if ((doSubProject && isSubprojectLabel) ||
|
if (doSubProject == isSubprojectLabel) {
|
||||||
(!doSubProject && !isSubprojectLabel)) {
|
|
||||||
if (l.size() > maxlen) {
|
if (l.size() > maxlen) {
|
||||||
maxlen = l.size();
|
maxlen = l.size();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user