/ Check-in [0889b22a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Changes to test script nan.test to work on symbian. (CVS 5718)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0889b22a2949160c3f2d06beaa05a867b4c228b3
User & Date: danielk1977 2008-09-18 11:30:13
Context
2008-09-18
13:49
Update the version number to 3.6.3. (CVS 5719) check-in: 419764b3 user: drh tags: trunk
11:30
Changes to test script nan.test to work on symbian. (CVS 5718) check-in: 0889b22a user: danielk1977 tags: trunk
11:18
Changes to test script io.test to work on symbian. (CVS 5717) check-in: 2b41c495 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/nan.test.

    14     14   # Make sure IEEE floating point NaN values are handled properly.
    15     15   # SQLite should always convert NaN into NULL.
    16     16   #
    17     17   # Also verify that the decimal to IEEE754 binary conversion routines
    18     18   # correctly generate 0.0, +Inf, and -Inf as appropriate for numbers
    19     19   # out of range.
    20     20   #
    21         -# $Id: nan.test,v 1.4 2008/09/17 16:14:10 danielk1977 Exp $
           21  +# $Id: nan.test,v 1.5 2008/09/18 11:30:13 danielk1977 Exp $
    22     22   #
    23     23   
    24     24   set testdir [file dirname $argv0]
    25     25   source $testdir/tester.tcl
    26     26   
    27     27   do_test nan-1.1.1 {
    28     28     db eval {
................................................................................
   255    255   } {1234.5 real}
   256    256   do_test nan-4.11 {
   257    257     db eval {DELETE FROM t1}
   258    258     db eval "INSERT INTO t1 VALUES(-1234.5[string repeat 0 10000]12345)"
   259    259     db eval {SELECT x, typeof(x) FROM t1}
   260    260   } {-1234.5 real}
   261    261   do_test nan-4.12 {
   262         -  db eval {DELETE FROM t1}
   263         -  set small [string repeat 0 10000].[string repeat 0 323][string repeat 9 10000]
   264         -  db eval "INSERT INTO t1 VALUES($small)"
   265         -  db eval {SELECT x, typeof(x) FROM t1}
   266         -} {9.88131291682493e-324 real}
   267         -do_test nan-4.13 {
   268    262     db eval {DELETE FROM t1}
   269    263     set small [string repeat 0 10000].[string repeat 0 324][string repeat 9 10000]
   270    264     db eval "INSERT INTO t1 VALUES($small)"
   271    265     db eval {SELECT x, typeof(x) FROM t1}
   272    266   } {0.0 real}
   273         -do_test nan-4.14 {
   274         -  db eval {DELETE FROM t1}
   275         -  set small \
   276         -      -[string repeat 0 10000].[string repeat 0 323][string repeat 9 10000]
   277         -  db eval "INSERT INTO t1 VALUES($small)"
   278         -  db eval {SELECT x, typeof(x) FROM t1}
   279         -} {-9.88131291682493e-324 real}
   280         -do_test nan-4.15 {
          267  +do_test nan-4.13 {
   281    268     db eval {DELETE FROM t1}
   282    269     set small \
   283    270         -[string repeat 0 10000].[string repeat 0 324][string repeat 9 10000]
   284    271     db eval "INSERT INTO t1 VALUES($small)"
   285    272     db eval {SELECT x, typeof(x) FROM t1}
   286    273   } {0.0 real}
          274  +
          275  +# These tests test some really, really small floating point numbers.
          276  +#
          277  +if {$tcl_platform(platform) != "symbian"} {
          278  +  # These two are not run on symbian because tcl has trouble converting
          279  +  # the very small numbers back to text form (probably due to a difference
          280  +  # in the sprintf() implementation).
          281  +  #
          282  +  do_test nan-4.14 {
          283  +    db eval {DELETE FROM t1}
          284  +    set small \
          285  +        [string repeat 0 10000].[string repeat 0 323][string repeat 9 10000]
          286  +    db eval "INSERT INTO t1 VALUES($small)"
          287  +    db eval {SELECT x, typeof(x) FROM t1}
          288  +  } {9.88131291682493e-324 real}
          289  +  do_test nan-4.15 {
          290  +    db eval {DELETE FROM t1}
          291  +    set small \
          292  +        -[string repeat 0 10000].[string repeat 0 323][string repeat 9 10000]
          293  +    db eval "INSERT INTO t1 VALUES($small)"
          294  +    db eval {SELECT x, typeof(x) FROM t1}
          295  +  } {-9.88131291682493e-324 real}
          296  +}
          297  +do_test nan-4.16 {
          298  +  db eval {DELETE FROM t1}
          299  +  set small [string repeat 0 10000].[string repeat 0 323][string repeat 9 10000]
          300  +  db eval "INSERT INTO t1 VALUES($small)"
          301  +  db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
          302  +} {9.88131291682493e-324 real}
          303  +do_test nan-4.17 {
          304  +  db eval {DELETE FROM t1}
          305  +  set small \
          306  +      -[string repeat 0 10000].[string repeat 0 323][string repeat 9 10000]
          307  +  db eval "INSERT INTO t1 VALUES($small)"
          308  +  db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
          309  +} {-9.88131291682493e-324 real}
   287    310   
   288    311   do_test nan-4.20 {
   289    312     db eval {DELETE FROM t1}
   290    313     set big [string repeat 9 10000].0e-9000
   291    314     db eval "INSERT INTO t1 VALUES($big)"
   292    315     db eval {SELECT x, typeof(x) FROM t1}
   293    316   } {{} null}
   294    317   
   295    318   
   296    319   
   297    320   finish_test