Update test file walprotocol.test to account for the changes in the wal
[sqlite.git] / test / win32heap.test
blob82a3f6b6634b248fd0fd27e9f9bd459682a602af
1 # 2013 November 22
3 # The author disclaims copyright to this source code.  In place of
4 # a legal notice, here is a blessing:
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.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library.  The
12 # focus of this script is the Win32 heap implementation.
15 if {$tcl_platform(platform)!="windows"} return
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
20 ifcapable !win32malloc {
21   finish_test
22   return
25 set testprefix win32heap
27 do_test 1.1 {
28   catch {db close}
29   sqlite3_shutdown
30   sqlite3_config_heap_size 1048576
31   sqlite3_initialize
32 } {SQLITE_OK}
34 do_test 1.2 {
35   sqlite3 db test.db
36   catchsql {
37     CREATE TABLE t1(x);
38   }
39 } {0 {}}
41 do_test 1.3 {
42   catchsql {
43     INSERT INTO t1 (x) VALUES(RANDOMBLOB(1048576));
44   }
45 } {1 {out of memory}}
47 do_test 1.4 {
48   catchsql {
49     SELECT COUNT(*) FROM t1;
50   }
51 } {0 0}
53 do_test 1.5 {
54   catch {db close}
55   sqlite3_shutdown
56   sqlite3_config_heap_size 0
57   sqlite3_initialize
58 } {SQLITE_OK}
60 do_test 1.6 {
61   sqlite3 db test.db
62   catchsql {
63     INSERT INTO t1 (x) VALUES(RANDOMBLOB(1048576));
64   }
65 } {0 {}}
67 do_test 1.7 {
68   catchsql {
69     SELECT COUNT(*) FROM t1;
70   }
71 } {0 1}
73 finish_test