summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.h
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 14:34:04 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-16 20:05:19 (GMT)
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Source/CTest/cmCTestRunTest.h
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadCMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
Diffstat (limited to 'Source/CTest/cmCTestRunTest.h')
-rw-r--r--Source/CTest/cmCTestRunTest.h62
1 files changed, 33 insertions, 29 deletions
diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h
index 5f3467a..3dcc026 100644
--- a/Source/CTest/cmCTestRunTest.h
+++ b/Source/CTest/cmCTestRunTest.h
@@ -27,13 +27,17 @@ public:
cmCTestRunTest(cmCTestTestHandler* handler);
~cmCTestRunTest();
- void SetNumberOfRuns(int n) {this->NumberOfRunsLeft = n;}
- void SetRunUntilFailOn() { this->RunUntilFail = true;}
- void SetTestProperties(cmCTestTestHandler::cmCTestTestProperties * prop)
- { this->TestProperties = prop; }
-
- cmCTestTestHandler::cmCTestTestProperties * GetTestProperties()
- { return this->TestProperties; }
+ void SetNumberOfRuns(int n) { this->NumberOfRunsLeft = n; }
+ void SetRunUntilFailOn() { this->RunUntilFail = true; }
+ void SetTestProperties(cmCTestTestHandler::cmCTestTestProperties* prop)
+ {
+ this->TestProperties = prop;
+ }
+
+ cmCTestTestHandler::cmCTestTestProperties* GetTestProperties()
+ {
+ return this->TestProperties;
+ }
void SetIndex(int i) { this->Index = i; }
@@ -44,7 +48,9 @@ public:
bool IsStopTimePassed() { return this->StopTimePassed; }
cmCTestTestHandler::cmCTestTestResult GetTestResults()
- { return this->TestResult; }
+ {
+ return this->TestResult;
+ }
// Read and store output. Returns true if it must be called again.
bool CheckOutput();
@@ -52,16 +58,17 @@ public:
// Compresses the output, writing to CompressedOutput
void CompressOutput();
- //launch the test process, return whether it started correctly
+ // launch the test process, return whether it started correctly
bool StartTest(size_t total);
- //capture and report the test results
+ // capture and report the test results
bool EndTest(size_t completed, size_t total, bool started);
- //Called by ctest -N to log the command string
+ // Called by ctest -N to log the command string
void ComputeArguments();
void ComputeWeightedCost();
bool StartAgain();
+
private:
bool NeedsToRerun();
void DartProcessing();
@@ -71,18 +78,18 @@ private:
bool ForkProcess(double testTimeOut, bool explicitTimeout,
std::vector<std::string>* environment);
void WriteLogOutputTop(size_t completed, size_t total);
- //Run post processing of the process output for MemCheck
+ // Run post processing of the process output for MemCheck
void MemCheckPostProcess();
- cmCTestTestHandler::cmCTestTestProperties * TestProperties;
- //Pointer back to the "parent"; the handler that invoked this test run
- cmCTestTestHandler * TestHandler;
- cmCTest * CTest;
- cmProcess * TestProcess;
- //If the executable to run is ctest, don't create a new process;
- //just instantiate a new cmTest. (Can be disabled for a single test
- //if this option is set to false.)
- //bool OptimizeForCTest;
+ cmCTestTestHandler::cmCTestTestProperties* TestProperties;
+ // Pointer back to the "parent"; the handler that invoked this test run
+ cmCTestTestHandler* TestHandler;
+ cmCTest* CTest;
+ cmProcess* TestProcess;
+ // If the executable to run is ctest, don't create a new process;
+ // just instantiate a new cmTest. (Can be disabled for a single test
+ // if this option is set to false.)
+ // bool OptimizeForCTest;
bool UsePrefixCommand;
std::string PrefixCommand;
@@ -90,7 +97,7 @@ private:
std::string ProcessOutput;
std::string CompressedOutput;
double CompressionRatio;
- //The test results
+ // The test results
cmCTestTestHandler::cmCTestTestResult TestResult;
int Index;
std::string StartTime;
@@ -106,16 +113,13 @@ private:
inline int getNumWidth(size_t n)
{
int numWidth = 1;
- if(n >= 10)
- {
+ if (n >= 10) {
numWidth = 2;
- }
- if(n >= 100)
- {
+ }
+ if (n >= 100) {
numWidth = 3;
- }
+ }
return numWidth;
}
#endif
-