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 "rtl/ustring.h" 366 #include "rtl/ustring.hxx" 367 #include "gtest/gtest.h" 368 369 #include <cstddef> 370 #include <iostream> 371 372 // FIXME: 373 #define RUN_OLD_FAILING_TESTS 0 374 375 namespace { 376 377 struct Guard { 378 explicit Guard(void * buffer): 379 p(new(buffer) test::codemaker::cppumaker::BigStruct) {} 380 381 ~Guard() { p->test::codemaker::cppumaker::BigStruct::~BigStruct(); } 382 383 test::codemaker::cppumaker::BigStruct * const p; 384 }; 385 386 TEST(Test, testBigStruct) { 387 // Default-initialize a BigStruct instance on top of a memory buffer filled 388 // with random data, and make sure that all members are default-initialized: 389 boost::scoped_array< char > buffer( 390 new char[sizeof (test::codemaker::cppumaker::BigStruct)]); 391 for (std::size_t i = 0; i < sizeof (test::codemaker::cppumaker::BigStruct); 392 ++i) 393 { 394 buffer[i] = '\x56'; 395 } 396 Guard guard(buffer.get()); 397 ASSERT_EQ(guard.p->m1, sal_False); 398 ASSERT_EQ(guard.p->m2, static_cast< sal_Int8 >(0)); 399 ASSERT_EQ(guard.p->m3, static_cast< sal_Int16 >(0)); 400 ASSERT_EQ(guard.p->m4, static_cast< sal_uInt16 >(0)); 401 ASSERT_EQ(guard.p->m5, static_cast< sal_Int32 >(0)); 402 ASSERT_EQ(guard.p->m6, static_cast< sal_uInt32 >(0)); 403 ASSERT_EQ(guard.p->m7, static_cast< sal_Int64 >(0)); 404 ASSERT_EQ(guard.p->m8, static_cast< sal_uInt64 >(0)); 405 ASSERT_EQ(guard.p->m9, 0.0f); 406 ASSERT_EQ(guard.p->m10, 0.0); 407 ASSERT_EQ(guard.p->m11, static_cast< sal_Unicode >(0)); 408 ASSERT_EQ(guard.p->m12.getLength(), static_cast< sal_Int32 >(0)); 409 ASSERT_EQ( 410 guard.p->m13.getTypeClass(), com::sun::star::uno::TypeClass_VOID); 411 ASSERT_EQ(guard.p->m14.hasValue(), sal_False); 412 ASSERT_EQ(guard.p->m15.getLength(), static_cast< sal_Int32 >(0)); 413 ASSERT_EQ( 414 guard.p->m16, test::codemaker::cppumaker::HelperEnum_ZERO); 415 ASSERT_EQ(guard.p->m17.m1, sal_False); 416 ASSERT_EQ(guard.p->m17.m2.is(), sal_False); 417 ASSERT_EQ(guard.p->m18.is(), sal_False); 418 ASSERT_EQ(guard.p->m19, static_cast< sal_Int8 >(0)); 419 ASSERT_EQ( 420 guard.p->m20, test::codemaker::cppumaker::HelperEnum_ZERO); 421 ASSERT_EQ(guard.p->m21.getLength(), static_cast< sal_Int32 >(0)); 422 ASSERT_EQ(guard.p->m22.getLength(), static_cast< sal_Int32 >(0)); 423 ASSERT_EQ(guard.p->m23.getLength(), static_cast< sal_Int32 >(0)); 424 425 #if defined __GNUC__ && __GNUC__ >= 3 // see CPPU_GCC3_ALIGN 426 ASSERT_EQ( 427 #if defined X86_64 428 static_cast< std::size_t >(24), 429 #else 430 static_cast< std::size_t >(16), 431 #endif 432 sizeof (test::codemaker::cppumaker::AlignmentDerivedStruct)); 433 #endif 434 435 com::sun::star::uno::Type t( 436 cppu::UnoType< test::codemaker::cppumaker::BigStruct >::get()); 437 typelib_TypeDescription * td = NULL; 438 t.getDescription(&td); 439 typelib_typedescription_complete(&td); 440 fprintf(stdout, "#### 1\n"); 441 ASSERT_TRUE(td != NULL); 442 ASSERT_EQ(typelib_TypeClass_STRUCT, td->eTypeClass); 443 typelib_StructTypeDescription * std = 444 reinterpret_cast< typelib_StructTypeDescription * >(td); 445 ASSERT_EQ(typelib_TypeClass_UNSIGNED_SHORT, std->aBase.ppTypeRefs[3]->eTypeClass); // unsigned short m4; 446 ASSERT_EQ(typelib_TypeClass_CHAR, std->aBase.ppTypeRefs[10]->eTypeClass); // char m11; 447 } 448 449 TEST(Test, testPolyStruct) { 450 ASSERT_EQ( 451 rtl::OUString( 452 RTL_CONSTASCII_USTRINGPARAM( 453 "test.codemaker.cppumaker.Struct<char,short>")), 454 (com::sun::star::uno::makeAny( 455 test::codemaker::cppumaker::Struct< sal_Unicode, sal_Int16 >()). 456 getValueType().getTypeName())); 457 #if RUN_OLD_FAILING_TESTS 458 ASSERT_EQ( 459 (test::codemaker::cppumaker::make_Struct< sal_uInt32, sal_Bool >(5, 0). 460 member1), 461 static_cast< sal_uInt32 >(5)); 462 #endif 463 } 464 465 namespace { 466 467 bool operator ==( 468 test::codemaker::cppumaker::TestException1 const & e1, 469 test::codemaker::cppumaker::TestException1 const & e2) 470 { 471 return e1.Message == e2.Message && e1.Context == e2.Context 472 && e1.m1 == e2.m1 && e1.m2 == e2.m2 && e1.m3 == e2.m3 473 && e1.m4.member1 == e2.m4.member1 && e1.m4.member2 == e2.m4.member2; 474 } 475 476 std::ostream & operator <<( 477 std::ostream & out, com::sun::star::uno::Exception const &) 478 { 479 return out << "<UNO exception>"; 480 } 481 482 } 483 484 TEST(Test, testExceptions) { 485 #if RUN_OLD_FAILING_TESTS 486 test::codemaker::cppumaker::TestException1 e11( 487 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("abc")), 0, 1, 488 com::sun::star::uno::makeAny(123.0), 489 test::codemaker::cppumaker::HelperEnum_ONE, 490 test::codemaker::cppumaker::Struct<sal_Int32, sal_Int32>(5, 0), 2); 491 test::codemaker::cppumaker::TestException1 e12(e11); 492 ASSERT_EQ(e11, e12); 493 test::codemaker::cppumaker::TestException1 e13; 494 e13 = e11; 495 ASSERT_EQ(e11, e13); 496 test::codemaker::cppumaker::TestException2 e21( 497 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("abc")), 0, 1, 498 com::sun::star::uno::makeAny(123.0), 499 test::codemaker::cppumaker::HelperEnum_ONE, 500 test::codemaker::cppumaker::Struct<sal_Int32, sal_Int32>(5, 0), 2); 501 test::codemaker::cppumaker::TestException2 e22(e21); 502 ASSERT_EQ(e21, e22); 503 test::codemaker::cppumaker::TestException2 e23; 504 e23 = e21; 505 ASSERT_EQ(e21, e23); 506 #endif 507 } 508 509 TEST(Test, testConstants) { 510 ASSERT_EQ( 511 SAL_MIN_INT8, test::codemaker::cppumaker::Constants::byteMin); 512 ASSERT_EQ( 513 SAL_MAX_INT8, test::codemaker::cppumaker::Constants::byteMax); 514 ASSERT_EQ( 515 static_cast< sal_Int8 >(-1), 516 test::codemaker::cppumaker::Constants::byteNeg); 517 ASSERT_EQ( 518 SAL_MIN_INT16, test::codemaker::cppumaker::Constants::shortMin); 519 ASSERT_EQ( 520 SAL_MAX_INT16, test::codemaker::cppumaker::Constants::shortMax); 521 ASSERT_EQ( 522 static_cast< sal_uInt16 >(0), 523 test::codemaker::cppumaker::Constants::unsignedShortMin); 524 ASSERT_EQ( 525 SAL_MAX_UINT16, 526 test::codemaker::cppumaker::Constants::unsignedShortMax); 527 ASSERT_EQ( 528 SAL_MIN_INT32, test::codemaker::cppumaker::Constants::longMin); 529 ASSERT_EQ( 530 SAL_MAX_INT32, test::codemaker::cppumaker::Constants::longMax); 531 ASSERT_EQ( 532 static_cast< sal_uInt32 >(0), 533 test::codemaker::cppumaker::Constants::unsignedLongMin); 534 ASSERT_EQ( 535 SAL_MAX_UINT32, test::codemaker::cppumaker::Constants::unsignedLongMax); 536 ASSERT_EQ( 537 SAL_MIN_INT64, test::codemaker::cppumaker::Constants::hyperMin); 538 ASSERT_EQ( 539 SAL_MAX_INT64, test::codemaker::cppumaker::Constants::hyperMax); 540 ASSERT_EQ( 541 static_cast< sal_uInt64 >(0), 542 test::codemaker::cppumaker::Constants::unsignedHyperMin); 543 ASSERT_EQ( 544 SAL_MAX_UINT64, 545 test::codemaker::cppumaker::Constants::unsignedHyperMax); 546 } 547 548 549 } 550 551 int main(int argc, char **argv) 552 { 553 ::testing::InitGoogleTest(&argc, argv); 554 return RUN_ALL_TESTS(); 555 } 556