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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
// Copyright (c) 2001-2010 Hartmut Kaiser
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/config/warning_disable.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/spirit/include/karma_char.hpp>
#include <boost/spirit/include/karma_string.hpp>
#include <boost/spirit/include/karma_generate.hpp>
#include <boost/spirit/include/karma_directive.hpp>
#include "test.hpp"
using namespace spirit_test;
///////////////////////////////////////////////////////////////////////////////
int
main()
{
using namespace boost::spirit;
{
using namespace boost::spirit::ascii;
BOOST_TEST(test("x", lower['X']));
BOOST_TEST(test("x", lower['x']));
BOOST_TEST(test("x", lower[char_], 'X'));
BOOST_TEST(test("x", lower[char_], 'x'));
BOOST_TEST(test("x", lower[char_('X')]));
BOOST_TEST(test("x", lower[char_('x')]));
BOOST_TEST(test(" ", lower[space]));
BOOST_TEST(test("\t", lower[space], '\t'));
BOOST_TEST(test("x", lower[lower['X']]));
BOOST_TEST(test("x", lower[lower['x']]));
BOOST_TEST(test("x", lower[lower[char_]], 'X'));
BOOST_TEST(test("x", lower[lower[char_]], 'x'));
BOOST_TEST(test("x", lower[lower[char_('X')]]));
BOOST_TEST(test("x", lower[lower[char_('x')]]));
BOOST_TEST(test(" ", lower[lower[space]]));
BOOST_TEST(test("\t", lower[lower[space]], '\t'));
BOOST_TEST(test("X", upper[lower['X']]));
BOOST_TEST(test("X", upper[lower['x']]));
BOOST_TEST(test("X", upper[lower[char_]], 'X'));
BOOST_TEST(test("X", upper[lower[char_]], 'x'));
BOOST_TEST(test("X", upper[lower[char_('X')]]));
BOOST_TEST(test("X", upper[lower[char_('x')]]));
BOOST_TEST(test(" ", upper[lower[space]]));
BOOST_TEST(test("\t", upper[lower[space]], '\t'));
BOOST_TEST(test("X", upper['X']));
BOOST_TEST(test("X", upper['x']));
BOOST_TEST(test("X", upper[char_], 'X'));
BOOST_TEST(test("X", upper[char_], 'x'));
BOOST_TEST(test("X", upper[char_('X')]));
BOOST_TEST(test("X", upper[char_('x')]));
BOOST_TEST(test(" ", upper[space]));
BOOST_TEST(test("\t", upper[space], '\t'));
BOOST_TEST(test("x", lower[upper['X']]));
BOOST_TEST(test("x", lower[upper['x']]));
BOOST_TEST(test("x", lower[upper[char_]], 'X'));
BOOST_TEST(test("x", lower[upper[char_]], 'x'));
BOOST_TEST(test("x", lower[upper[char_('X')]]));
BOOST_TEST(test("x", lower[upper[char_('x')]]));
BOOST_TEST(test(" ", lower[upper[space]]));
BOOST_TEST(test("\t", lower[upper[space]], '\t'));
BOOST_TEST(test("X", upper[upper['X']]));
BOOST_TEST(test("X", upper[upper['x']]));
BOOST_TEST(test("X", upper[upper[char_]], 'X'));
BOOST_TEST(test("X", upper[upper[char_]], 'x'));
BOOST_TEST(test("X", upper[upper[char_('X')]]));
BOOST_TEST(test("X", upper[upper[char_('x')]]));
BOOST_TEST(test(" ", upper[upper[space]]));
BOOST_TEST(test("\t", upper[upper[space]], '\t'));
}
return boost::report_errors();
}
|