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

Side by Side Diff: third_party/sqlite/src/ext/rtree/rtree9.test

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. 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
1 # 2010 August 28 1 # 2010 August 28
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 #***********************************************************************
11 # This file contains tests for the r-tree module. Specifically, it tests 11 # This file contains tests for the r-tree module. Specifically, it tests
12 # that custom r-tree queries (geometry callbacks) work. 12 # that custom r-tree queries (geometry callbacks) work.
13 # 13 #
14 14
15 if {![info exists testdir]} { 15 if {![info exists testdir]} {
16 set testdir [file join [file dirname [info script]] .. .. test] 16 set testdir [file join [file dirname [info script]] .. .. test]
17 } 17 }
18 source $testdir/tester.tcl 18 source $testdir/tester.tcl
19 ifcapable !rtree { finish_test ; return } 19 ifcapable !rtree { finish_test ; return }
20 ifcapable rtree_int_only { finish_test; return }
20 21
21 register_cube_geom db 22 register_cube_geom db
22 23
23 do_execsql_test rtree9-1.1 { 24 do_execsql_test rtree9-1.1 {
24 CREATE VIRTUAL TABLE rt USING rtree(id, x1, x2, y1, y2, z1, z2); 25 CREATE VIRTUAL TABLE rt USING rtree(id, x1, x2, y1, y2, z1, z2);
25 INSERT INTO rt VALUES(1, 1, 2, 1, 2, 1, 2); 26 INSERT INTO rt VALUES(1, 1, 2, 1, 2, 1, 2);
26 } {} 27 } {}
27 do_execsql_test rtree9-1.2 { 28 do_execsql_test rtree9-1.2 {
28 SELECT * FROM rt WHERE id MATCH cube(0, 0, 0, 2, 2, 2); 29 SELECT * FROM rt WHERE id MATCH cube(0, 0, 0, 2, 2, 2);
29 } {1 1.0 2.0 1.0 2.0 1.0 2.0} 30 } {1 1.0 2.0 1.0 2.0 1.0 2.0}
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 do_execsql_test rtree9-5.2 { 117 do_execsql_test rtree9-5.2 {
117 SELECT id FROM rt2 WHERE id MATCH circle(0.0, 0.0, 2.0); 118 SELECT id FROM rt2 WHERE id MATCH circle(0.0, 0.0, 2.0);
118 } {1 2 3 4 13 14 15 16 17} 119 } {1 2 3 4 13 14 15 16 17}
119 120
120 do_execsql_test rtree9-5.3 { 121 do_execsql_test rtree9-5.3 {
121 UPDATE rt2 SET xmin=xmin+5, ymin=ymin+5, xmax=xmax+5, ymax=ymax+5; 122 UPDATE rt2 SET xmin=xmin+5, ymin=ymin+5, xmax=xmax+5, ymax=ymax+5;
122 SELECT id FROM rt2 WHERE id MATCH circle(5.0, 5.0, 2.0); 123 SELECT id FROM rt2 WHERE id MATCH circle(5.0, 5.0, 2.0);
123 } {1 2 3 4 13 14 15 16 17} 124 } {1 2 3 4 13 14 15 16 17}
124 125
125 finish_test 126 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698