Index: testce/TestCases.cs ================================================================== --- testce/TestCases.cs +++ testce/TestCases.cs @@ -298,10 +298,14 @@ total++; try { MultipleThreadStress(cnn); frm.WriteLine("SUCCESS - MultipleThreadStress"); passed++; } catch (Exception) { frm.WriteLine("FAIL - MultipleThreadStress"); failed++; } + total++; + try { SimpleRTree(cnn); frm.WriteLine("SUCCESS - SimpleRTree"); passed++; } + catch (Exception) { frm.WriteLine("FAIL - SimpleRTree"); failed++; } + total++; try { DropTable(cnn); frm.WriteLine("SUCCESS - DropTable"); passed++; } catch (Exception) { frm.WriteLine("FAIL - DropTable"); failed++; } frm.WriteLine("\r\nTests Finished."); @@ -532,11 +536,11 @@ } internal void DropTable(DbConnection cnn) { string[] tables = { - "TestCase", "keyinfotest", "datatypetest", "TestThreads" + "TestCase", "keyinfotest", "datatypetest", "TestThreads", "TestRTree" }; foreach (string table in tables) { using (DbCommand cmd = cnn.CreateCommand()) { @@ -1197,7 +1201,32 @@ // do nothing. } } } } + + internal long SimpleRTree(DbConnection cnn) + { + using (DbCommand cmd = cnn.CreateCommand()) + { + cmd.CommandText = "CREATE VIRTUAL TABLE TestRTree USING RTREE(id, minx, maxx, miny, maxy);"; + cmd.ExecuteNonQuery(); + } + + using (DbCommand cmd = cnn.CreateCommand()) + { + cmd.CommandText = "INSERT INTO TestRTree VALUES(1, 2, 8, 2, 8);"; + cmd.ExecuteNonQuery(); + } + + long count; + + using (DbCommand cmd = cnn.CreateCommand()) + { + cmd.CommandText = "SELECT COUNT(*) FROM TestRTree;"; + count = (long)cmd.ExecuteScalar(); + } + + return count; + } } }