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

Unified Diff: third_party/sqlite/sqlite-src-3170000/test/affinity2.test

Issue 2747283002: [sql] Import reference version of SQLite 3.17.. (Closed)
Patch Set: Created 3 years, 9 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
Index: third_party/sqlite/sqlite-src-3170000/test/affinity2.test
diff --git a/third_party/sqlite/sqlite-src-3170000/test/affinity2.test b/third_party/sqlite/sqlite-src-3170000/test/affinity2.test
new file mode 100644
index 0000000000000000000000000000000000000000..9838bd660acddd9dd1684f92b564b4f133875c3b
--- /dev/null
+++ b/third_party/sqlite/sqlite-src-3170000/test/affinity2.test
@@ -0,0 +1,61 @@
+# 2015-06-02
+#
+# 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. The
+# focus of this file is type affinity in comparison operations.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+do_execsql_test affinity2-100 {
+ CREATE TABLE t1(
+ xi INTEGER,
+ xr REAL,
+ xb BLOB,
+ xn NUMERIC,
+ xt TEXT
+ );
+ INSERT INTO t1(rowid,xi,xr,xb,xn,xt) VALUES(1,1,1,1,1,1);
+ INSERT INTO t1(rowid,xi,xr,xb,xn,xt) VALUES(2,'2','2','2','2','2');
+ INSERT INTO t1(rowid,xi,xr,xb,xn,xt) VALUES(3,'03','03','03','03','03');
+
+} {}
+do_execsql_test affinity2-110 {
+ SELECT xi, typeof(xi) FROM t1 ORDER BY rowid;
+} {1 integer 2 integer 3 integer}
+do_execsql_test affinity2-120 {
+ SELECT xr, typeof(xr) FROM t1 ORDER BY rowid;
+} {1.0 real 2.0 real 3.0 real}
+do_execsql_test affinity2-130 {
+ SELECT xb, typeof(xb) FROM t1 ORDER BY rowid;
+} {1 integer 2 text 03 text}
+do_execsql_test affinity2-140 {
+ SELECT xn, typeof(xn) FROM t1 ORDER BY rowid;
+} {1 integer 2 integer 3 integer}
+do_execsql_test affinity2-150 {
+ SELECT xt, typeof(xt) FROM t1 ORDER BY rowid;
+} {1 text 2 text 03 text}
+
+do_execsql_test affinity2-200 {
+ SELECT rowid, xi==xt, xi==xb, xi==+xt FROM t1 ORDER BY rowid;
+} {1 1 1 1 2 1 1 1 3 1 1 1}
+do_execsql_test affinity2-210 {
+ SELECT rowid, xr==xt, xr==xb, xr==+xt FROM t1 ORDER BY rowid;
+} {1 1 1 1 2 1 1 1 3 1 1 1}
+do_execsql_test affinity2-220 {
+ SELECT rowid, xn==xt, xn==xb, xn==+xt FROM t1 ORDER BY rowid;
+} {1 1 1 1 2 1 1 1 3 1 1 1}
+
+do_execsql_test affinity2-300 {
+ SELECT rowid, xt==+xi, xt==xi, xt==xb FROM t1 ORDER BY rowid;
+} {1 1 1 0 2 1 1 1 3 0 1 1}
+
+finish_test
« no previous file with comments | « third_party/sqlite/sqlite-src-3170000/test/8_3_names.test ('k') | third_party/sqlite/sqlite-src-3170000/test/affinity3.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698