1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_codemaker.hxx" 26 27 #include "FILE.hpp" 28 #include "lconv.hpp" 29 #include "tm.hpp" 30 #include "std.hpp" 31 #include "test/codemaker/cppumaker/XTest.hpp" 32 #include "test/codemaker/cppumaker/S1.hpp" 33 #include "test/codemaker/cppumaker/services/asm.hpp" 34 #include "test/codemaker/cppumaker/services/auto.hpp" 35 #include "test/codemaker/cppumaker/services/bool.hpp" 36 #include "test/codemaker/cppumaker/services/break.hpp" 37 //TODO: #include "test/codemaker/cppumaker/services/case.hpp" 38 #include "test/codemaker/cppumaker/services/catch.hpp" 39 //TODO: #include "test/codemaker/cppumaker/services/char.hpp" 40 #include "test/codemaker/cppumaker/services/class.hpp" 41 //TODO: #include "test/codemaker/cppumaker/services/const.hpp" 42 #include "test/codemaker/cppumaker/services/continue.hpp" 43 //TODO: #include "test/codemaker/cppumaker/services/default.hpp" 44 #include "test/codemaker/cppumaker/services/delete.hpp" 45 #include "test/codemaker/cppumaker/services/do.hpp" 46 //TODO: #include "test/codemaker/cppumaker/services/double.hpp" 47 #include "test/codemaker/cppumaker/services/else.hpp" 48 //TODO: #include "test/codemaker/cppumaker/services/enum.hpp" 49 #include "test/codemaker/cppumaker/services/explicit.hpp" 50 #include "test/codemaker/cppumaker/services/export.hpp" 51 #include "test/codemaker/cppumaker/services/extern.hpp" 52 #include "test/codemaker/cppumaker/services/false.hpp" 53 //TODO: #include "test/codemaker/cppumaker/services/float.hpp" 54 #include "test/codemaker/cppumaker/services/for.hpp" 55 #include "test/codemaker/cppumaker/services/friend.hpp" 56 #include "test/codemaker/cppumaker/services/goto.hpp" 57 #include "test/codemaker/cppumaker/services/if.hpp" 58 #include "test/codemaker/cppumaker/services/inline.hpp" 59 #include "test/codemaker/cppumaker/services/int.hpp" 60 //TODO: #include "test/codemaker/cppumaker/services/long.hpp" 61 #include "test/codemaker/cppumaker/services/mutable.hpp" 62 #include "test/codemaker/cppumaker/services/namespace.hpp" 63 #include "test/codemaker/cppumaker/services/new.hpp" 64 #include "test/codemaker/cppumaker/services/operator.hpp" 65 #include "test/codemaker/cppumaker/services/private.hpp" 66 #include "test/codemaker/cppumaker/services/protected.hpp" 67 #include "test/codemaker/cppumaker/services/public.hpp" 68 #include "test/codemaker/cppumaker/services/register.hpp" 69 #include "test/codemaker/cppumaker/services/return.hpp" 70 //TODO: #include "test/codemaker/cppumaker/services/short.hpp" 71 #include "test/codemaker/cppumaker/services/signed.hpp" 72 #include "test/codemaker/cppumaker/services/sizeof.hpp" 73 #include "test/codemaker/cppumaker/services/static.hpp" 74 //TODO: #include "test/codemaker/cppumaker/services/struct.hpp" 75 //TODO: #include "test/codemaker/cppumaker/services/switch.hpp" 76 #include "test/codemaker/cppumaker/services/template.hpp" 77 #include "test/codemaker/cppumaker/services/this.hpp" 78 #include "test/codemaker/cppumaker/services/throw.hpp" 79 #include "test/codemaker/cppumaker/services/true.hpp" 80 #include "test/codemaker/cppumaker/services/try.hpp" 81 //TODO: #include "test/codemaker/cppumaker/services/typedef.hpp" 82 #include "test/codemaker/cppumaker/services/typeid.hpp" 83 #include "test/codemaker/cppumaker/services/typename.hpp" 84 //TODO: #include "test/codemaker/cppumaker/services/union.hpp" 85 //TODO: #include "test/codemaker/cppumaker/services/unsigned.hpp" 86 #include "test/codemaker/cppumaker/services/using.hpp" 87 #include "test/codemaker/cppumaker/services/virtual.hpp" 88 //TODO: #include "test/codemaker/cppumaker/services/void.hpp" 89 #include "test/codemaker/cppumaker/services/volatile.hpp" 90 #include "test/codemaker/cppumaker/services/while.hpp" 91 #include "test/codemaker/cppumaker/services/and.hpp" 92 #include "test/codemaker/cppumaker/services/bitand.hpp" 93 #include "test/codemaker/cppumaker/services/bitor.hpp" 94 #include "test/codemaker/cppumaker/services/compl.hpp" 95 #include "test/codemaker/cppumaker/services/not.hpp" 96 #include "test/codemaker/cppumaker/services/or.hpp" 97 #include "test/codemaker/cppumaker/services/xor.hpp" 98 #include "test/codemaker/cppumaker/services/BUFSIZ.hpp" 99 #include "test/codemaker/cppumaker/services/CLOCKS_PER_SEC.hpp" 100 #include "test/codemaker/cppumaker/services/EDOM.hpp" 101 #include "test/codemaker/cppumaker/services/EOF.hpp" 102 #include "test/codemaker/cppumaker/services/ERANGE.hpp" 103 #include "test/codemaker/cppumaker/services/EXIT_FAILURE.hpp" 104 #include "test/codemaker/cppumaker/services/EXIT_SUCCESS.hpp" 105 #include "test/codemaker/cppumaker/services/FILENAME_MAX.hpp" 106 #include "test/codemaker/cppumaker/services/FOPEN_MAX.hpp" 107 #include "test/codemaker/cppumaker/services/HUGE_VAL.hpp" 108 #include "test/codemaker/cppumaker/services/LC_ALL.hpp" 109 #include "test/codemaker/cppumaker/services/LC_COLLATE.hpp" 110 #include "test/codemaker/cppumaker/services/LC_CTYPE.hpp" 111 #include "test/codemaker/cppumaker/services/LC_MONETARY.hpp" 112 #include "test/codemaker/cppumaker/services/LC_NUMERIC.hpp" 113 #include "test/codemaker/cppumaker/services/LC_TIME.hpp" 114 #include "test/codemaker/cppumaker/services/L_tmpnam.hpp" 115 #include "test/codemaker/cppumaker/services/MB_CUR_MAX.hpp" 116 #include "test/codemaker/cppumaker/services/NULL.hpp" 117 #include "test/codemaker/cppumaker/services/RAND_MAX.hpp" 118 #include "test/codemaker/cppumaker/services/SEEK_CUR.hpp" 119 #include "test/codemaker/cppumaker/services/SEEK_END.hpp" 120 #include "test/codemaker/cppumaker/services/SEEK_SET.hpp" 121 #include "test/codemaker/cppumaker/services/SIGABRT.hpp" 122 #include "test/codemaker/cppumaker/services/SIGFPE.hpp" 123 #include "test/codemaker/cppumaker/services/SIGILL.hpp" 124 #include "test/codemaker/cppumaker/services/SIGINT.hpp" 125 #include "test/codemaker/cppumaker/services/SIGSEGV.hpp" 126 #include "test/codemaker/cppumaker/services/SIGTERM.hpp" 127 #include "test/codemaker/cppumaker/services/SIG_DFL.hpp" 128 #include "test/codemaker/cppumaker/services/SIG_ERR.hpp" 129 #include "test/codemaker/cppumaker/services/SIG_IGN.hpp" 130 #include "test/codemaker/cppumaker/services/TMP_MAX.hpp" 131 #include "test/codemaker/cppumaker/services/WCHAR_MAX.hpp" 132 #include "test/codemaker/cppumaker/services/WCHAR_MIN.hpp" 133 #include "test/codemaker/cppumaker/services/WEOF.hpp" 134 #include "test/codemaker/cppumaker/services/assert.hpp" 135 #include "test/codemaker/cppumaker/services/errno.hpp" 136 #include "test/codemaker/cppumaker/services/offsetof.hpp" 137 #include "test/codemaker/cppumaker/services/setjmp.hpp" 138 #include "test/codemaker/cppumaker/services/stderr.hpp" 139 #include "test/codemaker/cppumaker/services/stdin.hpp" 140 #include "test/codemaker/cppumaker/services/stdout.hpp" 141 #include "test/codemaker/cppumaker/services/CHAR_BIT.hpp" 142 #include "test/codemaker/cppumaker/services/CHAR_MAX.hpp" 143 #include "test/codemaker/cppumaker/services/CHAR_MIN.hpp" 144 #include "test/codemaker/cppumaker/services/DBL_DIG.hpp" 145 #include "test/codemaker/cppumaker/services/DBL_EPSILON.hpp" 146 #include "test/codemaker/cppumaker/services/DBL_MANT_DIG.hpp" 147 #include "test/codemaker/cppumaker/services/DBL_MAX.hpp" 148 #include "test/codemaker/cppumaker/services/DBL_MAX_10_EXP.hpp" 149 #include "test/codemaker/cppumaker/services/DBL_MAX_EXP.hpp" 150 #include "test/codemaker/cppumaker/services/DBL_MIN.hpp" 151 #include "test/codemaker/cppumaker/services/DBL_MIN_10_EXP.hpp" 152 #include "test/codemaker/cppumaker/services/DBL_MIN_EXP.hpp" 153 #include "test/codemaker/cppumaker/services/FLT_DIG.hpp" 154 #include "test/codemaker/cppumaker/services/FLT_EPSILON.hpp" 155 #include "test/codemaker/cppumaker/services/FLT_MANT_DIG.hpp" 156 #include "test/codemaker/cppumaker/services/FLT_MAX.hpp" 157 #include "test/codemaker/cppumaker/services/FLT_MAX_10_EXP.hpp" 158 #include "test/codemaker/cppumaker/services/FLT_MAX_EXP.hpp" 159 #include "test/codemaker/cppumaker/services/FLT_MIN.hpp" 160 #include "test/codemaker/cppumaker/services/FLT_MIN_10_EXP.hpp" 161 #include "test/codemaker/cppumaker/services/FLT_MIN_EXP.hpp" 162 #include "test/codemaker/cppumaker/services/FLT_RADIX.hpp" 163 #include "test/codemaker/cppumaker/services/FLT_ROUNDS.hpp" 164 #include "test/codemaker/cppumaker/services/INT_MAX.hpp" 165 #include "test/codemaker/cppumaker/services/INT_MIN.hpp" 166 #include "test/codemaker/cppumaker/services/LDBL_DIG.hpp" 167 #include "test/codemaker/cppumaker/services/LDBL_EPSILON.hpp" 168 #include "test/codemaker/cppumaker/services/LDBL_MANT_DIG.hpp" 169 #include "test/codemaker/cppumaker/services/LDBL_MAX.hpp" 170 #include "test/codemaker/cppumaker/services/LDBL_MAX_10_EXP.hpp" 171 #include "test/codemaker/cppumaker/services/LDBL_MAX_EXP.hpp" 172 #include "test/codemaker/cppumaker/services/LDBL_MIN.hpp" 173 #include "test/codemaker/cppumaker/services/LDBL_MIN_10_EXP.hpp" 174 #include "test/codemaker/cppumaker/services/LDBL_MIN_EXP.hpp" 175 #include "test/codemaker/cppumaker/services/LONG_MAX.hpp" 176 #include "test/codemaker/cppumaker/services/LONG_MIN.hpp" 177 #include "test/codemaker/cppumaker/services/MB_LEN_MAX.hpp" 178 #include "test/codemaker/cppumaker/services/SCHAR_MAX.hpp" 179 #include "test/codemaker/cppumaker/services/SCHAR_MIN.hpp" 180 #include "test/codemaker/cppumaker/services/SHRT_MAX.hpp" 181 #include "test/codemaker/cppumaker/services/SHRT_MIN.hpp" 182 #include "test/codemaker/cppumaker/services/UCHAR_MAX.hpp" 183 #include "test/codemaker/cppumaker/services/UINT_MAX.hpp" 184 #include "test/codemaker/cppumaker/services/ULONG_MAX.hpp" 185 #include "test/codemaker/cppumaker/services/USHRT_MAX.hpp" 186 #include "test/codemaker/cppumaker/services/FILE.hpp" 187 #include "test/codemaker/cppumaker/services/lconv.hpp" 188 #include "test/codemaker/cppumaker/services/tm.hpp" 189 #include "test/codemaker/cppumaker/services/std.hpp" 190 #include "test/codemaker/cppumaker/services/NDEBUG.hpp" 191 #include "test/codemaker/cppumaker/services/create.hpp" 192 #include "test/codemaker/cppumaker/singletons/asm.hpp" 193 #include "test/codemaker/cppumaker/singletons/auto.hpp" 194 #include "test/codemaker/cppumaker/singletons/bool.hpp" 195 #include "test/codemaker/cppumaker/singletons/break.hpp" 196 //TODO: #include "test/codemaker/cppumaker/singletons/case.hpp" 197 #include "test/codemaker/cppumaker/singletons/catch.hpp" 198 //TODO: #include "test/codemaker/cppumaker/singletons/char.hpp" 199 #include "test/codemaker/cppumaker/singletons/class.hpp" 200 //TODO: #include "test/codemaker/cppumaker/singletons/const.hpp" 201 #include "test/codemaker/cppumaker/singletons/continue.hpp" 202 //TODO: #include "test/codemaker/cppumaker/singletons/default.hpp" 203 #include "test/codemaker/cppumaker/singletons/delete.hpp" 204 #include "test/codemaker/cppumaker/singletons/do.hpp" 205 //TODO: #include "test/codemaker/cppumaker/singletons/double.hpp" 206 #include "test/codemaker/cppumaker/singletons/else.hpp" 207 //TODO: #include "test/codemaker/cppumaker/singletons/enum.hpp" 208 #include "test/codemaker/cppumaker/singletons/explicit.hpp" 209 #include "test/codemaker/cppumaker/singletons/export.hpp" 210 #include "test/codemaker/cppumaker/singletons/extern.hpp" 211 #include "test/codemaker/cppumaker/singletons/false.hpp" 212 //TODO: #include "test/codemaker/cppumaker/singletons/float.hpp" 213 #include "test/codemaker/cppumaker/singletons/for.hpp" 214 #include "test/codemaker/cppumaker/singletons/friend.hpp" 215 #include "test/codemaker/cppumaker/singletons/goto.hpp" 216 #include "test/codemaker/cppumaker/singletons/if.hpp" 217 #include "test/codemaker/cppumaker/singletons/inline.hpp" 218 #include "test/codemaker/cppumaker/singletons/int.hpp" 219 //TODO: #include "test/codemaker/cppumaker/singletons/long.hpp" 220 #include "test/codemaker/cppumaker/singletons/mutable.hpp" 221 #include "test/codemaker/cppumaker/singletons/namespace.hpp" 222 #include "test/codemaker/cppumaker/singletons/new.hpp" 223 #include "test/codemaker/cppumaker/singletons/operator.hpp" 224 #include "test/codemaker/cppumaker/singletons/private.hpp" 225 #include "test/codemaker/cppumaker/singletons/protected.hpp" 226 #include "test/codemaker/cppumaker/singletons/public.hpp" 227 #include "test/codemaker/cppumaker/singletons/register.hpp" 228 #include "test/codemaker/cppumaker/singletons/return.hpp" 229 //TODO: #include "test/codemaker/cppumaker/singletons/short.hpp" 230 #include "test/codemaker/cppumaker/singletons/signed.hpp" 231 #include "test/codemaker/cppumaker/singletons/sizeof.hpp" 232 #include "test/codemaker/cppumaker/singletons/static.hpp" 233 //TODO: #include "test/codemaker/cppumaker/singletons/struct.hpp" 234 //TODO: #include "test/codemaker/cppumaker/singletons/switch.hpp" 235 #include "test/codemaker/cppumaker/singletons/template.hpp" 236 #include "test/codemaker/cppumaker/singletons/this.hpp" 237 #include "test/codemaker/cppumaker/singletons/throw.hpp" 238 #include "test/codemaker/cppumaker/singletons/true.hpp" 239 #include "test/codemaker/cppumaker/singletons/try.hpp" 240 //TODO: #include "test/codemaker/cppumaker/singletons/typedef.hpp" 241 #include "test/codemaker/cppumaker/singletons/typeid.hpp" 242 #include "test/codemaker/cppumaker/singletons/typename.hpp" 243 //TODO: #include "test/codemaker/cppumaker/singletons/union.hpp" 244 //TODO: #include "test/codemaker/cppumaker/singletons/unsigned.hpp" 245 #include "test/codemaker/cppumaker/singletons/using.hpp" 246 #include "test/codemaker/cppumaker/singletons/virtual.hpp" 247 //TODO: #include "test/codemaker/cppumaker/singletons/void.hpp" 248 #include "test/codemaker/cppumaker/singletons/volatile.hpp" 249 #include "test/codemaker/cppumaker/singletons/while.hpp" 250 #include "test/codemaker/cppumaker/singletons/and.hpp" 251 #include "test/codemaker/cppumaker/singletons/bitand.hpp" 252 #include "test/codemaker/cppumaker/singletons/bitor.hpp" 253 #include "test/codemaker/cppumaker/singletons/compl.hpp" 254 #include "test/codemaker/cppumaker/singletons/not.hpp" 255 #include "test/codemaker/cppumaker/singletons/or.hpp" 256 #include "test/codemaker/cppumaker/singletons/xor.hpp" 257 #include "test/codemaker/cppumaker/singletons/BUFSIZ.hpp" 258 #include "test/codemaker/cppumaker/singletons/CLOCKS_PER_SEC.hpp" 259 #include "test/codemaker/cppumaker/singletons/EDOM.hpp" 260 #include "test/codemaker/cppumaker/singletons/EOF.hpp" 261 #include "test/codemaker/cppumaker/singletons/ERANGE.hpp" 262 #include "test/codemaker/cppumaker/singletons/EXIT_FAILURE.hpp" 263 #include "test/codemaker/cppumaker/singletons/EXIT_SUCCESS.hpp" 264 #include "test/codemaker/cppumaker/singletons/FILENAME_MAX.hpp" 265 #include "test/codemaker/cppumaker/singletons/FOPEN_MAX.hpp" 266 #include "test/codemaker/cppumaker/singletons/HUGE_VAL.hpp" 267 #include "test/codemaker/cppumaker/singletons/LC_ALL.hpp" 268 #include "test/codemaker/cppumaker/singletons/LC_COLLATE.hpp" 269 #include "test/codemaker/cppumaker/singletons/LC_CTYPE.hpp" 270 #include "test/codemaker/cppumaker/singletons/LC_MONETARY.hpp" 271 #include "test/codemaker/cppumaker/singletons/LC_NUMERIC.hpp" 272 #include "test/codemaker/cppumaker/singletons/LC_TIME.hpp" 273 #include "test/codemaker/cppumaker/singletons/L_tmpnam.hpp" 274 #include "test/codemaker/cppumaker/singletons/MB_CUR_MAX.hpp" 275 #include "test/codemaker/cppumaker/singletons/NULL.hpp" 276 #include "test/codemaker/cppumaker/singletons/RAND_MAX.hpp" 277 #include "test/codemaker/cppumaker/singletons/SEEK_CUR.hpp" 278 #include "test/codemaker/cppumaker/singletons/SEEK_END.hpp" 279 #include "test/codemaker/cppumaker/singletons/SEEK_SET.hpp" 280 #include "test/codemaker/cppumaker/singletons/SIGABRT.hpp" 281 #include "test/codemaker/cppumaker/singletons/SIGFPE.hpp" 282 #include "test/codemaker/cppumaker/singletons/SIGILL.hpp" 283 #include "test/codemaker/cppumaker/singletons/SIGINT.hpp" 284 #include "test/codemaker/cppumaker/singletons/SIGSEGV.hpp" 285 #include "test/codemaker/cppumaker/singletons/SIGTERM.hpp" 286 #include "test/codemaker/cppumaker/singletons/SIG_DFL.hpp" 287 #include "test/codemaker/cppumaker/singletons/SIG_ERR.hpp" 288 #include "test/codemaker/cppumaker/singletons/SIG_IGN.hpp" 289 #include "test/codemaker/cppumaker/singletons/TMP_MAX.hpp" 290 #include "test/codemaker/cppumaker/singletons/WCHAR_MAX.hpp" 291 #include "test/codemaker/cppumaker/singletons/WCHAR_MIN.hpp" 292 #include "test/codemaker/cppumaker/singletons/WEOF.hpp" 293 #include "test/codemaker/cppumaker/singletons/assert.hpp" 294 #include "test/codemaker/cppumaker/singletons/errno.hpp" 295 #include "test/codemaker/cppumaker/singletons/offsetof.hpp" 296 #include "test/codemaker/cppumaker/singletons/setjmp.hpp" 297 #include "test/codemaker/cppumaker/singletons/stderr.hpp" 298 #include "test/codemaker/cppumaker/singletons/stdin.hpp" 299 #include "test/codemaker/cppumaker/singletons/stdout.hpp" 300 #include "test/codemaker/cppumaker/singletons/CHAR_BIT.hpp" 301 #include "test/codemaker/cppumaker/singletons/CHAR_MAX.hpp" 302 #include "test/codemaker/cppumaker/singletons/CHAR_MIN.hpp" 303 #include "test/codemaker/cppumaker/singletons/DBL_DIG.hpp" 304 #include "test/codemaker/cppumaker/singletons/DBL_EPSILON.hpp" 305 #include "test/codemaker/cppumaker/singletons/DBL_MANT_DIG.hpp" 306 #include "test/codemaker/cppumaker/singletons/DBL_MAX.hpp" 307 #include "test/codemaker/cppumaker/singletons/DBL_MAX_10_EXP.hpp" 308 #include "test/codemaker/cppumaker/singletons/DBL_MAX_EXP.hpp" 309 #include "test/codemaker/cppumaker/singletons/DBL_MIN.hpp" 310 #include "test/codemaker/cppumaker/singletons/DBL_MIN_10_EXP.hpp" 311 #include "test/codemaker/cppumaker/singletons/DBL_MIN_EXP.hpp" 312 #include "test/codemaker/cppumaker/singletons/FLT_DIG.hpp" 313 #include "test/codemaker/cppumaker/singletons/FLT_EPSILON.hpp" 314 #include "test/codemaker/cppumaker/singletons/FLT_MANT_DIG.hpp" 315 #include "test/codemaker/cppumaker/singletons/FLT_MAX.hpp" 316 #include "test/codemaker/cppumaker/singletons/FLT_MAX_10_EXP.hpp" 317 #include "test/codemaker/cppumaker/singletons/FLT_MAX_EXP.hpp" 318 #include "test/codemaker/cppumaker/singletons/FLT_MIN.hpp" 319 #include "test/codemaker/cppumaker/singletons/FLT_MIN_10_EXP.hpp" 320 #include "test/codemaker/cppumaker/singletons/FLT_MIN_EXP.hpp" 321 #include "test/codemaker/cppumaker/singletons/FLT_RADIX.hpp" 322 #include "test/codemaker/cppumaker/singletons/FLT_ROUNDS.hpp" 323 #include "test/codemaker/cppumaker/singletons/INT_MAX.hpp" 324 #include "test/codemaker/cppumaker/singletons/INT_MIN.hpp" 325 #include "test/codemaker/cppumaker/singletons/LDBL_DIG.hpp" 326 #include "test/codemaker/cppumaker/singletons/LDBL_EPSILON.hpp" 327 #include "test/codemaker/cppumaker/singletons/LDBL_MANT_DIG.hpp" 328 #include "test/codemaker/cppumaker/singletons/LDBL_MAX.hpp" 329 #include "test/codemaker/cppumaker/singletons/LDBL_MAX_10_EXP.hpp" 330 #include "test/codemaker/cppumaker/singletons/LDBL_MAX_EXP.hpp" 331 #include "test/codemaker/cppumaker/singletons/LDBL_MIN.hpp" 332 #include "test/codemaker/cppumaker/singletons/LDBL_MIN_10_EXP.hpp" 333 #include "test/codemaker/cppumaker/singletons/LDBL_MIN_EXP.hpp" 334 #include "test/codemaker/cppumaker/singletons/LONG_MAX.hpp" 335 #include "test/codemaker/cppumaker/singletons/LONG_MIN.hpp" 336 #include "test/codemaker/cppumaker/singletons/MB_LEN_MAX.hpp" 337 #include "test/codemaker/cppumaker/singletons/SCHAR_MAX.hpp" 338 #include "test/codemaker/cppumaker/singletons/SCHAR_MIN.hpp" 339 #include "test/codemaker/cppumaker/singletons/SHRT_MAX.hpp" 340 #include "test/codemaker/cppumaker/singletons/SHRT_MIN.hpp" 341 #include "test/codemaker/cppumaker/singletons/UCHAR_MAX.hpp" 342 #include "test/codemaker/cppumaker/singletons/UINT_MAX.hpp" 343 #include "test/codemaker/cppumaker/singletons/ULONG_MAX.hpp" 344 #include "test/codemaker/cppumaker/singletons/USHRT_MAX.hpp" 345 #include "test/codemaker/cppumaker/singletons/FILE.hpp" 346 #include "test/codemaker/cppumaker/singletons/lconv.hpp" 347 #include "test/codemaker/cppumaker/singletons/tm.hpp" 348 #include "test/codemaker/cppumaker/singletons/std.hpp" 349 #include "test/codemaker/cppumaker/singletons/NDEBUG.hpp" 350 #include "test/codemaker/cppumaker/singletons/get.hpp" 351 #include "test/codemaker/cppumaker/HelperEnum.hpp" 352 #include "test/codemaker/cppumaker/HelperStruct.hpp" 353 #include "test/codemaker/cppumaker/BigStruct.hpp" 354 #include "test/codemaker/cppumaker/Struct.hpp" 355 #include "test/codemaker/cppumaker/StructUsage.hpp" 356 #include "test/codemaker/cppumaker/AlignmentDerivedStruct.hpp" 357 #include "test/codemaker/cppumaker/TestException1.hpp" 358 #include "test/codemaker/cppumaker/TestException2.hpp" 359 #include "test/codemaker/cppumaker/Constants.hpp" 360 361 #include "boost/scoped_array.hpp" 362 #include "com/sun/star/uno/Any.hxx" 363 #include "com/sun/star/uno/Type.hxx" 364 #include "com/sun/star/uno/TypeClass.hpp" 365 #include "testshl/simpleheader.hxx" 366 #include "rtl/ustring.h" 367 #include "rtl/ustring.hxx" 368 369 #include <cstddef> 370 #include <iostream> 371 372 namespace { 373 374 class Test: public CppUnit::TestFixture { 375 public: 376 void testBigStruct(); 377 378 void testPolyStruct(); 379 380 void testExceptions(); 381 382 void testConstants(); 383 384 CPPUNIT_TEST_SUITE(Test); 385 CPPUNIT_TEST(testBigStruct); 386 CPPUNIT_TEST(testPolyStruct); 387 CPPUNIT_TEST(testExceptions); 388 CPPUNIT_TEST(testConstants); 389 CPPUNIT_TEST_SUITE_END(); 390 }; 391 392 struct Guard { 393 explicit Guard(void * buffer): 394 p(new(buffer) test::codemaker::cppumaker::BigStruct) {} 395 396 ~Guard() { p->test::codemaker::cppumaker::BigStruct::~BigStruct(); } 397 398 test::codemaker::cppumaker::BigStruct * const p; 399 }; 400 401 void Test::testBigStruct() { 402 // Default-initialize a BigStruct instance on top of a memory buffer filled 403 // with random data, and make sure that all members are default-initialized: 404 boost::scoped_array< char > buffer( 405 new char[sizeof (test::codemaker::cppumaker::BigStruct)]); 406 for (std::size_t i = 0; i < sizeof (test::codemaker::cppumaker::BigStruct); 407 ++i) 408 { 409 buffer[i] = '\x56'; 410 } 411 Guard guard(buffer.get()); 412 CPPUNIT_ASSERT_EQUAL(guard.p->m1, sal_False); 413 CPPUNIT_ASSERT_EQUAL(guard.p->m2, static_cast< sal_Int8 >(0)); 414 CPPUNIT_ASSERT_EQUAL(guard.p->m3, static_cast< sal_Int16 >(0)); 415 CPPUNIT_ASSERT_EQUAL(guard.p->m4, static_cast< sal_uInt16 >(0)); 416 CPPUNIT_ASSERT_EQUAL(guard.p->m5, static_cast< sal_Int32 >(0)); 417 CPPUNIT_ASSERT_EQUAL(guard.p->m6, static_cast< sal_uInt32 >(0)); 418 CPPUNIT_ASSERT_EQUAL(guard.p->m7, static_cast< sal_Int64 >(0)); 419 CPPUNIT_ASSERT_EQUAL(guard.p->m8, static_cast< sal_uInt64 >(0)); 420 CPPUNIT_ASSERT_EQUAL(guard.p->m9, 0.0f); 421 CPPUNIT_ASSERT_EQUAL(guard.p->m10, 0.0); 422 CPPUNIT_ASSERT_EQUAL(guard.p->m11, static_cast< sal_Unicode >(0)); 423 CPPUNIT_ASSERT_EQUAL(guard.p->m12.getLength(), static_cast< sal_Int32 >(0)); 424 CPPUNIT_ASSERT_EQUAL( 425 guard.p->m13.getTypeClass(), com::sun::star::uno::TypeClass_VOID); 426 CPPUNIT_ASSERT_EQUAL(guard.p->m14.hasValue(), sal_False); 427 CPPUNIT_ASSERT_EQUAL(guard.p->m15.getLength(), static_cast< sal_Int32 >(0)); 428 CPPUNIT_ASSERT_EQUAL( 429 guard.p->m16, test::codemaker::cppumaker::HelperEnum_ZERO); 430 CPPUNIT_ASSERT_EQUAL(guard.p->m17.m1, sal_False); 431 CPPUNIT_ASSERT_EQUAL(guard.p->m17.m2.is(), sal_False); 432 CPPUNIT_ASSERT_EQUAL(guard.p->m18.is(), sal_False); 433 CPPUNIT_ASSERT_EQUAL(guard.p->m19, static_cast< sal_Int8 >(0)); 434 CPPUNIT_ASSERT_EQUAL( 435 guard.p->m20, test::codemaker::cppumaker::HelperEnum_ZERO); 436 CPPUNIT_ASSERT_EQUAL(guard.p->m21.getLength(), static_cast< sal_Int32 >(0)); 437 CPPUNIT_ASSERT_EQUAL(guard.p->m22.getLength(), static_cast< sal_Int32 >(0)); 438 CPPUNIT_ASSERT_EQUAL(guard.p->m23.getLength(), static_cast< sal_Int32 >(0)); 439 440 #if defined __GNUC__ && __GNUC__ >= 3 // see CPPU_GCC3_ALIGN 441 CPPUNIT_ASSERT_EQUAL( 442 #if defined X86_64 443 static_cast< std::size_t >(24), 444 #else 445 static_cast< std::size_t >(16), 446 #endif 447 sizeof (test::codemaker::cppumaker::AlignmentDerivedStruct)); 448 #endif 449 450 com::sun::star::uno::Type t( 451 cppu::UnoType< test::codemaker::cppumaker::BigStruct >::get()); 452 typelib_TypeDescription * td = NULL; 453 t.getDescription(&td); 454 typelib_typedescription_complete(&td); 455 fprintf(stdout, "#### 1\n"); 456 CPPUNIT_ASSERT(td != NULL); 457 CPPUNIT_ASSERT_EQUAL(typelib_TypeClass_STRUCT, td->eTypeClass); 458 typelib_StructTypeDescription * std = 459 reinterpret_cast< typelib_StructTypeDescription * >(td); 460 CPPUNIT_ASSERT_EQUAL(typelib_TypeClass_UNSIGNED_SHORT, std->aBase.ppTypeRefs[3]->eTypeClass); // unsigned short m4; 461 CPPUNIT_ASSERT_EQUAL(typelib_TypeClass_CHAR, std->aBase.ppTypeRefs[10]->eTypeClass); // char m11; 462 } 463 464 void Test::testPolyStruct() { 465 CPPUNIT_ASSERT_EQUAL( 466 rtl::OUString( 467 RTL_CONSTASCII_USTRINGPARAM( 468 "test.codemaker.cppumaker.Struct<char,short>")), 469 (com::sun::star::uno::makeAny( 470 test::codemaker::cppumaker::Struct< sal_Unicode, sal_Int16 >()). 471 getValueType().getTypeName())); 472 CPPUNIT_ASSERT_EQUAL( 473 (test::codemaker::cppumaker::make_Struct< sal_uInt32, sal_Bool >(5, 0). 474 member1), 475 static_cast< sal_uInt32 >(5)); 476 } 477 478 namespace { 479 480 bool operator ==( 481 test::codemaker::cppumaker::TestException1 const & e1, 482 test::codemaker::cppumaker::TestException1 const & e2) 483 { 484 return e1.Message == e2.Message && e1.Context == e2.Context 485 && e1.m1 == e2.m1 && e1.m2 == e2.m2 && e1.m3 == e2.m3 486 && e1.m4.member1 == e2.m4.member1 && e1.m4.member2 == e2.m4.member2; 487 } 488 489 std::ostream & operator <<( 490 std::ostream & out, com::sun::star::uno::Exception const &) 491 { 492 return out << "<UNO exception>"; 493 } 494 495 } 496 497 void Test::testExceptions() { 498 test::codemaker::cppumaker::TestException1 e11( 499 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("abc")), 0, 1, 500 com::sun::star::uno::makeAny(123.0), 501 test::codemaker::cppumaker::HelperEnum_ONE, 502 test::codemaker::cppumaker::Struct<sal_Int32, sal_Int32>(5, 0), 2); 503 test::codemaker::cppumaker::TestException1 e12(e11); 504 CPPUNIT_ASSERT_EQUAL(e11, e12); 505 test::codemaker::cppumaker::TestException1 e13; 506 e13 = e11; 507 CPPUNIT_ASSERT_EQUAL(e11, e13); 508 test::codemaker::cppumaker::TestException2 e21( 509 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("abc")), 0, 1, 510 com::sun::star::uno::makeAny(123.0), 511 test::codemaker::cppumaker::HelperEnum_ONE, 512 test::codemaker::cppumaker::Struct<sal_Int32, sal_Int32>(5, 0), 2); 513 test::codemaker::cppumaker::TestException2 e22(e21); 514 CPPUNIT_ASSERT_EQUAL(e21, e22); 515 test::codemaker::cppumaker::TestException2 e23; 516 e23 = e21; 517 CPPUNIT_ASSERT_EQUAL(e21, e23); 518 } 519 520 void Test::testConstants() { 521 CPPUNIT_ASSERT_EQUAL( 522 SAL_MIN_INT8, test::codemaker::cppumaker::Constants::byteMin); 523 CPPUNIT_ASSERT_EQUAL( 524 SAL_MAX_INT8, test::codemaker::cppumaker::Constants::byteMax); 525 CPPUNIT_ASSERT_EQUAL( 526 static_cast< sal_Int8 >(-1), 527 test::codemaker::cppumaker::Constants::byteNeg); 528 CPPUNIT_ASSERT_EQUAL( 529 SAL_MIN_INT16, test::codemaker::cppumaker::Constants::shortMin); 530 CPPUNIT_ASSERT_EQUAL( 531 SAL_MAX_INT16, test::codemaker::cppumaker::Constants::shortMax); 532 CPPUNIT_ASSERT_EQUAL( 533 static_cast< sal_uInt16 >(0), 534 test::codemaker::cppumaker::Constants::unsignedShortMin); 535 CPPUNIT_ASSERT_EQUAL( 536 SAL_MAX_UINT16, 537 test::codemaker::cppumaker::Constants::unsignedShortMax); 538 CPPUNIT_ASSERT_EQUAL( 539 SAL_MIN_INT32, test::codemaker::cppumaker::Constants::longMin); 540 CPPUNIT_ASSERT_EQUAL( 541 SAL_MAX_INT32, test::codemaker::cppumaker::Constants::longMax); 542 CPPUNIT_ASSERT_EQUAL( 543 static_cast< sal_uInt32 >(0), 544 test::codemaker::cppumaker::Constants::unsignedLongMin); 545 CPPUNIT_ASSERT_EQUAL( 546 SAL_MAX_UINT32, test::codemaker::cppumaker::Constants::unsignedLongMax); 547 CPPUNIT_ASSERT_EQUAL( 548 SAL_MIN_INT64, test::codemaker::cppumaker::Constants::hyperMin); 549 CPPUNIT_ASSERT_EQUAL( 550 SAL_MAX_INT64, test::codemaker::cppumaker::Constants::hyperMax); 551 CPPUNIT_ASSERT_EQUAL( 552 static_cast< sal_uInt64 >(0), 553 test::codemaker::cppumaker::Constants::unsignedHyperMin); 554 CPPUNIT_ASSERT_EQUAL( 555 SAL_MAX_UINT64, 556 test::codemaker::cppumaker::Constants::unsignedHyperMax); 557 } 558 559 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); 560 561 } 562 563 NOADDITIONAL; 564