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

Unified Diff: third_party/sqlite/src/test/tkt-8454a207b9.test

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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/tkt-80e031a00f.test ('k') | third_party/sqlite/src/test/tkt-94c04eaadb.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/tkt-8454a207b9.test
diff --git a/third_party/sqlite/src/test/tkt-8454a207b9.test b/third_party/sqlite/src/test/tkt-8454a207b9.test
new file mode 100644
index 0000000000000000000000000000000000000000..88a8614f8285a3cb11d1eff637891fa49257cbaa
--- /dev/null
+++ b/third_party/sqlite/src/test/tkt-8454a207b9.test
@@ -0,0 +1,67 @@
+# 2010 September 30
+#
+# 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.
+#
+#***********************************************************************
+#
+# This file implements regression tests for SQLite library. Specifically,
+# it tests that ticket [8454a207b9fd2243c4c6b7a73f67ea0315717c1a]. Verify
+# that a negative default value on an added text column actually comes
+# out negative.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+do_test tkt-8454a207b9.1 {
+ db eval {
+ CREATE TABLE t1(a);
+ INSERT INTO t1 VALUES(1);
+ ALTER TABLE t1 ADD COLUMN b TEXT DEFAULT -123.0;
+ SELECT b, typeof(b) FROM t1;
+ }
+} {-123.0 text}
+do_test tkt-8454a207b9.2 {
+ db eval {
+ ALTER TABLE t1 ADD COLUMN c TEXT DEFAULT -123.5;
+ SELECT c, typeof(c) FROM t1;
+ }
+} {-123.5 text}
+do_test tkt-8454a207b9.3 {
+ db eval {
+ ALTER TABLE t1 ADD COLUMN d TEXT DEFAULT -'hello';
+ SELECT d, typeof(d) FROM t1;
+ }
+} {0 text}
+do_test tkt-8454a207b9.4 {
+ db eval {
+ ALTER TABLE t1 ADD COLUMN e DEFAULT -123.0;
+ SELECT e, typeof(e) FROM t1;
+ }
+} {-123 integer}
+do_test tkt-8454a207b9.5 {
+ db eval {
+ ALTER TABLE t1 ADD COLUMN f DEFAULT -123.5;
+ SELECT f, typeof(f) FROM t1;
+ }
+} {-123.5 real}
+do_test tkt-8454a207b9.6 {
+ db eval {
+ ALTER TABLE t1 ADD COLUMN g DEFAULT -9223372036854775808;
+ SELECT g, typeof(g) FROM t1;
+ }
+} {-9223372036854775808 integer}
+do_test tkt-8454a207b9.7 {
+ db eval {
+ ALTER TABLE t1 ADD COLUMN h DEFAULT 9223372036854775807;
+ SELECT h, typeof(h) FROM t1;
+ }
+} {9223372036854775807 integer}
+
+
+finish_test
« no previous file with comments | « third_party/sqlite/src/test/tkt-80e031a00f.test ('k') | third_party/sqlite/src/test/tkt-94c04eaadb.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698