blob: 50b9cf5a6a831ae1daa63f6ec407c7b02810f9c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// file : specifier/driver.cxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// license : MIT; see accompanying LICENSE file
// Test specifier functions.
//
#include <string>
#include <cassert>
#include "test.hxx"
using namespace std;
int
main (int argc, char* argv[])
{
options o (argc, argv);
assert (o.a ());
assert (o.b () == 1 && !o.b_specified ());
assert (o.c () == "foo" && o.c_specified ());
o.b_specified (true);
o.c_specified (false);
assert (o.b_specified ());
assert (!o.c_specified ());
}
|