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

Unified Diff: third_party/sqlite/src/test/select7.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/select6.test ('k') | third_party/sqlite/src/test/select9.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/select7.test
diff --git a/third_party/sqlite/src/test/select7.test b/third_party/sqlite/src/test/select7.test
index 3837c8822f1779878efbcda75e1959696183725e..e8fc4400064faa52317ac439f0dad2cd7b75df19 100644
--- a/third_party/sqlite/src/test/select7.test
+++ b/third_party/sqlite/src/test/select7.test
@@ -156,4 +156,47 @@ ifcapable compound {
}
}
+# This block of tests verifies that bug aa92c76cd4 is fixed.
+#
+do_test select7-7.1 {
+ execsql {
+ CREATE TABLE t3(a REAL);
+ INSERT INTO t3 VALUES(44.0);
+ INSERT INTO t3 VALUES(56.0);
+ }
+} {}
+do_test select7-7.2 {
+ execsql {
+ pragma vdbe_trace = 0;
+ SELECT (CASE WHEN a=0 THEN 0 ELSE (a + 25) / 50 END) AS categ, count(*)
+ FROM t3 GROUP BY categ
+ }
+} {1.38 1 1.62 1}
+do_test select7-7.3 {
+ execsql {
+ CREATE TABLE t4(a REAL);
+ INSERT INTO t4 VALUES( 2.0 );
+ INSERT INTO t4 VALUES( 3.0 );
+ }
+} {}
+do_test select7-7.4 {
+ execsql {
+ SELECT (CASE WHEN a=0 THEN 'zero' ELSE a/2 END) AS t FROM t4 GROUP BY t;
+ }
+} {1.0 1.5}
+do_test select7-7.5 {
+ execsql { SELECT a=0, typeof(a) FROM t4 }
+} {0 real 0 real}
+do_test select7-7.6 {
+ execsql { SELECT a=0, typeof(a) FROM t4 GROUP BY a }
+} {0 real 0 real}
+
+do_test select7-7.7 {
+ execsql {
+ CREATE TABLE t5(a TEXT, b INT);
+ INSERT INTO t5 VALUES(123, 456);
+ SELECT typeof(a), a FROM t5 GROUP BY a HAVING a<b;
+ }
+} {text 123}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/select6.test ('k') | third_party/sqlite/src/test/select9.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698