Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Disable several toreal() tests that require high floating point precision when it is unavailable. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | toTypeFuncs |
Files: | files | file ages | folders |
SHA1: |
b724219b008d9851de18bd4158375100 |
User & Date: | mistachkin 2013-08-29 02:27:39.369 |
Context
2013-08-31
| ||
21:41 | Handle BLOBs specially, treating them as binary, in the tointeger() and toreal() SQL functions. (check-in: c4c53acb98 user: mistachkin tags: toTypeFuncs) | |
2013-08-29
| ||
02:27 | Disable several toreal() tests that require high floating point precision when it is unavailable. (check-in: b724219b00 user: mistachkin tags: toTypeFuncs) | |
01:17 | Prevent the implementation of the toreal() SQL function from being 'optimized' by MSVC. (check-in: 047bd1c245 user: mistachkin tags: toTypeFuncs) | |
Changes
Changes to test/func4.test.
1 2 3 4 5 6 7 8 9 10 | # 2013 March 10 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** | | | < > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # 2013 March 10 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. The focus of # this file is testing the tointeger() and toreal() functions. # # Several of the toreal() tests are disabled on platforms where floating # point precision is not high enough to represent their constant integer # expression arguments as double precision floating point values. # set testdir [file dirname $argv0] source $testdir/tester.tcl set saved_tcl_precision $tcl_precision set tcl_precision 0 do_execsql_test func4-1.1 { |
︙ | ︙ | |||
180 181 182 183 184 185 186 187 188 189 190 191 192 193 | SELECT tointeger(18446744073709551616); } {{}} do_execsql_test func4-1.55 { SELECT tointeger(18446744073709551616 + 1); } {{}} ifcapable floatingpoint { do_execsql_test func4-2.1 { SELECT toreal(NULL); } {{}} do_execsql_test func4-2.2 { SELECT toreal(''); } {{}} do_execsql_test func4-2.3 { | > > > | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | SELECT tointeger(18446744073709551616); } {{}} do_execsql_test func4-1.55 { SELECT tointeger(18446744073709551616 + 1); } {{}} ifcapable floatingpoint { set highPrecision [expr \ {[memdbsql {SELECT toreal(-9223372036854775808 + 1);}] eq {{}}}] do_execsql_test func4-2.1 { SELECT toreal(NULL); } {{}} do_execsql_test func4-2.2 { SELECT toreal(''); } {{}} do_execsql_test func4-2.3 { |
︙ | ︙ | |||
252 253 254 255 256 257 258 | } {-Inf} do_execsql_test func4-2.23 { SELECT toreal(-9223372036854775808 - 1); } {-9.223372036854776e+18} do_execsql_test func4-2.24 { SELECT toreal(-9223372036854775808); } {-9.223372036854776e+18} | > | | | > > | | | | | | > > | | | | | | > | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | } {-Inf} do_execsql_test func4-2.23 { SELECT toreal(-9223372036854775808 - 1); } {-9.223372036854776e+18} do_execsql_test func4-2.24 { SELECT toreal(-9223372036854775808); } {-9.223372036854776e+18} if {$highPrecision} { do_execsql_test func4-2.25 { SELECT toreal(-9223372036854775808 + 1); } {{}} } do_execsql_test func4-2.26 { SELECT toreal(-9223372036854775807 - 1); } {-9.223372036854776e+18} if {$highPrecision} { do_execsql_test func4-2.27 { SELECT toreal(-9223372036854775807); } {{}} do_execsql_test func4-2.28 { SELECT toreal(-9223372036854775807 + 1); } {{}} } do_execsql_test func4-2.29 { SELECT toreal(-2147483648 - 1); } {-2147483649.0} do_execsql_test func4-2.30 { SELECT toreal(-2147483648); } {-2147483648.0} do_execsql_test func4-2.31 { SELECT toreal(-2147483648 + 1); } {-2147483647.0} do_execsql_test func4-2.32 { SELECT toreal(2147483647 - 1); } {2147483646.0} do_execsql_test func4-2.33 { SELECT toreal(2147483647); } {2147483647.0} do_execsql_test func4-2.34 { SELECT toreal(2147483647 + 1); } {2147483648.0} if {$highPrecision} { do_execsql_test func4-2.35 { SELECT toreal(9223372036854775807 - 1); } {{}} do_execsql_test func4-2.36 { SELECT toreal(9223372036854775807); } {{}} } do_execsql_test func4-2.37 { SELECT toreal(9223372036854775807 + 1); } {9.223372036854776e+18} do_execsql_test func4-2.38 { SELECT toreal(1.79769313486232e308 - 1); } {Inf} do_execsql_test func4-2.39 { |
︙ | ︙ | |||
315 316 317 318 319 320 321 | } {4503599627370497.0} do_execsql_test func4-2.44 { SELECT toreal(9007199254740992 - 1); } {9007199254740991.0} do_execsql_test func4-2.45 { SELECT toreal(9007199254740992); } {9007199254740992.0} | > | | | > | 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | } {4503599627370497.0} do_execsql_test func4-2.44 { SELECT toreal(9007199254740992 - 1); } {9007199254740991.0} do_execsql_test func4-2.45 { SELECT toreal(9007199254740992); } {9007199254740992.0} if {$highPrecision} { do_execsql_test func4-2.46 { SELECT toreal(9007199254740992 + 1); } {{}} } do_execsql_test func4-2.47 { SELECT toreal(9007199254740992 + 2); } {9007199254740994.0} do_execsql_test func4-2.48 { SELECT toreal(tointeger(9223372036854775808) - 1); } {{}} do_execsql_test func4-2.49 { |
︙ | ︙ | |||
545 546 547 548 549 550 551 | } {1} do_execsql_test func4-5.6 { SELECT tointeger(toreal(-9223372036854775808 - 1)); } {-9223372036854775808} do_execsql_test func4-5.7 { SELECT tointeger(toreal(-9223372036854775808)); } {-9223372036854775808} | > | | | > | 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 | } {1} do_execsql_test func4-5.6 { SELECT tointeger(toreal(-9223372036854775808 - 1)); } {-9223372036854775808} do_execsql_test func4-5.7 { SELECT tointeger(toreal(-9223372036854775808)); } {-9223372036854775808} if {$highPrecision} { do_execsql_test func4-5.8 { SELECT tointeger(toreal(-9223372036854775808 + 1)); } {{}} } do_execsql_test func4-5.9 { SELECT tointeger(toreal(-2147483648 - 1)); } {-2147483649} do_execsql_test func4-5.10 { SELECT tointeger(toreal(-2147483648)); } {-2147483648} do_execsql_test func4-5.11 { |
︙ | ︙ | |||
590 591 592 593 594 595 596 | } {4503599627370497} do_execsql_test func4-5.21 { SELECT tointeger(toreal(9007199254740992 - 1)); } {9007199254740991} do_execsql_test func4-5.22 { SELECT tointeger(toreal(9007199254740992)); } {9007199254740992} | > | | | > | 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | } {4503599627370497} do_execsql_test func4-5.21 { SELECT tointeger(toreal(9007199254740992 - 1)); } {9007199254740991} do_execsql_test func4-5.22 { SELECT tointeger(toreal(9007199254740992)); } {9007199254740992} if {$highPrecision} { do_execsql_test func4-5.23 { SELECT tointeger(toreal(9007199254740992 + 1)); } {{}} } do_execsql_test func4-5.24 { SELECT tointeger(toreal(9007199254740992 + 2)); } {9007199254740994} do_execsql_test func4-5.25 { SELECT tointeger(toreal(9223372036854775808 - 1)); } {{}} do_execsql_test func4-5.26 { |
︙ | ︙ |