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

Unified Diff: third_party/sqlite/src/test/notnull.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/test/notify3.test ('k') | third_party/sqlite/src/test/numcast.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/notnull.test
diff --git a/third_party/sqlite/src/test/notnull.test b/third_party/sqlite/src/test/notnull.test
index 240aaba9d7eded5a5590bd423811ff5c65520931..23fd33d4bade6ee7c6f200a8c2da9b582cc2668e 100644
--- a/third_party/sqlite/src/test/notnull.test
+++ b/third_party/sqlite/src/test/notnull.test
@@ -47,7 +47,8 @@ do_test notnull-1.2 {
INSERT INTO t1(b,c,d,e) VALUES(2,3,4,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-1.2b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-1.3 {
catchsql {
DELETE FROM t1;
@@ -61,14 +62,16 @@ do_test notnull-1.4 {
INSERT OR REPLACE INTO t1(b,c,d,e) VALUES(2,3,4,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-1.4b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-1.5 {
catchsql {
DELETE FROM t1;
INSERT OR ABORT INTO t1(b,c,d,e) VALUES(2,3,4,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-1.5b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-1.6 {
catchsql {
DELETE FROM t1;
@@ -103,7 +106,8 @@ do_test notnull-1.10 {
INSERT INTO t1(a,b,c,d,e) VALUES(1,null,3,4,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.b may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.b}}
+verify_ex_errcode notnull-1.10b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-1.11 {
catchsql {
DELETE FROM t1;
@@ -145,14 +149,16 @@ do_test notnull-1.16 {
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,null,4,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.c may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.c}}
+verify_ex_errcode notnull-1.16b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-1.17 {
catchsql {
DELETE FROM t1;
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,3,null,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.d may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.d}}
+verify_ex_errcode notnull-1.17b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-1.18 {
catchsql {
DELETE FROM t1;
@@ -173,7 +179,8 @@ do_test notnull-1.20 {
INSERT INTO t1(a,b,c,d,e) VALUES(1,2,3,4,null);
SELECT * FROM t1 order by a;
}
-} {1 {t1.e may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.e}}
+verify_ex_errcode notnull-1.20b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-1.21 {
catchsql {
DELETE FROM t1;
@@ -189,7 +196,8 @@ do_test notnull-2.1 {
UPDATE t1 SET a=null;
SELECT * FROM t1 ORDER BY a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-2.1b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-2.2 {
catchsql {
DELETE FROM t1;
@@ -197,7 +205,8 @@ do_test notnull-2.2 {
UPDATE OR REPLACE t1 SET a=null;
SELECT * FROM t1 ORDER BY a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-2.2b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-2.3 {
catchsql {
DELETE FROM t1;
@@ -213,7 +222,8 @@ do_test notnull-2.4 {
UPDATE OR ABORT t1 SET a=null;
SELECT * FROM t1 ORDER BY a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-2.4b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-2.5 {
catchsql {
DELETE FROM t1;
@@ -221,7 +231,8 @@ do_test notnull-2.5 {
UPDATE t1 SET b=null;
SELECT * FROM t1 ORDER BY a;
}
-} {1 {t1.b may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.b}}
+verify_ex_errcode notnull-2.6b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-2.6 {
catchsql {
DELETE FROM t1;
@@ -261,7 +272,8 @@ do_test notnull-2.10 {
UPDATE t1 SET e=null, a=b, b=a;
SELECT * FROM t1 ORDER BY a;
}
-} {1 {t1.e may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.e}}
+verify_ex_errcode notnull-2.10b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-3.0 {
execsql {
@@ -286,7 +298,8 @@ do_test notnull-3.2 {
INSERT INTO t1(b,c,d,e) VALUES(2,3,4,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-3.2b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-3.3 {
catchsql {
DELETE FROM t1;
@@ -300,14 +313,16 @@ do_test notnull-3.4 {
INSERT OR REPLACE INTO t1(b,c,d,e) VALUES(2,3,4,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-3.4b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-3.5 {
catchsql {
DELETE FROM t1;
INSERT OR ABORT INTO t1(b,c,d,e) VALUES(2,3,4,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-3.5b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-3.6 {
catchsql {
DELETE FROM t1;
@@ -342,7 +357,8 @@ do_test notnull-3.10 {
INSERT INTO t1(a,b,c,d,e) VALUES(1,null,3,4,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.b may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.b}}
+verify_ex_errcode notnull-3.10b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-3.11 {
catchsql {
DELETE FROM t1;
@@ -384,14 +400,16 @@ do_test notnull-3.16 {
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,null,4,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.c may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.c}}
+verify_ex_errcode notnull-3.16b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-3.17 {
catchsql {
DELETE FROM t1;
INSERT OR ABORT INTO t1(a,b,c,d,e) VALUES(1,2,3,null,5);
SELECT * FROM t1 order by a;
}
-} {1 {t1.d may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.d}}
+verify_ex_errcode notnull-3.17b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-3.18 {
catchsql {
DELETE FROM t1;
@@ -412,7 +430,8 @@ do_test notnull-3.20 {
INSERT INTO t1(a,b,c,d,e) VALUES(1,2,3,4,null);
SELECT * FROM t1 order by a;
}
-} {1 {t1.e may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.e}}
+verify_ex_errcode notnull-3.20b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-3.21 {
catchsql {
DELETE FROM t1;
@@ -428,7 +447,8 @@ do_test notnull-4.1 {
UPDATE t1 SET a=null;
SELECT * FROM t1 ORDER BY a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-4.1b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-4.2 {
catchsql {
DELETE FROM t1;
@@ -436,7 +456,8 @@ do_test notnull-4.2 {
UPDATE OR REPLACE t1 SET a=null;
SELECT * FROM t1 ORDER BY a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-4.2b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-4.3 {
catchsql {
DELETE FROM t1;
@@ -452,7 +473,8 @@ do_test notnull-4.4 {
UPDATE OR ABORT t1 SET a=null;
SELECT * FROM t1 ORDER BY a;
}
-} {1 {t1.a may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.a}}
+verify_ex_errcode notnull-4.4b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-4.5 {
catchsql {
DELETE FROM t1;
@@ -460,7 +482,8 @@ do_test notnull-4.5 {
UPDATE t1 SET b=null;
SELECT * FROM t1 ORDER BY a;
}
-} {1 {t1.b may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.b}}
+verify_ex_errcode notnull-4.5b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-4.6 {
catchsql {
DELETE FROM t1;
@@ -500,7 +523,8 @@ do_test notnull-4.10 {
UPDATE t1 SET e=null, a=b, b=a;
SELECT * FROM t1 ORDER BY a;
}
-} {1 {t1.e may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.e}}
+verify_ex_errcode notnull-4.10b SQLITE_CONSTRAINT_NOTNULL
# Test that bug 29ab7be99f is fixed.
#
@@ -518,7 +542,8 @@ do_test notnull-5.2 {
INSERT INTO t1 VALUES(1, 2);
INSERT INTO t1 SELECT * FROM t2;
}
-} {1 {t1.b may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.b}}
+verify_ex_errcode notnull-5.2b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-5.3 {
execsql { SELECT * FROM t1 }
} {1 2}
@@ -530,10 +555,10 @@ do_test notnull-5.4 {
INSERT INTO t1 SELECT * FROM t2;
COMMIT;
}
-} {1 {t1.b may not be NULL}}
+} {1 {NOT NULL constraint failed: t1.b}}
+verify_ex_errcode notnull-5.4b SQLITE_CONSTRAINT_NOTNULL
do_test notnull-5.5 {
execsql { SELECT * FROM t1 }
} {1 2}
finish_test
-
« no previous file with comments | « third_party/sqlite/src/test/notify3.test ('k') | third_party/sqlite/src/test/numcast.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698