/ Check-in [632bb3c7]
Login

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

Overview
Comment:More improvements to the 64-bit integer conversion testing in func.test. (CVS 5427)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 632bb3c73443606bd2c7a5eadf0f4b8971a2b41e
User & Date: drh 2008-07-16 18:20:09
Context
2008-07-16
18:35
Make sure the auxiliary database connection is closed after every test. (CVS 5428) check-in: e60bb6a1 user: drh tags: trunk
18:20
More improvements to the 64-bit integer conversion testing in func.test. (CVS 5427) check-in: 632bb3c7 user: drh tags: trunk
18:17
Eliminate some unnecessary IO during a commit in full auto-vacuum mode. (CVS 5426) check-in: 1d01c02a user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/func.test.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
293
294
295
296
297
298
299






300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
#    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 built-in functions.
#
# $Id: func.test,v 1.83 2008/07/16 18:04:37 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Create a table to work with.
#
do_test func-0.0 {
................................................................................
do_test func-8.5 {
  execsql {
    SELECT sum(x) FROM (SELECT '9223372036' || '854775807' AS x
                        UNION ALL SELECT -9223372036854775807)
  }
} {0}
do_test func-8.6 {






  execsql {
    SELECT typeof(sum(x)) FROM (SELECT '9223372036' || '854775808' AS x
                        UNION ALL SELECT -9223372036854775807)
  }
} {real}
do_test func-8.7 {
  execsql {
    SELECT round(sum(x)/16384.0)
      FROM (SELECT '9223372036' || '854775808' AS x
                        UNION ALL SELECT -9223372036850000000)
  }
} {291.0}

# How do you test the random() function in a meaningful, deterministic way?
#
do_test func-9.1 {
  execsql {
    SELECT random() is not null;
  }







|







 







>
>
>
>
>
>





|

<
|


|







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

313
314
315
316
317
318
319
320
321
322
323
#    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 built-in functions.
#
# $Id: func.test,v 1.84 2008/07/16 18:20:09 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Create a table to work with.
#
do_test func-0.0 {
................................................................................
do_test func-8.5 {
  execsql {
    SELECT sum(x) FROM (SELECT '9223372036' || '854775807' AS x
                        UNION ALL SELECT -9223372036854775807)
  }
} {0}
do_test func-8.6 {
  execsql {
    SELECT typeof(sum(x)) FROM (SELECT '9223372036' || '854775807' AS x
                        UNION ALL SELECT -9223372036854775807)
  }
} {integer}
do_test func-8.7 {
  execsql {
    SELECT typeof(sum(x)) FROM (SELECT '9223372036' || '854775808' AS x
                        UNION ALL SELECT -9223372036854775807)
  }
} {real}
do_test func-8.8 {
  execsql {

    SELECT sum(x)>0.0 FROM (SELECT '9223372036' || '854775808' AS x
                        UNION ALL SELECT -9223372036850000000)
  }
} {1}

# How do you test the random() function in a meaningful, deterministic way?
#
do_test func-9.1 {
  execsql {
    SELECT random() is not null;
  }