bump product version to 5.0.4.1
[LibreOffice.git] / sal / qa / OStringBuffer / rtl_String_Const.h
blobb6b25113e797e55fee7d03623d0547a658fc893d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SAL_QA_OSTRINGBUFFER_RTL_STRING_CONST_H
21 #define INCLUDED_SAL_QA_OSTRINGBUFFER_RTL_STRING_CONST_H
23 #include <limits.h>
24 #include <sal/types.h>
25 #include <rtl/textenc.h>
26 #include <rtl/ustring.h>
28 #ifdef __cplusplus
29 extern "C"
31 #endif
33 static const rtl_TextEncoding kEncodingRTLTextUSASCII = RTL_TEXTENCODING_ASCII_US;
35 static const sal_uInt32 kConvertFlagsOUStringToOString = OUSTRING_TO_OSTRING_CVTFLAGS;
36 static const sal_uInt32 kConvertFlagsOStringToOUString = OSTRING_TO_OUSTRING_CVTFLAGS;
38 static const sal_Char *kTestStr1 = "Sun Microsystems";
39 static const sal_Char *kTestStr2 = "Sun Microsystems Java Technology";
40 static const sal_Char *kTestStr7 = "Sun ";
41 static const sal_Char *kTestStr8 = "Microsystems";
42 static const sal_Char *kTestStr14 = " Sun Microsystems";
43 static const sal_Char *kTestStr17 = " Sun Microsystems ";
44 static const sal_Char *kTestStr23 = " Java Technology";
45 static const sal_Char *kTestStr25 = "";
46 static const sal_Char *kTestStr27 = "s";
47 static const sal_Char *kTestStr28 = "\50\3\5\7\11\13\15\17sun";
48 static const sal_Char *kTestStr29 = "\50\3\5\7\11\13\15\17sun\21\23\25\27\31\33\50";
49 static const sal_Char *kTestStr31 = "sun Microsystems";
50 static const sal_Char *kTestStr36 = "Microsystems Java Technology";
51 static const sal_Char *kTestStr37 = "Sun Java Technology";
52 static const sal_Char *kTestStr38 = "\21\23\25\27\31\33\50";
53 static const sal_Char *kTestStr39 = "\50\3\5\7\11\13\15\17sun Sun Microsystems ";
54 static const sal_Char *kTestStr40 = "\50\3\5\7\11\13\15\17sunsun Microsystems";
55 static const sal_Char *kTestStr45 = "Sun true";
56 static const sal_Char *kTestStr46 = "Sun false";
57 static const sal_Char *kTestStr47 = "true";
58 static const sal_Char *kTestStr48 = "false";
59 static const sal_Char *kTestStr49 = "\50\3\5\7\11\13\15\17suntrue";
60 static const sal_Char *kTestStr50 = "\50\3\5\7\11\13\15\17sunfalse";
61 static const sal_Char *kTestStr51 = "Sun M";
62 //static const sal_Char *kTestStr52 = "Sun \077777";
63 //static const sal_Char *kTestStr53 = "Sun \100000";
64 //static const sal_Char *kTestStr54 = "\77777";
65 //static const sal_Char *kTestStr55 = "\100000";
66 static const sal_Char *kTestStr56 = "\50\3\5\7\11\13\15\17suns";
67 //static const sal_Char *kTestStr57 = "\50\3\5\7\11\13\15\17sun\77777";
68 //static const sal_Char *kTestStr58 = "\50\3\5\7\11\13\15\17sun\10000";
69 static const sal_Char *kTestStr59 = "Sun 11";
70 static const sal_Char *kTestStr60 = "11";
71 static const sal_Char *kTestStr61 = "\50\3\5\7\11\13\15\17sun11";
72 static const sal_Char *kTestStr62 = "Sun 0";
73 static const sal_Char *kTestStr63 = "Sun -11";
74 static const sal_Char *kTestStr64 = "Sun 2147483647";
75 static const sal_Char *kTestStr65 = "Sun -2147483648";
76 static const sal_Char *kTestStr66 = "0";
77 static const sal_Char *kTestStr67 = "-11";
78 static const sal_Char *kTestStr68 = "2147483647";
79 static const sal_Char *kTestStr69 = "-2147483648";
80 static const sal_Char *kTestStr70 = "\50\3\5\7\11\13\15\17sun0";
81 static const sal_Char *kTestStr71 = "\50\3\5\7\11\13\15\17sun-11";
82 static const sal_Char *kTestStr72 = "\50\3\5\7\11\13\15\17sun2147483647";
83 static const sal_Char *kTestStr73 = "\50\3\5\7\11\13\15\17sun-2147483648";
84 static const sal_Char *kTestStr116 = "Sun 9223372036854775807";
85 static const sal_Char *kTestStr117 = "Sun -9223372036854775808";
86 static const sal_Char *kTestStr118 = "9223372036854775807";
87 static const sal_Char *kTestStr119 = "-9223372036854775808";
88 static const sal_Char *kTestStr120 = "\50\3\5\7\11\13\15\17sun9223372036854775807";
89 static const sal_Char *kTestStr121 = "\50\3\5\7\11\13\15\17sun-9223372036854775808";
90 static const sal_Char *kTestStr143 = "Sun \377";
91 static const sal_Char *kTestStr144 = "\377";
92 static const sal_Char *kTestStr145 = "\50\3\5\7\11\13\15\17sun\377";
94 static const sal_Int32 kTestStr1Len = 16;
95 static const sal_Int32 kTestStr2Len = 32;
96 static const sal_Int32 kTestStr3Len = 16;
97 static const sal_Int32 kTestStr4Len = 16;
98 static const sal_Int32 kTestStr5Len = 16;
99 static const sal_Int32 kTestStr6Len = 15;
100 static const sal_Int32 kTestStr7Len = 4;
101 static const sal_Int32 kTestStr8Len = 12;
102 static const sal_Int32 kTestStr9Len = 32;
103 static const sal_Int32 kTestStr10Len = 17;
104 static const sal_Int32 kTestStr11Len = 17;
105 static const sal_Int32 kTestStr12Len = 18;
106 static const sal_Int32 kTestStr13Len = 19;
107 static const sal_Int32 kTestStr14Len = 19;
108 static const sal_Int32 kTestStr15Len = 20;
109 static const sal_Int32 kTestStr16Len = 20;
110 static const sal_Int32 kTestStr17Len = 22;
111 static const sal_Int32 kTestStr18Len = 16;
112 static const sal_Int32 kTestStr19Len = 22;
113 static const sal_Int32 kTestStr20Len = 3;
114 static const sal_Int32 kTestStr21Len = 3;
115 static const sal_Int32 kTestStr22Len = 32;
116 static const sal_Int32 kTestStr23Len = 16;
117 static const sal_Int32 kTestStr24Len = 31;
118 static const sal_Int32 kTestStr25Len = 0;
119 static const sal_Int32 kTestStr26Len = 4;
120 static const sal_Int32 kTestStr27Len = 1;
121 static const sal_Int32 kTestStr28Len = 11;
122 static const sal_Int32 kTestStr29Len = 18;
123 static const sal_Int32 kTestStr30Len = 10;
124 static const sal_Int32 kTestStr31Len = 16;
125 static const sal_Int32 kTestStr32Len = 16;
126 static const sal_Int32 kTestStr33Len = 1;
127 static const sal_Int32 kTestStr34Len = 11;
128 static const sal_Int32 kTestStr35Len = 11;
129 static const sal_Int32 kTestStr36Len = 28;
130 static const sal_Int32 kTestStr37Len = 20;
131 static const sal_Int32 kTestStr38Len = 7;
132 static const sal_Int32 kTestStr39Len = 33;
133 static const sal_Int32 kTestStr40Len = 27;
134 static const sal_Int32 kTestStr41Len = 3;
135 static const sal_Int32 kTestStr42Len = 10;
136 static const sal_Int32 kTestStr43Len = 13;
137 static const sal_Int32 kTestStr44Len = 2;
138 static const sal_Int32 kTestStr45Len = 8;
139 static const sal_Int32 kTestStr46Len = 9;
140 static const sal_Int32 kTestStr47Len = 4;
141 static const sal_Int32 kTestStr48Len = 5;
142 static const sal_Int32 kTestStr49Len = 15;
143 static const sal_Int32 kTestStr50Len = 16;
144 static const sal_Int32 kTestStr51Len = 5;
145 static const sal_Int32 kTestStr52Len = 5;
146 static const sal_Int32 kTestStr53Len = 5;
147 static const sal_Int32 kTestStr54Len = 1;
148 static const sal_Int32 kTestStr55Len = 1;
149 static const sal_Int32 kTestStr56Len = 12;
150 static const sal_Int32 kTestStr57Len = 12;
151 static const sal_Int32 kTestStr58Len = 12;
152 static const sal_Int32 kTestStr59Len = 6;
153 static const sal_Int32 kTestStr60Len = 2;
154 static const sal_Int32 kTestStr61Len = 13;
155 static const sal_Int32 kTestStr62Len = 5;
156 static const sal_Int32 kTestStr63Len = 7;
157 static const sal_Int32 kTestStr64Len = 14;
158 static const sal_Int32 kTestStr65Len = 15;
159 static const sal_Int32 kTestStr66Len = 1;
160 static const sal_Int32 kTestStr67Len = 3;
161 static const sal_Int32 kTestStr68Len = 10;
162 static const sal_Int32 kTestStr69Len = 11;
163 static const sal_Int32 kTestStr70Len = 12;
164 static const sal_Int32 kTestStr71Len = 14;
165 static const sal_Int32 kTestStr72Len = 21;
166 static const sal_Int32 kTestStr73Len = 22;
167 static const sal_Int32 kTestStr74Len = 7;
168 static const sal_Int32 kTestStr75Len = 7;
169 static const sal_Int32 kTestStr76Len = 10;
170 static const sal_Int32 kTestStr77Len = 12;
171 static const sal_Int32 kTestStr78Len = 12;
172 static const sal_Int32 kTestStr79Len = 13;
173 static const sal_Int32 kTestStr80Len = 13;
174 static const sal_Int32 kTestStr81Len = 3;
175 static const sal_Int32 kTestStr82Len = 3;
176 static const sal_Int32 kTestStr83Len = 6;
177 static const sal_Int32 kTestStr84Len = 8;
178 static const sal_Int32 kTestStr85Len = 8;
179 static const sal_Int32 kTestStr86Len = 9;
180 static const sal_Int32 kTestStr87Len = 9;
181 static const sal_Int32 kTestStr88Len = 14;
182 static const sal_Int32 kTestStr89Len = 14;
183 static const sal_Int32 kTestStr90Len = 17;
184 static const sal_Int32 kTestStr91Len = 19;
185 static const sal_Int32 kTestStr92Len = 19;
186 static const sal_Int32 kTestStr93Len = 20;
187 static const sal_Int32 kTestStr94Len = 20;
188 static const sal_Int32 kTestStr95Len = 8;
189 static const sal_Int32 kTestStr96Len = 8;
190 static const sal_Int32 kTestStr97Len = 11;
191 static const sal_Int32 kTestStr98Len = 13;
192 static const sal_Int32 kTestStr99Len = 13;
193 static const sal_Int32 kTestStr100Len = 14;
194 static const sal_Int32 kTestStr101Len = 14;
195 static const sal_Int32 kTestStr102Len = 4;
196 static const sal_Int32 kTestStr103Len = 4;
197 static const sal_Int32 kTestStr104Len = 7;
198 static const sal_Int32 kTestStr105Len = 9;
199 static const sal_Int32 kTestStr106Len = 9;
200 static const sal_Int32 kTestStr107Len = 10;
201 static const sal_Int32 kTestStr108Len = 10;
202 static const sal_Int32 kTestStr109Len = 15;
203 static const sal_Int32 kTestStr110Len = 15;
204 static const sal_Int32 kTestStr111Len = 18;
205 static const sal_Int32 kTestStr112Len = 20;
206 static const sal_Int32 kTestStr113Len = 20;
207 static const sal_Int32 kTestStr114Len = 21;
208 static const sal_Int32 kTestStr115Len = 21;
209 static const sal_Int32 kTestStr116Len = 23;
210 static const sal_Int32 kTestStr117Len = 24;
211 static const sal_Int32 kTestStr118Len = 19;
212 static const sal_Int32 kTestStr119Len = 20;
213 static const sal_Int32 kTestStr120Len = 30;
214 static const sal_Int32 kTestStr121Len = 31;
215 static const sal_Int32 kTestStr122Len = 16;
216 static const sal_Int32 kTestStr123Len = 21;
217 static const sal_Int32 kTestStr124Len = 23;
218 static const sal_Int32 kTestStr125Len = 30;
219 static const sal_Int32 kTestStr126Len = 12;
220 static const sal_Int32 kTestStr127Len = 17;
221 static const sal_Int32 kTestStr128Len = 19;
222 static const sal_Int32 kTestStr129Len = 26;
223 static const sal_Int32 kTestStr130Len = 23;
224 static const sal_Int32 kTestStr131Len = 28;
225 static const sal_Int32 kTestStr132Len = 30;
226 static const sal_Int32 kTestStr133Len = 37;
227 static const sal_Int32 kTestStr134Len = 22;
228 static const sal_Int32 kTestStr135Len = 24;
229 static const sal_Int32 kTestStr136Len = 31;
230 static const sal_Int32 kTestStr137Len = 18;
231 static const sal_Int32 kTestStr138Len = 20;
232 static const sal_Int32 kTestStr139Len = 27;
233 static const sal_Int32 kTestStr140Len = 29;
234 static const sal_Int32 kTestStr141Len = 31;
235 static const sal_Int32 kTestStr142Len = 38;
236 static const sal_Int32 kTestStr143Len = 5;
237 static const sal_Int32 kTestStr144Len = 1;
238 static const sal_Int32 kTestStr145Len = 12;
239 static const sal_Int32 kTestStr146Len = 19;
240 static const sal_Int32 kTestStr147Len = 19;
241 static const sal_Int32 kTestStr148Len = 19;
242 static const sal_Int32 kTestStr149Len = 32;
243 static const sal_Int32 kTestStr150Len = 32;
244 static const sal_Int32 kTestStr151Len = 31;
245 static const sal_Int32 kTestStr152Len = 31;
246 static const sal_Int32 kTestStr153Len = 31;
247 static const sal_Int32 kTestStr154Len = 36;
248 static const sal_Int32 kTestStr155Len = 36;
249 static const sal_Int32 kTestStr156Len = 36;
250 static const sal_Int32 kTestStr157Len = 49;
251 static const sal_Int32 kTestStr158Len = 49;
252 static const sal_Int32 kTestStr159Len = 49;
253 static const sal_Int32 kTestStr160Len = 48;
254 static const sal_Int32 kTestStr161Len = 48;
255 static const sal_Int32 kTestStr162Len = 48;
256 static const sal_Int32 kTestStr163Len = 15;
257 static const sal_Int32 kTestStr164Len = 15;
258 static const sal_Int32 kTestStr165Len = 15;
259 static const sal_Int32 kTestStr166Len = 28;
260 static const sal_Int32 kTestStr167Len = 28;
261 static const sal_Int32 kTestStr168Len = 28;
262 static const sal_Int32 kTestStr169Len = 27;
263 static const sal_Int32 kTestStr170Len = 27;
264 static const sal_Int32 kTestStr171Len = 27;
265 static const sal_Int32 kTestStr1PlusStr6Len = kTestStr1Len + kTestStr6Len;
267 static const sal_Int32 uTestStr1Len = 16;
268 static const sal_Int32 uTestStr2Len = 32;
269 static const sal_Int32 uTestStr3Len = 16;
270 static const sal_Int32 uTestStr4Len = 16;
271 static const sal_Int32 uTestStr5Len = 16;
272 static const sal_Int32 uTestStr9Len = 32;
273 static const sal_Int32 uTestStr22Len = 32;
275 const sal_Unicode uTestStr31[]= {0x400,0x410,0x4DF};
276 const sal_Unicode uTestStr32[]= {0x9F9F,0xA000,0x8F80,0x9AD9};
278 static const sal_Int32 uTestStr31Len = 3;
279 static const sal_Int32 uTestStr32Len = 4;
281 static const sal_Int16 kRadixBinary = 2;
282 static const sal_Int16 kRadixOctol = 8;
283 static const sal_Int16 kRadixDecimal = 10;
284 static const sal_Int16 kRadixHexdecimal = 16;
285 static const sal_Int16 kRadixBase36 = 36;
287 static const sal_Int8 kSInt8Max = SCHAR_MAX;
288 static const sal_Int16 kUInt8Max = UCHAR_MAX;
289 static const sal_Int16 kSInt16Max = SHRT_MAX;
290 static const sal_Int32 kUInt16Max = USHRT_MAX;
291 static const sal_Int32 kSInt32Max = INT_MAX;
292 static const sal_Int64 kUInt32Max = UINT_MAX;
293 static const sal_Int64 kSInt64Max = SAL_CONST_INT64(9223372036854775807);
295 static const sal_Int32 kInt32MaxNumsCount = 5;
297 static const sal_Int32 kInt32MaxNums[kInt32MaxNumsCount] =
299 kSInt8Max, kUInt8Max,
300 kSInt16Max, kUInt16Max,
301 kSInt32Max
304 static const sal_Int32 kInt64MaxNumsCount = 7;
306 static const sal_Int64 kInt64MaxNums[kInt64MaxNumsCount] =
308 kSInt8Max, kUInt8Max,
309 kSInt16Max, kUInt16Max,
310 kSInt32Max, kUInt32Max,
311 kSInt64Max
314 static const sal_Int32 kBinaryNumsCount = 16;
316 static const sal_Int32 kBinaryMaxNumsCount = 7;
318 static const sal_Int32 kOctolNumsCount = 16;
320 static const sal_Int32 kOctolMaxNumsCount = 7;
322 static const sal_Int32 kDecimalNumsCount = 16;
324 static const sal_Int32 kDecimalMaxNumsCount = 7;
326 static const sal_Int32 kHexDecimalNumsCount = 16;
328 static const sal_Int32 kHexDecimalMaxNumsCount = 7;
330 static const sal_Int32 kBase36NumsCount = 36;
332 static const sal_Int32 kBase36MaxNumsCount = 7;
334 static const sal_Int32 nDoubleCount=24;
335 static const double expValDouble[nDoubleCount]=
337 3.0,3.1,3.1415,3.1415926535,3.141592653589793,
338 3.1415926535897932,3.14159265358979323,3.1,
339 3.141592653589793238462643,9.1096e-31,2.997925e8,6.241e18,5.381e18,
340 1.7e-309,6.5822e-16,1.7e+307,2.2e30,3.1,3.1,-3.1,
341 0.0,0.0,0.0,1.00e+308
344 static const sal_Int32 nFloatCount=22;
345 static const float expValFloat[nFloatCount] =
347 3.0f,3.1f,3.1415f,3.14159f,3.141592f,
348 3.1415926f,3.14159265f,3.141592653589793238462643f,
349 6.5822e-16f,9.1096e-31f,2.997925e8f,6.241e18f,
350 1.00e38f,6.241e-37f,6.241e37f,3.1f,3.1f,-3.1f,
351 3.1f,0.0f,0.0f,0.0f
354 static const sal_Int32 nCharCount=15;
355 static const sal_Unicode expValChar[nCharCount] =
357 65,97,48,45,95,
358 21,27,29,
359 64,10,39,34,
360 0,0,83
363 static const sal_Int32 nDefaultCount=6;
364 static const sal_Unicode input1Default[nDefaultCount] =
366 77,115,85,119,32,0
368 static const sal_Int32 input2Default[nDefaultCount] =
370 0,0,0,0,0,0
372 static const sal_Int32 expValDefault[nDefaultCount] =
374 4,9,-1,-1,3,-1
377 static const sal_Int32 nNormalCount=10;
378 static const sal_Unicode input1Normal[nNormalCount] =
380 77,77,77,115,115,115,119,119,0,0
382 static const sal_Int32 input2Normal[nNormalCount] =
384 0,32,80,0,13,20,0,80,0,32
386 static const sal_Int32 expValNormal[nNormalCount] =
388 4,-1,-1,9,15,-1,-1,-1,-1,-1
391 static const sal_Int32 nlastDefaultCount=5;
392 static const sal_Unicode input1lastDefault[nlastDefaultCount] =
394 77,115,119,32,0
396 static const sal_Int32 input2lastDefault[nlastDefaultCount] =
398 31,31,31,31,31
400 static const sal_Int32 expVallastDefault[nlastDefaultCount] =
402 4,15,-1,21,-1
405 static const sal_Int32 nlastNormalCount=8;
406 static const sal_Unicode input1lastNormal[nlastNormalCount] =
408 77,77,77,115,115,119,119,0
410 static const sal_Int32 input2lastNormal[nlastNormalCount] =
412 29,0,80,31,3,31,80,31
414 static const sal_Int32 expVallastNormal[nlastNormalCount] =
416 4,-1,4,15,-1,-1,-1,-1
419 static const sal_Int32 nStrDefaultCount=6;
420 static const sal_Int32 input2StrDefault[nStrDefaultCount] =
422 0,0,0,0,0,0
424 static const sal_Int32 expValStrDefault[nStrDefaultCount] =
426 0,4,-1,-1,-1,3
429 static const sal_Int32 nStrNormalCount=9;
430 static const sal_Int32 input2StrNormal[nStrNormalCount] =
432 0,32,0,30,0,0,0,32,0
434 static const sal_Int32 expValStrNormal[nStrNormalCount] =
436 0,-1,4,-1,-1,-1,-1,-1,3
439 static const sal_Int32 nStrLastDefaultCount=6;
440 static const sal_Int32 input2StrLastDefault[nStrLastDefaultCount] =
442 31,31,31,31,31,31
444 static const sal_Int32 expValStrLastDefault[nStrLastDefaultCount] =
446 0,4,-1,-1,-1,3
449 static const sal_Int32 nStrLastNormalCount=12;
450 static const sal_Int32 input2StrLastNormal[nStrLastNormalCount] =
452 31,0,80,31,2,31,31,31,0,31,31,14
454 static const sal_Int32 expValStrLastNormal[nStrLastNormalCount] =
456 0,-1,0,4,-1,-1,-1,-1,-1,3,15,11
459 static const sal_Int32 kNonSInt32Max = INT_MIN;
460 static const sal_Int32 kNonSInt16Max = SHRT_MIN;
462 #ifdef __cplusplus
464 #endif
466 #endif // INCLUDED_SAL_QA_OSTRINGBUFFER_RTL_STRING_CONST_H
468 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */