summaryrefslogtreecommitdiffstats
path: root/tests/specifier/driver.cxx
blob: 1824c8d2c03b18d58125145135b249552255787f (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
// file      : tests/specifier/driver.cxx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// 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 ());
}