summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2018-11-20 08:13:58 (GMT)
committerBrad King <brad.king@kitware.com>2018-11-21 12:47:40 (GMT)
commitce2570b2071360c0b4bb4cd3c62ed8cccab26513 (patch)
tree22f46c9c76bcf9e37f29c8e9eeb5dcf460fb48c1 /Source/CTest
parent4e0c75b78f5745d1369867f25a46ab7d158b4469 (diff)
downloadCMake-ce2570b2071360c0b4bb4cd3c62ed8cccab26513.zip
CMake-ce2570b2071360c0b4bb4cd3c62ed8cccab26513.tar.gz
CMake-ce2570b2071360c0b4bb4cd3c62ed8cccab26513.tar.bz2
clang-tidy: Enable checks from bugprone set
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 1d938e6..2e1bb0a 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -3,6 +3,7 @@
#include "cmCTestTestHandler.h"
#include <algorithm>
#include <chrono>
+#include <cmath>
#include <cmsys/Base64.h>
#include <cmsys/Directory.hxx>
#include <cmsys/RegularExpression.hxx>
@@ -544,8 +545,7 @@ int cmCTestTestHandler::ProcessHandler()
}
cmCTestLog(this->CTest, HANDLER_OUTPUT,
std::endl
- << passColorCode << static_cast<int>(percent + .5f)
- << "% tests passed"
+ << passColorCode << std::lround(percent) << "% tests passed"
<< this->CTest->GetColorCode(cmCTest::Color::CLEAR_COLOR)
<< ", " << failedColorCode << failed.size() << " tests failed"
<< this->CTest->GetColorCode(cmCTest::Color::CLEAR_COLOR)