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

Unified Diff: third_party/sqlite/src/ext/rtree/rtreeD.test

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/ext/rtree/rtreeC.test ('k') | third_party/sqlite/src/ext/rtree/rtreeE.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/ext/rtree/rtreeD.test
diff --git a/third_party/sqlite/src/ext/rtree/rtreeD.test b/third_party/sqlite/src/ext/rtree/rtreeD.test
new file mode 100644
index 0000000000000000000000000000000000000000..c4a7d22e2e50cc64225a668fef2de0f12922f0ad
--- /dev/null
+++ b/third_party/sqlite/src/ext/rtree/rtreeD.test
@@ -0,0 +1,57 @@
+# 2014 March 11
+#
+# The author disclaims copyright to this source code. In place of
+# a legal notice, here is a blessing:
+#
+# May you do good and not evil.
+# May you find forgiveness for yourself and forgive others.
+# May you share freely, never taking more than you give.
+#
+#***********************************************************************
+#
+# Miscellaneous tests for errors in the rtree constructor.
+#
+
+
+if {![info exists testdir]} {
+ set testdir [file join [file dirname [info script]] .. .. test]
+}
+source [file join [file dirname [info script]] rtree_util.tcl]
+source $testdir/tester.tcl
+source $testdir/lock_common.tcl
+ifcapable !rtree {
+ finish_test
+ return
+}
+set testprefix rtreeD
+
+#-------------------------------------------------------------------------
+# Test that if an SQLITE_BUSY is encountered within the vtable
+# constructor, a relevant error message is returned.
+#
+do_multiclient_test tn {
+ do_test 1.$tn.1 {
+ sql1 {
+ CREATE TABLE t1(a, b);
+ INSERT INTO t1 VALUES(1,2);
+ CREATE VIRTUAL TABLE rt USING rtree(id, minx, maxx, miny, maxy);
+ INSERT INTO rt VALUES(1,2,3,4,5);
+ }
+ } {}
+
+ do_test 1.$tn.2 {
+ sql2 { SELECT * FROM t1; }
+ } {1 2}
+
+ do_test 1.$tn.3 {
+ sql1 { BEGIN EXCLUSIVE; INSERT INTO t1 VALUES(3, 4); }
+ } {}
+
+ do_test 1.$tn.4 {
+ list [catch { sql2 { SELECT * FROM rt } } msg] $msg
+ } {1 {database is locked}}
+}
+
+finish_test
+
+
« no previous file with comments | « third_party/sqlite/src/ext/rtree/rtreeC.test ('k') | third_party/sqlite/src/ext/rtree/rtreeE.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698