Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 53 lines (46 sloc) 1.725 kb
97a68bd Added `check` target.
Pete Johns authored
1 // Cppcheck - A tool for static C/C++ code analysis
ff11ba9 @danmar Updated copyright year to 2015
authored
2 // Copyright (C) 2007-2015 Daniel Marjamäki and Cppcheck team.
97a68bd Added `check` target.
Pete Johns authored
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17 #ifndef OPTIONS_H
18 #define OPTIONS_H
19
20 #include <set>
21 #include <string>
22
a801d31 Added Doxygen commenting, per kimmov's request.
Pete Johns authored
23 /**
24 * @brief Class to parse command-line parameters for ./testrunner .
25 * Has getters for available switches and parameters.
26 * See test/testoptions.cpp for sample usage.
27 */
6f8e42a @danmar changed the astyle formatting flags
authored
28 class options {
97a68bd Added `check` target.
Pete Johns authored
29 public:
a801d31 Added Doxygen commenting, per kimmov's request.
Pete Johns authored
30 /** Call from main() to populate object */
97a68bd Added `check` target.
Pete Johns authored
31 options(int argc, const char* argv[]);
a801d31 Added Doxygen commenting, per kimmov's request.
Pete Johns authored
32 /** Don't print the name of each method being tested. */
97a68bd Added `check` target.
Pete Johns authored
33 bool quiet() const;
a801d31 Added Doxygen commenting, per kimmov's request.
Pete Johns authored
34 /** __FILE__:__LINE__: Error message. Makes it easier for editors to find
35 * failing tests/ */
97a68bd Added `check` target.
Pete Johns authored
36 bool gcc_style_errors() const;
a801d31 Added Doxygen commenting, per kimmov's request.
Pete Johns authored
37 /** Which test should be run. Empty string means 'all tests' */
97a68bd Added `check` target.
Pete Johns authored
38 const std::string& which_test() const;
39
40 private:
41 options();
42 options(const options& non_copy);
43 const options& operator =(const options& non_assign);
44
45 private:
46 std::set<std::string> _options;
eacf74b @edward-san Changed the order of some structures in order to improve, even if for a ...
edward-san authored
47 std::string _which_test;
97a68bd Added `check` target.
Pete Johns authored
48 const bool _gcc_style_errors;
49 const bool _quiet;
50 };
51
52 #endif
Something went wrong with that request. Please try again.