From 796b5be286a713d9e42f2363a3cdfcf0bdf5dafd Mon Sep 17 00:00:00 2001 From: jonawals Date: Mon, 7 Jun 2021 15:32:17 +0100 Subject: [PATCH] Address PR comments --- .../Source/TestImpactConsoleTestSequenceEventHandler.cpp | 8 ++++---- .../Source/TestImpactConsoleTestSequenceEventHandler.h | 2 +- .../Console/Static/Code/Source/TestImpactConsoleUtils.cpp | 8 ++++---- .../Console/Static/Code/Source/TestImpactConsoleUtils.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleTestSequenceEventHandler.cpp b/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleTestSequenceEventHandler.cpp index 8595fc0683..0a745514a5 100644 --- a/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleTestSequenceEventHandler.cpp +++ b/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleTestSequenceEventHandler.cpp @@ -40,10 +40,10 @@ namespace TestImpact { std::cout << "Sequence completed in " << (duration.count() / 1000.f) << "s with"; - if (failureReport.GetExecutionFailures().size() || - failureReport.GetTestRunFailures().size() || - failureReport.GetTimedOutTests().size() || - failureReport.GetUnexecutedTests().size()) + if (!failureReport.GetExecutionFailures().empty() || + !failureReport.GetTestRunFailures().empty() || + !failureReport.GetTimedOutTests().empty() || + !failureReport.GetUnexecutedTests().empty()) { std::cout << ":\n"; std::cout << SetColor(Foreground::White, Background::Red).c_str() diff --git a/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleTestSequenceEventHandler.h b/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleTestSequenceEventHandler.h index 01f59b2c64..ee5eee0bf8 100644 --- a/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleTestSequenceEventHandler.h +++ b/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleTestSequenceEventHandler.h @@ -29,7 +29,7 @@ namespace TestImpact class TestSequenceEventHandler { public: - TestSequenceEventHandler(SuiteType suiteFilter); + explicit TestSequenceEventHandler(SuiteType suiteFilter); //! TestSequenceStartCallback. void operator()(Client::TestRunSelection&& selectedTests); diff --git a/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleUtils.cpp b/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleUtils.cpp index e00a766eb5..76ce830371 100644 --- a/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleUtils.cpp +++ b/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleUtils.cpp @@ -16,14 +16,14 @@ namespace TestImpact { namespace Console { - AZStd::string SetColor(Foreground fgd, Background bgd) + AZStd::string SetColor(Foreground foreground, Background background) { - return AZStd::string::format("\033[%u;%um", static_cast(fgd), static_cast(bgd)); + return AZStd::string::format("\033[%u;%um", aznumeric_cast(foreground), aznumeric_cast(background)); } - AZStd::string SetColorForString(Foreground fgd, Background bgd, const AZStd::string& str) + AZStd::string SetColorForString(Foreground foreground, Background background, const AZStd::string& str) { - return AZStd::string::format("%s%s%s", SetColor(fgd, bgd).c_str(), str.c_str(), ResetColor().c_str()); + return AZStd::string::format("%s%s%s", SetColor(foreground, background).c_str(), str.c_str(), ResetColor().c_str()); } AZStd::string ResetColor() diff --git a/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleUtils.h b/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleUtils.h index d0fc2495d3..a003e2db26 100644 --- a/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleUtils.h +++ b/Code/Tools/TestImpactFramework/Frontend/Console/Static/Code/Source/TestImpactConsoleUtils.h @@ -45,10 +45,10 @@ namespace TestImpact }; //! Returns a string to be used to set the specified foreground and background color. - AZStd::string SetColor(Foreground fgd, Background bgd); + AZStd::string SetColor(Foreground foreground, Background background); //! Returns a string with the specified string set to the specified foreground and background color followed by a color reset. - AZStd::string SetColorForString(Foreground fgd, Background bgd, const AZStd::string& str); + AZStd::string SetColorForString(Foreground foreground, Background background, const AZStd::string& str); //! Returns a string to be used to reset the color back to white foreground on black background. AZStd::string ResetColor();