]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/wave/test/testwave/testfiles/t_5_014.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / wave / test / testwave / testfiles / t_5_014.cpp
1 /*=============================================================================
2 Boost.Wave: A Standard compliant C++ preprocessor library
3 http://www.boost.org/
4
5 Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
6 Software License, Version 1.0. (See accompanying file
7 LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
9 The tests included in this file were initially taken from the mcpp V2.5
10 preprocessor validation suite and were modified to fit into the Boost.Wave
11 unit test requirements.
12 The original files of the mcpp preprocessor are distributed under the
13 license reproduced at the end of this file.
14 =============================================================================*/
15
16 // Tests integer preprocessing number token and type of #if expression.
17
18 // 12.1:
19 //R #line 24 "t_5_014.cpp"
20 //R true
21 #if __TESTWAVE_LONG_MAX__ <= __TESTWAVE_LONG_MIN__
22 "Bad evaluation of long."
23 #else
24 true
25 #endif
26
27 //R #line 32 "t_5_014.cpp"
28 //R true
29 #if __TESTWAVE_LONG_MAX__ <= (__TESTWAVE_LONG_MAX__ / 2) /* 0x3FFFFFFF */
30 "Bad evaluation of long."
31 #else
32 true
33 #endif
34
35 // 12.2:
36 //R #line 41 "t_5_014.cpp"
37 //R true
38 #if __TESTWAVE_ULONG_MAX__ / 2 < __TESTWAVE_LONG_MAX__
39 "Bad evaluation of unsigned long."
40 #else
41 true
42 #endif
43
44 // 12.3: Octal number.
45 //R #line 50 "t_5_014.cpp"
46 //R true
47 #if 0177777 != 65535
48 "Bad evaluation of octal number."
49 #else
50 true
51 #endif
52
53 // 12.4: Hexadecimal number.
54 //R #line 59 "t_5_014.cpp"
55 //R true
56 #if 0Xffff != 65535 || 0xFfFf != 65535
57 "Bad evaluation of hexadecimal number."
58 #else
59 true
60 #endif
61
62 // 12.5: Suffix 'L' or 'l'.
63 //R #line 68 "t_5_014.cpp"
64 //R true
65 #if 0L != 0 || 0l != 0
66 "Bad evaluation of 'L' suffix."
67 #else
68 true
69 #endif
70
71 // 12.6: Suffix 'U' or 'u'.
72 //R #line 77 "t_5_014.cpp"
73 //R true
74 #if 1U != 1 || 1u != 1
75 "Bad evaluation of 'U' suffix."
76 #else
77 true
78 #endif
79
80 // 12.7: Negative integer.
81 //R #line 86 "t_5_014.cpp"
82 //R true
83 #if 0 <= -1
84 "Bad evaluation of negative number."
85 #else
86 true
87 #endif
88
89 /*-
90 * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui <kmatsui@t3.rim.or.jp>
91 * All rights reserved.
92 *
93 * Redistribution and use in source and binary forms, with or without
94 * modification, are permitted provided that the following conditions
95 * are met:
96 * 1. Redistributions of source code must retain the above copyright
97 * notice, this list of conditions and the following disclaimer.
98 * 2. Redistributions in binary form must reproduce the above copyright
99 * notice, this list of conditions and the following disclaimer in the
100 * documentation and/or other materials provided with the distribution.
101 *
102 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
103 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
104 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
105 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
106 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
107 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
108 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
109 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
110 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
111 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
112 * SUCH DAMAGE.
113 */
114