summaryrefslogtreecommitdiff
path: root/cli-tests/specifier/driver.cxx
blob: 15b96958d24d46b20dc918a3fd7fbae1bed11ee6 (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
30
31
// file      : specifier/driver.cxx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// license   : MIT; see accompanying LICENSE file

// Test specifier functions.
//

#include <string>

#include "test.hxx"

#undef NDEBUG
#include <cassert>

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 ());
}