3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library.
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
16 set testprefix rowvalueA
19 SELECT (1, 2) IN ( (3, 4), (5, 6), (1, 3) );
23 SELECT (1, 2) IN ( (3, 4), (5, 6), (1, 2) );
27 SELECT (1, 2) IN ( (3, 2) );
31 SELECT (1, 2) IN ( (1, 2) );
39 SELECT (1, 2) NOT IN ( );
42 for {set ii 0} {$ii < 2000} {incr ii} {
43 lappend L "($ii, $ii)"
46 do_execsql_test 1.6.1 "
47 SELECT (400,400) IN ( [join $L ,] )
50 do_execsql_test 1.6.2 "
51 SELECT (1500,1500) IN ( [join $L ,] )
54 do_execsql_test 1.6.2 "
55 SELECT (1500,1499) IN ( [join $L ,] )
58 #-------------------------------------------------------------------------
60 do_catchsql_test 2.0 {
61 SELECT (1, 2) IN ( (1, 2), (3, 4, 5), (5, 6) )
62 } {1 {IN(...) element has 3 terms - expected 2}}
64 do_catchsql_test 2.1 {
65 SELECT (1, 2) IN ( (1, 2), 4, (5, 6) )
66 } {1 {IN(...) element has 1 term - expected 2}}
68 do_catchsql_test 2.2 {
69 SELECT (1, 2, 3) IN ( (1, 2), (3, 4), (5, 6) )
70 } {1 {IN(...) element has 2 terms - expected 3}}
72 do_catchsql_test 2.3 {
73 SELECT 2 IN ( (1, 2), (3, 4), (5, 6) )
74 } {1 {row value misused}}