Lines Matching refs:buffer

44   Vector<char> buffer(buffer_container, kBufferSize);  in TEST()  local
48 CHECK(FastFixedDtoa(1.0, 1, buffer, &length, &point)); in TEST()
49 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
52 CHECK(FastFixedDtoa(1.0, 15, buffer, &length, &point)); in TEST()
53 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
56 CHECK(FastFixedDtoa(1.0, 0, buffer, &length, &point)); in TEST()
57 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
60 CHECK(FastFixedDtoa(0xFFFFFFFF, 5, buffer, &length, &point)); in TEST()
61 CHECK_EQ(0, strcmp("4294967295", buffer.start())); in TEST()
64 CHECK(FastFixedDtoa(4294967296.0, 5, buffer, &length, &point)); in TEST()
65 CHECK_EQ(0, strcmp("4294967296", buffer.start())); in TEST()
68 CHECK(FastFixedDtoa(1e21, 5, buffer, &length, &point)); in TEST()
69 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
73 CHECK(FastFixedDtoa(999999999999999868928.00, 2, buffer, &length, &point)); in TEST()
74 CHECK_EQ(0, strcmp("999999999999999868928", buffer.start())); in TEST()
77 CHECK(FastFixedDtoa(6.9999999999999989514240000e+21, 5, buffer, in TEST()
79 CHECK_EQ(0, strcmp("6999999999999998951424", buffer.start())); in TEST()
82 CHECK(FastFixedDtoa(1.5, 5, buffer, &length, &point)); in TEST()
83 CHECK_EQ(0, strcmp("15", buffer.start())); in TEST()
86 CHECK(FastFixedDtoa(1.55, 5, buffer, &length, &point)); in TEST()
87 CHECK_EQ(0, strcmp("155", buffer.start())); in TEST()
90 CHECK(FastFixedDtoa(1.55, 1, buffer, &length, &point)); in TEST()
91 CHECK_EQ(0, strcmp("16", buffer.start())); in TEST()
94 CHECK(FastFixedDtoa(1.00000001, 15, buffer, &length, &point)); in TEST()
95 CHECK_EQ(0, strcmp("100000001", buffer.start())); in TEST()
98 CHECK(FastFixedDtoa(0.1, 10, buffer, &length, &point)); in TEST()
99 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
102 CHECK(FastFixedDtoa(0.01, 10, buffer, &length, &point)); in TEST()
103 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
106 CHECK(FastFixedDtoa(0.001, 10, buffer, &length, &point)); in TEST()
107 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
110 CHECK(FastFixedDtoa(0.0001, 10, buffer, &length, &point)); in TEST()
111 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
114 CHECK(FastFixedDtoa(0.00001, 10, buffer, &length, &point)); in TEST()
115 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
118 CHECK(FastFixedDtoa(0.000001, 10, buffer, &length, &point)); in TEST()
119 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
122 CHECK(FastFixedDtoa(0.0000001, 10, buffer, &length, &point)); in TEST()
123 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
126 CHECK(FastFixedDtoa(0.00000001, 10, buffer, &length, &point)); in TEST()
127 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
130 CHECK(FastFixedDtoa(0.000000001, 10, buffer, &length, &point)); in TEST()
131 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
134 CHECK(FastFixedDtoa(0.0000000001, 15, buffer, &length, &point)); in TEST()
135 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
138 CHECK(FastFixedDtoa(0.00000000001, 15, buffer, &length, &point)); in TEST()
139 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
142 CHECK(FastFixedDtoa(0.000000000001, 15, buffer, &length, &point)); in TEST()
143 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
146 CHECK(FastFixedDtoa(0.0000000000001, 15, buffer, &length, &point)); in TEST()
147 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
150 CHECK(FastFixedDtoa(0.00000000000001, 15, buffer, &length, &point)); in TEST()
151 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
154 CHECK(FastFixedDtoa(0.000000000000001, 20, buffer, &length, &point)); in TEST()
155 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
158 CHECK(FastFixedDtoa(0.0000000000000001, 20, buffer, &length, &point)); in TEST()
159 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
162 CHECK(FastFixedDtoa(0.00000000000000001, 20, buffer, &length, &point)); in TEST()
163 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
166 CHECK(FastFixedDtoa(0.000000000000000001, 20, buffer, &length, &point)); in TEST()
167 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
170 CHECK(FastFixedDtoa(0.0000000000000000001, 20, buffer, &length, &point)); in TEST()
171 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
174 CHECK(FastFixedDtoa(0.00000000000000000001, 20, buffer, &length, &point)); in TEST()
175 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
178 CHECK(FastFixedDtoa(0.10000000004, 10, buffer, &length, &point)); in TEST()
179 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
182 CHECK(FastFixedDtoa(0.01000000004, 10, buffer, &length, &point)); in TEST()
183 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
186 CHECK(FastFixedDtoa(0.00100000004, 10, buffer, &length, &point)); in TEST()
187 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
190 CHECK(FastFixedDtoa(0.00010000004, 10, buffer, &length, &point)); in TEST()
191 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
194 CHECK(FastFixedDtoa(0.00001000004, 10, buffer, &length, &point)); in TEST()
195 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
198 CHECK(FastFixedDtoa(0.00000100004, 10, buffer, &length, &point)); in TEST()
199 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
202 CHECK(FastFixedDtoa(0.00000010004, 10, buffer, &length, &point)); in TEST()
203 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
206 CHECK(FastFixedDtoa(0.00000001004, 10, buffer, &length, &point)); in TEST()
207 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
210 CHECK(FastFixedDtoa(0.00000000104, 10, buffer, &length, &point)); in TEST()
211 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
214 CHECK(FastFixedDtoa(0.0000000001000004, 15, buffer, &length, &point)); in TEST()
215 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
218 CHECK(FastFixedDtoa(0.0000000000100004, 15, buffer, &length, &point)); in TEST()
219 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
222 CHECK(FastFixedDtoa(0.0000000000010004, 15, buffer, &length, &point)); in TEST()
223 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
226 CHECK(FastFixedDtoa(0.0000000000001004, 15, buffer, &length, &point)); in TEST()
227 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
230 CHECK(FastFixedDtoa(0.0000000000000104, 15, buffer, &length, &point)); in TEST()
231 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
234 CHECK(FastFixedDtoa(0.000000000000001000004, 20, buffer, &length, &point)); in TEST()
235 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
238 CHECK(FastFixedDtoa(0.000000000000000100004, 20, buffer, &length, &point)); in TEST()
239 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
242 CHECK(FastFixedDtoa(0.000000000000000010004, 20, buffer, &length, &point)); in TEST()
243 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
246 CHECK(FastFixedDtoa(0.000000000000000001004, 20, buffer, &length, &point)); in TEST()
247 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
250 CHECK(FastFixedDtoa(0.000000000000000000104, 20, buffer, &length, &point)); in TEST()
251 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
254 CHECK(FastFixedDtoa(0.000000000000000000014, 20, buffer, &length, &point)); in TEST()
255 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
258 CHECK(FastFixedDtoa(0.10000000006, 10, buffer, &length, &point)); in TEST()
259 CHECK_EQ(0, strcmp("1000000001", buffer.start())); in TEST()
262 CHECK(FastFixedDtoa(0.01000000006, 10, buffer, &length, &point)); in TEST()
263 CHECK_EQ(0, strcmp("100000001", buffer.start())); in TEST()
266 CHECK(FastFixedDtoa(0.00100000006, 10, buffer, &length, &point)); in TEST()
267 CHECK_EQ(0, strcmp("10000001", buffer.start())); in TEST()
270 CHECK(FastFixedDtoa(0.00010000006, 10, buffer, &length, &point)); in TEST()
271 CHECK_EQ(0, strcmp("1000001", buffer.start())); in TEST()
274 CHECK(FastFixedDtoa(0.00001000006, 10, buffer, &length, &point)); in TEST()
275 CHECK_EQ(0, strcmp("100001", buffer.start())); in TEST()
278 CHECK(FastFixedDtoa(0.00000100006, 10, buffer, &length, &point)); in TEST()
279 CHECK_EQ(0, strcmp("10001", buffer.start())); in TEST()
282 CHECK(FastFixedDtoa(0.00000010006, 10, buffer, &length, &point)); in TEST()
283 CHECK_EQ(0, strcmp("1001", buffer.start())); in TEST()
286 CHECK(FastFixedDtoa(0.00000001006, 10, buffer, &length, &point)); in TEST()
287 CHECK_EQ(0, strcmp("101", buffer.start())); in TEST()
290 CHECK(FastFixedDtoa(0.00000000106, 10, buffer, &length, &point)); in TEST()
291 CHECK_EQ(0, strcmp("11", buffer.start())); in TEST()
294 CHECK(FastFixedDtoa(0.0000000001000006, 15, buffer, &length, &point)); in TEST()
295 CHECK_EQ(0, strcmp("100001", buffer.start())); in TEST()
298 CHECK(FastFixedDtoa(0.0000000000100006, 15, buffer, &length, &point)); in TEST()
299 CHECK_EQ(0, strcmp("10001", buffer.start())); in TEST()
302 CHECK(FastFixedDtoa(0.0000000000010006, 15, buffer, &length, &point)); in TEST()
303 CHECK_EQ(0, strcmp("1001", buffer.start())); in TEST()
306 CHECK(FastFixedDtoa(0.0000000000001006, 15, buffer, &length, &point)); in TEST()
307 CHECK_EQ(0, strcmp("101", buffer.start())); in TEST()
310 CHECK(FastFixedDtoa(0.0000000000000106, 15, buffer, &length, &point)); in TEST()
311 CHECK_EQ(0, strcmp("11", buffer.start())); in TEST()
314 CHECK(FastFixedDtoa(0.000000000000001000006, 20, buffer, &length, &point)); in TEST()
315 CHECK_EQ(0, strcmp("100001", buffer.start())); in TEST()
318 CHECK(FastFixedDtoa(0.000000000000000100006, 20, buffer, &length, &point)); in TEST()
319 CHECK_EQ(0, strcmp("10001", buffer.start())); in TEST()
322 CHECK(FastFixedDtoa(0.000000000000000010006, 20, buffer, &length, &point)); in TEST()
323 CHECK_EQ(0, strcmp("1001", buffer.start())); in TEST()
326 CHECK(FastFixedDtoa(0.000000000000000001006, 20, buffer, &length, &point)); in TEST()
327 CHECK_EQ(0, strcmp("101", buffer.start())); in TEST()
330 CHECK(FastFixedDtoa(0.000000000000000000106, 20, buffer, &length, &point)); in TEST()
331 CHECK_EQ(0, strcmp("11", buffer.start())); in TEST()
334 CHECK(FastFixedDtoa(0.000000000000000000016, 20, buffer, &length, &point)); in TEST()
335 CHECK_EQ(0, strcmp("2", buffer.start())); in TEST()
338 CHECK(FastFixedDtoa(0.6, 0, buffer, &length, &point)); in TEST()
339 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
342 CHECK(FastFixedDtoa(0.96, 1, buffer, &length, &point)); in TEST()
343 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
346 CHECK(FastFixedDtoa(0.996, 2, buffer, &length, &point)); in TEST()
347 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
350 CHECK(FastFixedDtoa(0.9996, 3, buffer, &length, &point)); in TEST()
351 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
354 CHECK(FastFixedDtoa(0.99996, 4, buffer, &length, &point)); in TEST()
355 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
358 CHECK(FastFixedDtoa(0.999996, 5, buffer, &length, &point)); in TEST()
359 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
362 CHECK(FastFixedDtoa(0.9999996, 6, buffer, &length, &point)); in TEST()
363 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
366 CHECK(FastFixedDtoa(0.99999996, 7, buffer, &length, &point)); in TEST()
367 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
370 CHECK(FastFixedDtoa(0.999999996, 8, buffer, &length, &point)); in TEST()
371 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
374 CHECK(FastFixedDtoa(0.9999999996, 9, buffer, &length, &point)); in TEST()
375 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
378 CHECK(FastFixedDtoa(0.99999999996, 10, buffer, &length, &point)); in TEST()
379 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
382 CHECK(FastFixedDtoa(0.999999999996, 11, buffer, &length, &point)); in TEST()
383 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
386 CHECK(FastFixedDtoa(0.9999999999996, 12, buffer, &length, &point)); in TEST()
387 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
390 CHECK(FastFixedDtoa(0.99999999999996, 13, buffer, &length, &point)); in TEST()
391 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
394 CHECK(FastFixedDtoa(0.999999999999996, 14, buffer, &length, &point)); in TEST()
395 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
398 CHECK(FastFixedDtoa(0.9999999999999996, 15, buffer, &length, &point)); in TEST()
399 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
402 CHECK(FastFixedDtoa(0.00999999999999996, 16, buffer, &length, &point)); in TEST()
403 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
406 CHECK(FastFixedDtoa(0.000999999999999996, 17, buffer, &length, &point)); in TEST()
407 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
410 CHECK(FastFixedDtoa(0.0000999999999999996, 18, buffer, &length, &point)); in TEST()
411 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
414 CHECK(FastFixedDtoa(0.00000999999999999996, 19, buffer, &length, &point)); in TEST()
415 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
418 CHECK(FastFixedDtoa(0.000000999999999999996, 20, buffer, &length, &point)); in TEST()
419 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
422 CHECK(FastFixedDtoa(323423.234234, 10, buffer, &length, &point)); in TEST()
423 CHECK_EQ(0, strcmp("323423234234", buffer.start())); in TEST()
426 CHECK(FastFixedDtoa(12345678.901234, 4, buffer, &length, &point)); in TEST()
427 CHECK_EQ(0, strcmp("123456789012", buffer.start())); in TEST()
430 CHECK(FastFixedDtoa(98765.432109, 5, buffer, &length, &point)); in TEST()
431 CHECK_EQ(0, strcmp("9876543211", buffer.start())); in TEST()
434 CHECK(FastFixedDtoa(42, 20, buffer, &length, &point)); in TEST()
435 CHECK_EQ(0, strcmp("42", buffer.start())); in TEST()
438 CHECK(FastFixedDtoa(0.5, 0, buffer, &length, &point)); in TEST()
439 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
442 CHECK(FastFixedDtoa(1e-23, 10, buffer, &length, &point)); in TEST()
443 CHECK_EQ(0, strcmp("", buffer.start())); in TEST()
446 CHECK(FastFixedDtoa(1e-123, 2, buffer, &length, &point)); in TEST()
447 CHECK_EQ(0, strcmp("", buffer.start())); in TEST()
450 CHECK(FastFixedDtoa(1e-123, 0, buffer, &length, &point)); in TEST()
451 CHECK_EQ(0, strcmp("", buffer.start())); in TEST()
454 CHECK(FastFixedDtoa(1e-23, 20, buffer, &length, &point)); in TEST()
455 CHECK_EQ(0, strcmp("", buffer.start())); in TEST()
458 CHECK(FastFixedDtoa(1e-21, 20, buffer, &length, &point)); in TEST()
459 CHECK_EQ(0, strcmp("", buffer.start())); in TEST()
462 CHECK(FastFixedDtoa(1e-22, 20, buffer, &length, &point)); in TEST()
463 CHECK_EQ(0, strcmp("", buffer.start())); in TEST()
466 CHECK(FastFixedDtoa(6e-21, 20, buffer, &length, &point)); in TEST()
467 CHECK_EQ(0, strcmp("1", buffer.start())); in TEST()
471 buffer, &length, &point)); in TEST()
472 CHECK_EQ(0, strcmp("91193616301674545152", buffer.start())); in TEST()
476 buffer, &length, &point)); in TEST()
477 CHECK_EQ(0, strcmp("4818466210276765", buffer.start())); in TEST()
481 buffer, &length, &point)); in TEST()
482 CHECK_EQ(0, strcmp("", buffer.start())); in TEST()
486 buffer, &length, &point)); in TEST()
487 CHECK_EQ(0, strcmp("1000000000000000128", buffer.start())); in TEST()
494 Vector<char> buffer(buffer_container, kBufferSize); in TEST() local
506 buffer, &length, &point); in TEST()
510 CHECK_EQ(0, strcmp(current_test.representation, buffer.start())); in TEST()