Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
testoption.hpp
Go to the documentation of this file.
1/*
2 TESTOPTION.hpp - handle cmdline for invoking Testsuite
3
4 Copyright (C)
5 2008, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
20#ifndef TESTHELPER_TESTOPTION_H
21#define TESTHELPER_TESTOPTION_H
22
23#include "lib/cmdline.hpp"
24#include "lib/nocopy.hpp"
25
26#include <string>
27#include <iostream>
28#include <optional>
29#include <boost/program_options.hpp>
30#include <boost/utility.hpp>
31
32
33
34namespace test {
35
36 using std::string;
37 using std::ostream;
38
39
40
53 {
54 public:
55 TestOption (lib::Cmdline& cmdline);
56 const string getTestgroup();
57 const string getTestID();
58 bool handleHelpRequest();
59 bool shouldDescribe();
60
61 std::optional<uint64_t> optSeed();
62
63 private:
64 boost::program_options::options_description syntax;
65 boost::program_options::variables_map parameters;
66
67 friend ostream& operator<< (ostream&, const TestOption&);
68 };
69
70
73 ostream& operator<< (ostream& os, const TestOption& to);
74
75
76} // namespace test
77#endif
Abstraction of the usual int argc, int** argv-Commandline, to be able to treat it as a vector of stri...
Definition cmdline.hpp:49
Support for selecting and configuring testcases via commandline arguments.
const string getTestgroup()
std::optional< uint64_t > optSeed()
friend ostream & operator<<(ostream &, const TestOption &)
for outputting the help messages.
bool handleHelpRequest()
handles the –help switch by printing a syntax description
boost::program_options::variables_map parameters
boost::program_options::options_description syntax
const string getTestID()
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
Class to encapsulate the typical C-style commandline definition.
basic_ostream< char, char_traits< char > > ostream
Test runner and basic definitions for tests.
ostream & operator<<(ostream &os, const TestOption &to)
for outputting the help messages.
Mix-Ins to allow or prohibit various degrees of copying and cloning.