diff options
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 4 | ||||
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 4 | ||||
-rw-r--r-- | Source/CTest/cmCTestSVN.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 10 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 4 | ||||
-rw-r--r-- | Source/CTest/cmParseCoberturaCoverage.cxx | 4 | ||||
-rw-r--r-- | Source/CTest/cmParseDelphiCoverage.cxx | 3 | ||||
-rw-r--r-- | Source/CTest/cmParseJacocoCoverage.cxx | 2 |
9 files changed, 18 insertions, 17 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 28fc113..1da42d4 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -260,11 +260,11 @@ std::string cmCTestBuildHandler::GetMakeCommand() "MakeCommand:" << makeCommand << "\n", this->Quiet); std::string configType = this->CTest->GetConfigType(); - if (configType == "") { + if (configType.empty()) { configType = this->CTest->GetCTestConfiguration("DefaultCTestConfigurationType"); } - if (configType == "") { + if (configType.empty()) { configType = "Release"; } diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index c853373..6a7bdc0 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -491,7 +491,7 @@ void cmCTestMultiProcessHandler::ReadCostData() } // Next part of the file is the failed tests while (std::getline(fin, line)) { - if (line != "") { + if (!line.empty()) { this->LastTestsFailed.push_back(line); } } diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 56a9cb8..abdb643 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -494,7 +494,7 @@ bool cmCTestRunTest::StartTest(size_t total) } } // log and return if we did not find the executable - if (this->ActualCommand == "") { + if (this->ActualCommand.empty()) { // if the command was not found create a TestResult object // that has that information this->TestProcess = new cmProcess; @@ -595,7 +595,7 @@ double cmCTestRunTest::ResolveTimeout() { double timeout = this->TestProperties->Timeout; - if (this->CTest->GetStopTime() == "") { + if (this->CTest->GetStopTime().empty()) { return timeout; } struct tm* lctime; diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx index 087eb38..ce96224 100644 --- a/Source/CTest/cmCTestSVN.cxx +++ b/Source/CTest/cmCTestSVN.cxx @@ -410,7 +410,7 @@ void cmCTestSVN::DoRevisionSVN(Revision const& revision, // Ignore changes in the old revision for external repositories if (revision.Rev == revision.SVNInfo->OldRevision && - revision.SVNInfo->LocalPath != "") { + !revision.SVNInfo->LocalPath.empty()) { return; } diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 137cea9..e51e168 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -496,11 +496,11 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, ? "" : this->GetOption("RetryCount"); - int delay = retryDelay == "" + int delay = retryDelay.empty() ? atoi(this->CTest->GetCTestConfiguration("CTestSubmitRetryDelay") .c_str()) : atoi(retryDelay.c_str()); - int count = retryCount == "" + int count = retryCount.empty() ? atoi(this->CTest->GetCTestConfiguration("CTestSubmitRetryCount") .c_str()) : atoi(retryCount.c_str()); @@ -1032,14 +1032,14 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file, ? "" : this->GetOption("RetryCount"); unsigned long retryDelay = 0; - if (retryDelayString != "") { + if (!retryDelayString.empty()) { if (!cmSystemTools::StringToULong(retryDelayString.c_str(), &retryDelay)) { cmCTestLog(this->CTest, WARNING, "Invalid value for 'RETRY_DELAY' : " << retryDelayString << std::endl); } } unsigned long retryCount = 0; - if (retryCountString != "") { + if (!retryCountString.empty()) { if (!cmSystemTools::StringToULong(retryCountString.c_str(), &retryCount)) { cmCTestLog(this->CTest, WARNING, "Invalid value for 'RETRY_DELAY' : " << retryCountString << std::endl); @@ -1361,7 +1361,7 @@ int cmCTestSubmitHandler::ProcessHandler() std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod")); - if (dropMethod == "" || dropMethod == "ftp") { + if (dropMethod.empty() || dropMethod == "ftp") { ofs << "Using drop method: FTP" << std::endl; cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Using FTP submit method" << std::endl diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index f3404a5..5896014 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1596,7 +1596,7 @@ std::string cmCTestTestHandler::FindExecutable( // wasn't specified if (fullPath.empty() && filepath.empty()) { std::string const path = cmSystemTools::FindProgram(filename.c_str()); - if (path != "") { + if (!path.empty()) { resultingConfig.clear(); return path; } @@ -1802,7 +1802,7 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed() if (fileNameSubstring != pattern) { continue; } - if (logName == "") { + if (logName.empty()) { logName = fileName; } else { // if multiple matching logs were found we use the most recently diff --git a/Source/CTest/cmParseCoberturaCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx index 3e85339..61ce7d4 100644 --- a/Source/CTest/cmParseCoberturaCoverage.cxx +++ b/Source/CTest/cmParseCoberturaCoverage.cxx @@ -78,7 +78,7 @@ protected: } } - if (this->CurFileName == "") { + if (this->CurFileName.empty()) { // Check if this is a path that is relative to our source or // binary directories. for (std::string const& filePath : FilePaths) { @@ -91,7 +91,7 @@ protected: } cmsys::ifstream fin(this->CurFileName.c_str()); - if (this->CurFileName == "" || !fin) { + if (this->CurFileName.empty() || !fin) { this->CurFileName = this->Coverage.BinaryDir + "/" + atts[tagCount + 1]; fin.open(this->CurFileName.c_str()); diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx index 4b781a6..6d82cb2 100644 --- a/Source/CTest/cmParseDelphiCoverage.cxx +++ b/Source/CTest/cmParseDelphiCoverage.cxx @@ -71,7 +71,8 @@ public: } } // Based up what was found, add a line to the coverageVector - if (!beginSet.empty() && line != "" && !blockComFlag && !lineComFlag) { + if (!beginSet.empty() && !line.empty() && !blockComFlag && + !lineComFlag) { coverageVector.push_back(0); } else { coverageVector.push_back(-1); diff --git a/Source/CTest/cmParseJacocoCoverage.cxx b/Source/CTest/cmParseJacocoCoverage.cxx index 56d07e7..7acb5ca 100644 --- a/Source/CTest/cmParseJacocoCoverage.cxx +++ b/Source/CTest/cmParseJacocoCoverage.cxx @@ -36,7 +36,7 @@ protected: } else if (name == "sourcefile") { std::string fileName = atts[1]; - if (this->PackagePath == "") { + if (this->PackagePath.empty()) { if (!this->FindPackagePath(fileName)) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find file: " << this->PackageName << "/" << fileName << std::endl); |