diff options
author | Ilya Zverev <zverik@textual.ru> | 2015-07-03 13:05:15 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:54:04 +0300 |
commit | 86c816063dda880e28120e91f723243da29ad79b (patch) | |
tree | 208af4fafb910b5ce6f70d159880726477eb05a3 /testing | |
parent | e6dd2783a9023c2321b2f91c0ed95da99549a8ff (diff) |
[testing] Style fixes for comments
Diffstat (limited to 'testing')
-rw-r--r-- | testing/testing.hpp | 17 | ||||
-rw-r--r-- | testing/testingmain.cpp | 30 |
2 files changed, 25 insertions, 22 deletions
diff --git a/testing/testing.hpp b/testing/testing.hpp index ef34611b89..37d33427d0 100644 --- a/testing/testing.hpp +++ b/testing/testing.hpp @@ -30,15 +30,18 @@ namespace my // This struct contains parsed command line options. It may contain pointers to argc contents. struct CommandLineOptions { - CommandLineOptions() : filterRegExp(nullptr), suppressRegExp(nullptr), - dataPath(nullptr), resourcePath(nullptr), help(false) {} + CommandLineOptions() + : m_filterRegExp(nullptr), m_suppressRegExp(nullptr), + m_dataPath(nullptr), m_resourcePath(nullptr), m_help(false) + { + } - char const * filterRegExp; - char const * suppressRegExp; - char const * dataPath; - char const * resourcePath; + char const * m_filterRegExp; + char const * m_suppressRegExp; + char const * m_dataPath; + char const * m_resourcePath; - bool help; + bool m_help; }; CommandLineOptions const & GetTestingOptions(); diff --git a/testing/testingmain.cpp b/testing/testingmain.cpp index c57b7e50c5..845fd38a4f 100644 --- a/testing/testingmain.cpp +++ b/testing/testingmain.cpp @@ -28,11 +28,11 @@ #endif #endif -CommandLineOptions testingOptions; +CommandLineOptions g_testingOptions; CommandLineOptions const & GetTestingOptions() { - return testingOptions; + return g_testingOptions; } namespace @@ -84,15 +84,15 @@ void ParseOptions(int argc, char * argv[], CommandLineOptions & options) { char const * const arg = argv[i]; if (strings::StartsWith(arg, kFilterOption)) - options.filterRegExp = arg + sizeof(kFilterOption) - 1; + options.m_filterRegExp = arg + sizeof(kFilterOption) - 1; if (strings::StartsWith(arg, kSuppressOption)) - options.suppressRegExp = arg + sizeof(kSuppressOption) - 1; + options.m_suppressRegExp = arg + sizeof(kSuppressOption) - 1; if (strings::StartsWith(arg, kDataPathOptions)) - options.dataPath = arg + sizeof(kDataPathOptions) - 1; + options.m_dataPath = arg + sizeof(kDataPathOptions) - 1; if (strings::StartsWith(arg, kResourcePathOptions)) - options.resourcePath = arg + sizeof(kResourcePathOptions) - 1; + options.m_resourcePath = arg + sizeof(kResourcePathOptions) - 1; if (strcmp(arg, kHelpOption) == 0) - options.help = true; + options.m_help = true; } } } // namespace @@ -116,20 +116,20 @@ int main(int argc, char * argv[]) vector<bool> testResults; int numFailedTests = 0; - ParseOptions(argc, argv, testingOptions); - if (testingOptions.help) + ParseOptions(argc, argv, g_testingOptions); + if (g_testingOptions.m_help) { Usage(argv[0]); return STATUS_SUCCESS; } regexp::RegExpT filterRegExp; - if (testingOptions.filterRegExp) - regexp::Create(testingOptions.filterRegExp, filterRegExp); + if (g_testingOptions.m_filterRegExp) + regexp::Create(g_testingOptions.m_filterRegExp, filterRegExp); regexp::RegExpT suppressRegExp; - if (testingOptions.suppressRegExp) - regexp::Create(testingOptions.suppressRegExp, suppressRegExp); + if (g_testingOptions.m_suppressRegExp) + regexp::Create(g_testingOptions.m_suppressRegExp, suppressRegExp); for (TestRegister * pTest = TestRegister::FirstRegister(); pTest; pTest = pTest->m_pNext) { @@ -148,9 +148,9 @@ int main(int argc, char * argv[]) int iTest = 0; for (TestRegister * pTest = TestRegister::FirstRegister(); pTest; ++iTest, pTest = pTest->m_pNext) { - if (testingOptions.filterRegExp && !regexp::Matches(testNames[iTest], filterRegExp)) + if (g_testingOptions.m_filterRegExp && !regexp::Matches(testNames[iTest], filterRegExp)) continue; - if (testingOptions.suppressRegExp && regexp::Matches(testNames[iTest], suppressRegExp)) + if (g_testingOptions.m_suppressRegExp && regexp::Matches(testNames[iTest], suppressRegExp)) continue; cerr << "Running " << testNames[iTest] << endl; |