File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* *****************************************************************\
2
+
3
+ Module: goto_harness_generator
4
+
5
+ Author: Diffblue Ltd.
6
+
7
+ \******************************************************************/
8
+
9
+ #include " goto_harness_generator.h"
10
+
11
+ #include < list>
12
+ #include < string>
13
+
14
+ #include < util/exception_utils.h>
15
+ #include < util/invariant.h>
16
+
17
+ std::string
18
+ goto_harness_generatort::require_exactly_one_value (const std::string &option,
19
+ const std::list<std::string> &values)
20
+ {
21
+ if (values.size () != 1 )
22
+ {
23
+ throw invalid_command_line_argument_exceptiont{
24
+ " expected exactly one value" ,
25
+ " --" + option
26
+ };
27
+ }
28
+
29
+ return values.front ();
30
+ }
31
+
32
+ void goto_harness_generatort::assert_no_values (const std::string &option,
33
+ const std::list<std::string> &values)
34
+ {
35
+ PRECONDITION_WITH_DIAGNOSTICS (values.empty (),
36
+ option);
37
+ }
You can’t perform that action at this time.
0 commit comments