summaryrefslogtreecommitdiff
path: root/tests/specifier/driver.cxx
blob: 0194bbe94f555e834d9cd60fe6a70cac5ac8d3de (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      : tests/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 ());
}