t_5_035.cpp 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. http://www.boost.org/
  4. Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
  5. Software License, Version 1.0. (See accompanying file
  6. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. The tests included in this file were initially taken from the mcpp V2.5
  8. preprocessor validation suite and were modified to fit into the Boost.Wave
  9. unit test requirements.
  10. The original files of the mcpp preprocessor are distributed under the
  11. license reproduced at the end of this file.
  12. =============================================================================*/
  13. // Tests translation limits.
  14. #define ABCDEFGHIJKLMNOPQRSTUVWXYZabcde 0
  15. #define ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_ 1
  16. // 37.1: Number of parameters in macro: at least 31.
  17. #define GLUE31(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E) \
  18. a##b##c##d##e##f##g##h##i##j##k##l##m##n##o##p##q##r##s##t##u##v##w##x##y##z##A##B##C##D##E
  19. // 37.2: Number of arguments in macro call: at least 31.
  20. //R #line 28 "t_5_035.cpp"
  21. //R 0
  22. GLUE31( A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R,
  23. S, T, U, V, W, X, Y, Z, a, b, c, d, e)
  24. // 37.3: Significant initial characters in an internal identifier or
  25. // macro name: at least 31.
  26. //R #line 34 "t_5_035.cpp"
  27. ABCDEFGHIJKLMNOPQRSTUVWXYZabcd_ //R 1
  28. // 37.4: Nested conditional inclusion: at least 8 levels.
  29. //R #line 65 "t_5_035.cpp"
  30. #define NEST 0
  31. #ifdef A
  32. #else
  33. # ifdef B
  34. # else
  35. # ifdef C
  36. # else
  37. # ifdef D
  38. # else
  39. # ifdef E
  40. # else
  41. # ifdef F
  42. # else
  43. # ifdef G
  44. # else
  45. # ifdef H
  46. # else
  47. #undef NEST
  48. #define NEST 1
  49. # endif
  50. # endif
  51. # endif
  52. # endif
  53. # endif
  54. # endif
  55. # endif
  56. #endif
  57. NEST //R 1
  58. // 37.5: Nested source file inclusion: at least 8 levels.
  59. //R #line 70 "t_5_035.cpp"
  60. #include "t_5_035_01.hpp"
  61. NEST //R 8
  62. // 37.6: Parenthesized expression: at least 32 levels.
  63. //R #line 81 "t_5_035.cpp"
  64. #if 0 + (1 - (2 + (3 - (4 + (5 - (6 + (7 - (8 + (9 - (10 + (11 - (12 + \
  65. (13 - (14 + (15 - (16 + (17 - (18 + (19 - (20 + (21 - (22 + (23 - \
  66. (24 + (25 - (26 + (27 - (28 + (29 - (30 + (31 - (32 + 0)))))))))) \
  67. )))))))))))))))))))))) == 0
  68. #undef NEST
  69. #define NEST 32
  70. #endif
  71. NEST //R 32
  72. // 37.7: Characters in a string (after concatenation): at least 509.
  73. //R #line 86 "t_5_035.cpp"
  74. //R "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567"
  75. "123456789012345678901234567890123456789012345678901234567890123456789\
  76. 0123456789012345678901234567890123456789012345678901234567890123456789\
  77. 0123456789012345678901234567890123456789012345678901234567890123456789\
  78. 0123456789012345678901234567890123456789012345678901234567890123456789\
  79. 0123456789012345678901234567890123456789012345678901234567890123456789\
  80. 0123456789012345678901234567890123456789012345678901234567890123456789\
  81. 0123456789012345678901234567890123456789012345678901234567890123456789\
  82. 012345678901234567"
  83. // 37.8: Characters in a logical source line: at least 509.
  84. //R #line 98 "t_5_035.cpp"
  85. //R 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
  86. 123456789012345678901234567890123456789012345678901234567890123456789\
  87. 0123456789012345678901234567890123456789012345678901234567890123456789\
  88. 0123456789012345678901234567890123456789012345678901234567890123456789\
  89. 0123456789012345678901234567890123456789012345678901234567890123456789\
  90. 0123456789012345678901234567890123456789012345678901234567890123456789\
  91. 0123456789012345678901234567890123456789012345678901234567890123456789\
  92. 0123456789012345678901234567890123456789012345678901234567890123456789\
  93. 012345678901234567
  94. // 37.9: Macro definitions: at least 1024.
  95. //R #line 110 "t_5_035.cpp"
  96. #include "t_5_035.hpp"
  97. ZX //R 1
  98. /*-
  99. * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui <kmatsui@t3.rim.or.jp>
  100. * All rights reserved.
  101. *
  102. * Redistribution and use in source and binary forms, with or without
  103. * modification, are permitted provided that the following conditions
  104. * are met:
  105. * 1. Redistributions of source code must retain the above copyright
  106. * notice, this list of conditions and the following disclaimer.
  107. * 2. Redistributions in binary form must reproduce the above copyright
  108. * notice, this list of conditions and the following disclaimer in the
  109. * documentation and/or other materials provided with the distribution.
  110. *
  111. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
  112. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  113. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  114. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
  115. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  116. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  117. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  118. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  119. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  120. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  121. * SUCH DAMAGE.
  122. */