/ Check-in [28efe0a4]
Login

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

Overview
Comment:In the rowhash.test, make sure global variables are cleared prior to use.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 28efe0a40405567f3eaf334b6603282d5adac792
User & Date: drh 2010-06-02 14:43:30
Context
2010-06-02
14:45
Changes to make WAL more robust against SHM locking failures and OOM errors. check-in: ebf40413 user: drh tags: trunk
14:43
In the rowhash.test, make sure global variables are cleared prior to use. check-in: 28efe0a4 user: drh tags: trunk
12:58
Undo one of the "const" markers from the previous check-in because the value needs to be changable, even if it is not actually ever changed in the current implementation. check-in: c24ac356 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/rowhash.test.

8
9
10
11
12
13
14
15


16
17
18
19
20
21
22
..
41
42
43
44
45
46
47

48
49
50
51
52
53
54
55
56
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
# This file implements regression tests for SQLite library.  The
# focus of this file is the code in rowhash.c.
#
# $Id: rowhash.test,v 1.5 2009/05/02 12:02:02 drh Exp $



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

do_test rowhash-1.1 {
  execsql {
    CREATE TABLE t1(id INTEGER PRIMARY KEY, a, b, c);
................................................................................
}

do_keyset_test rowhash-2.1 {1 2 3}
do_keyset_test rowhash-2.2 {0 1 2 3}
do_keyset_test rowhash-2.3 {62 125 188}
if {[working_64bit_int]} {
  expr srand(1)

  for {set i 4} {$i < 10} {incr i} {
    for {set j 0} {$j < 5000} {incr j} {
        lappend L [expr int(rand()*1000000000)]
    }
    do_keyset_test rowhash-2.$i $L
  }
}

finish_test







|
>
>







 







>









8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
# This file implements regression tests for SQLite library.  The
# focus of this file is the code in rowhash.c.
#
# NB:  The rowhash.c module is no longer part of the source tree.  But
# we might as well keep this test.
#

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

do_test rowhash-1.1 {
  execsql {
    CREATE TABLE t1(id INTEGER PRIMARY KEY, a, b, c);
................................................................................
}

do_keyset_test rowhash-2.1 {1 2 3}
do_keyset_test rowhash-2.2 {0 1 2 3}
do_keyset_test rowhash-2.3 {62 125 188}
if {[working_64bit_int]} {
  expr srand(1)
  unset -nocomplain i L
  for {set i 4} {$i < 10} {incr i} {
    for {set j 0} {$j < 5000} {incr j} {
        lappend L [expr int(rand()*1000000000)]
    }
    do_keyset_test rowhash-2.$i $L
  }
}

finish_test