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

Side by Side Diff: third_party/sqlite/src/test/memsubsys2.test

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/sqlite/src/test/memsubsys1.test ('k') | third_party/sqlite/src/test/misc1.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2008 June 18 1 # 2008 June 18
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 # Test 2: Verify that the highwater mark increases after a large 74 # Test 2: Verify that the highwater mark increases after a large
75 # allocation. 75 # allocation.
76 # 76 #
77 sqlite3_memory_highwater 1 77 sqlite3_memory_highwater 1
78 set highwater [sqlite3_memory_highwater 0] 78 set highwater [sqlite3_memory_highwater 0]
79 do_test memsubsys2-2.1 { 79 do_test memsubsys2-2.1 {
80 sqlite3_free [set x [sqlite3_malloc 100000]] 80 sqlite3_free [set x [sqlite3_malloc 100000]]
81 expr {$x!="0"} 81 expr {$x!="0"}
82 } {1} 82 } {1}
83 do_test memsubsys2-2.2 { 83 do_test memsubsys2-2.2.1 {
84 expr {[sqlite3_memory_highwater 0]>=[sqlite3_memory_used]+$highwater} 84 expr {[sqlite3_memory_highwater 0]>=[sqlite3_memory_used]+100000}
85 } {1}
86 do_test memsubsys2-2.2.2 {
87 expr {[sqlite3_memory_highwater 0]>=$highwater+50000}
85 } {1} 88 } {1}
86 89
87 # Test 3: Verify that turning of memstatus disables the statistics 90 # Test 3: Verify that turning of memstatus disables the statistics
88 # tracking. 91 # tracking.
89 # 92 #
90 db close 93 db close
91 sqlite3_shutdown 94 sqlite3_shutdown
92 sqlite3_config_memstatus 0 95 sqlite3_config_memstatus 0
93 sqlite3_initialize 96 sqlite3_initialize
94 reset_highwater_marks 97 reset_highwater_marks
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } {1} 167 } {1}
165 do_test memsubsys2-4.11 { 168 do_test memsubsys2-4.11 {
166 sqlite3_memory_used 169 sqlite3_memory_used
167 } {0} 170 } {0}
168 171
169 172
170 173
171 174
172 autoinstall_test_functions 175 autoinstall_test_functions
173 finish_test 176 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/memsubsys1.test ('k') | third_party/sqlite/src/test/misc1.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698