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

Side by Side Diff: third_party/sqlite/ext/rtree/rtree3.test

Issue 3108030: Move bundled copy of sqlite one level deeper to better separate it... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/ext/rtree/rtree2.test ('k') | third_party/sqlite/ext/rtree/rtree4.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # 2008 Feb 19
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 #
12 # The focus of this file is testing that the r-tree correctly handles
13 # out-of-memory conditions.
14 #
15 # $Id: rtree3.test,v 1.2 2008/06/23 15:55:52 danielk1977 Exp $
16 #
17
18 if {![info exists testdir]} {
19 set testdir [file join [file dirname $argv0] .. .. test]
20 }
21 source $testdir/tester.tcl
22
23 ifcapable !rtree {
24 finish_test
25 return
26 }
27
28 # Only run these tests if memory debugging is turned on.
29 #
30 source $testdir/malloc_common.tcl
31 if {!$MEMDEBUG} {
32 puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
33 finish_test
34 return
35 }
36
37 do_malloc_test rtree3-1 -sqlbody {
38 BEGIN TRANSACTION;
39 CREATE VIRTUAL TABLE rt USING rtree(ii, x1, x2, y1, y2);
40 INSERT INTO rt VALUES(NULL, 3, 5, 7, 9);
41 INSERT INTO rt VALUES(NULL, 13, 15, 17, 19);
42 DELETE FROM rt WHERE ii = 1;
43 SELECT * FROM rt;
44 SELECT ii FROM rt WHERE ii = 2;
45 COMMIT;
46 }
47 do_malloc_test rtree3-2 -sqlprep {
48 CREATE VIRTUAL TABLE rt USING rtree(ii, x1, x2, y1, y2);
49 INSERT INTO rt VALUES(NULL, 3, 5, 7, 9);
50 } -sqlbody {
51 DROP TABLE rt;
52 }
53
54
55 do_malloc_test rtree3-3 -sqlprep {
56 CREATE VIRTUAL TABLE rt USING rtree(ii, x1, x2, y1, y2);
57 INSERT INTO rt VALUES(NULL, 3, 5, 7, 9);
58 } -tclbody {
59 db eval BEGIN
60 for {set ii 0} {$ii < 100} {incr ii} {
61 set f [expr rand()]
62 db eval {INSERT INTO rt VALUES(NULL, $f*10.0, $f*10.0, $f*15.0, $f*15.0)}
63 }
64 db eval COMMIT
65 db eval BEGIN
66 for {set ii 0} {$ii < 100} {incr ii} {
67 set f [expr rand()]
68 db eval { DELETE FROM rt WHERE x1<($f*10.0) AND x1>($f*10.5) }
69 }
70 db eval COMMIT
71 }
72
73 finish_test
74
OLDNEW
« no previous file with comments | « third_party/sqlite/ext/rtree/rtree2.test ('k') | third_party/sqlite/ext/rtree/rtree4.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698