Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: third_party/sqlite/sqlite-src-3080704/test/win32heap.test

Issue 883353008: [sql] Import reference version of SQLite 3.8.7.4. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold back encoding change which is messing up patch. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # 2013 November 22
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
9 #
10 #***********************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this script is recovery from transient manditory locks
13 # that sometimes appear on database files due to anti-virus software.
14 #
15
16 if {$tcl_platform(platform)!="windows"} return
17
18 set testdir [file dirname $argv0]
19 source $testdir/tester.tcl
20
21 ifcapable !win32malloc {
22 finish_test
23 return
24 }
25
26 set testprefix win32heap
27
28 do_test 1.1 {
29 catch {db close}
30 sqlite3_shutdown
31 sqlite3_config_heap_size 1048576
32 sqlite3_initialize
33 } {SQLITE_OK}
34
35 do_test 1.2 {
36 sqlite3 db test.db
37 catchsql {
38 CREATE TABLE t1(x);
39 }
40 } {0 {}}
41
42 do_test 1.3 {
43 catchsql {
44 INSERT INTO t1 (x) VALUES(RANDOMBLOB(1048576));
45 }
46 } {1 {out of memory}}
47
48 do_test 1.4 {
49 catchsql {
50 SELECT COUNT(*) FROM t1;
51 }
52 } {0 0}
53
54 do_test 1.5 {
55 catch {db close}
56 sqlite3_shutdown
57 sqlite3_config_heap_size 0
58 sqlite3_initialize
59 } {SQLITE_OK}
60
61 do_test 1.6 {
62 sqlite3 db test.db
63 catchsql {
64 INSERT INTO t1 (x) VALUES(RANDOMBLOB(1048576));
65 }
66 } {0 {}}
67
68 do_test 1.7 {
69 catchsql {
70 SELECT COUNT(*) FROM t1;
71 }
72 } {0 1}
73
74 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/test/wild001.test ('k') | third_party/sqlite/sqlite-src-3080704/test/win32lock.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698