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 contains tests for the r-tree module.
13 # Verify that no invalid SQL is run during initialization
15 if {![info exists testdir]} {
16 set testdir [file join [file dirname [info script]] .. .. test]
18 source [file join [file dirname [info script]] rtree_util.tcl]
19 source $testdir/tester.tcl
20 ifcapable !rtree { finish_test ; return }
24 test_sqlite3_log [list lappend ::log]
30 do_execsql_test rtreeG-1.1 {
31 CREATE VIRTUAL TABLE t1 USING rtree(id,x0,x1,y0,y1);
33 do_test rtreeG-1.1log {
37 do_execsql_test rtreeG-1.2 {
38 INSERT INTO t1 VALUES(1,10,15,5,23),(2,20,21,5,23),(3,10,15,20,30);
39 SELECT id from t1 WHERE x0>8 AND x1<16 AND y0>2 AND y1<25;
41 do_rtree_integrity_test rtreeG-1.2.integrity t1
42 do_test rtreeG-1.2log {
48 do_execsql_test rtreeG-1.3 {
49 SELECT id from t1 WHERE x0>8 AND x1<16 AND y0>2 AND y1<25;
51 do_test rtreeG-1.3log {
55 do_execsql_test rtreeG-1.4 {
58 do_test rtreeG-1.4log {