SQLite

Check-in [50964ef9b0]
Login

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

Overview
Comment:Coverage improvements for main.c. (CVS 3023)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 50964ef9b0159bfdcd7eae88b0806957cab184dc
User & Date: danielk1977 2006-01-24 11:30:27.000
Context
2006-01-24
12:09
Rename some variables to avoid hiding others. Also add "static" to two function signatures that were missing it. (CVS 3024) (check-in: d86f18a427 user: danielk1977 tags: trunk)
11:30
Coverage improvements for main.c. (CVS 3023) (check-in: 50964ef9b0 user: danielk1977 tags: trunk)
10:58
General test coverage improvements. (CVS 3022) (check-in: 153940af5a user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/shared2.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 2005 January 19
#
# 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.
#
#***********************************************************************
#
# $Id: shared2.test,v 1.1 2006/01/19 08:43:32 danielk1977 Exp $

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

ifcapable !shared_cache {
  finish_test











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 2005 January 19
#
# 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.
#
#***********************************************************************
#
# $Id: shared2.test,v 1.2 2006/01/24 11:30:27 danielk1977 Exp $

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

ifcapable !shared_cache {
  finish_test
76
77
78
79
80
81
82





83
84
85
    }
  }
  list $a $count
} {32 64}

db1 close
db2 close






sqlite3_enable_shared_cache $::enable_shared_cache
finish_test







>
>
>
>
>



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
    }
  }
  list $a $count
} {32 64}

db1 close
db2 close

do_test shared2-1.4 {
  sqlite3_thread_cleanup
  sqlite3_enable_shared_cache 1
} {0}

sqlite3_enable_shared_cache $::enable_shared_cache
finish_test
Changes to test/shared_err.test.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
#***********************************************************************
#
# The focus of the tests in this file are IO errors that occur in a shared
# cache context. What happens to connection B if one connection A encounters
# an IO-error whilst reading or writing the file-system?
#
# $Id: shared_err.test,v 1.7 2006/01/24 00:15:16 drh Exp $

proc skip {args} {}


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







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
#***********************************************************************
#
# The focus of the tests in this file are IO errors that occur in a shared
# cache context. What happens to connection B if one connection A encounters
# an IO-error whilst reading or writing the file-system?
#
# $Id: shared_err.test,v 1.8 2006/01/24 11:30:27 danielk1977 Exp $

proc skip {args} {}


set testdir [file dirname $argv0]
source $testdir/tester.tcl
db close
329
330
331
332
333
334
335
















336
337
338
  dbX close
  dbY close
} -cleanup {
  catch {dbX close}
  catch {dbY close}
}

















catch {db close}
sqlite3_enable_shared_cache $::enable_shared_cache
finish_test







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
  dbX close
  dbY close
} -cleanup {
  catch {dbX close}
  catch {dbY close}
}

do_malloc_test 6 -tclbody {
  catch {db close}
  sqlite3_thread_cleanup
  sqlite3_enable_shared_cache 0
} -cleanup {
  sqlite3_enable_shared_cache 1
}

do_test shared_misuse-7.1 {
  sqlite3 db test.db
  catch {
    sqlite3_enable_shared_cache 0
  } msg
  set msg
} {library routine called out of sequence}

catch {db close}
sqlite3_enable_shared_cache $::enable_shared_cache
finish_test