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

Side by Side Diff: third_party/sqlite/src/ext/fts5/test/fts5ag.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (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 unified diff | Download patch
OLDNEW
1 # 2014 June 17 1 # 2014 June 17
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #************************************************************************* 10 #*************************************************************************
(...skipping 15 matching lines...) Expand all
26 # "ORDER BY rank" queries. This is done by comparing the results of 26 # "ORDER BY rank" queries. This is done by comparing the results of
27 # the fts5_test() function when run with queries of the form: 27 # the fts5_test() function when run with queries of the form:
28 # 28 #
29 # ... WHERE fts MATCH ? ORDER BY bm25(fts) [ASC|DESC] 29 # ... WHERE fts MATCH ? ORDER BY bm25(fts) [ASC|DESC]
30 # 30 #
31 # and 31 # and
32 # 32 #
33 # ... WHERE fts MATCH ? ORDER BY rank [ASC|DESC] 33 # ... WHERE fts MATCH ? ORDER BY rank [ASC|DESC]
34 # 34 #
35 35
36 foreach_detail_mode $testprefix {
37
36 do_execsql_test 1.0 { 38 do_execsql_test 1.0 {
37 CREATE VIRTUAL TABLE t1 USING fts5(x, y, z); 39 CREATE VIRTUAL TABLE t1 USING fts5(x, y, z, detail=%DETAIL%);
38 } 40 }
39 41
40 do_test 1.1 { 42 do_test 1.1 {
41 foreach {x y z} { 43 foreach {x y z} {
42 {j s m y m r n l u k} {z k f u z g h s w g} {r n o s s b v n w w} 44 {j s m y m r n l u k} {z k f u z g h s w g} {r n o s s b v n w w}
43 {m v g n d x q r r s} {q t d a q a v l h j} {s k l f s i n v q v} 45 {m v g n d x q r r s} {q t d a q a v l h j} {s k l f s i n v q v}
44 {m f f d h h s o h a} {y e v r q i u m h d} {b c k q m z l z h n} 46 {m f f d h h s o h a} {y e v r q i u m h d} {b c k q m z l z h n}
45 {j e m v k p e c j m} {m p v z d x l n i a} {v p u p m t p q i f} 47 {j e m v k p e c j m} {m p v z d x l n i a} {v p u p m t p q i f}
46 {v r w l e e t d z p} {c s b w k m n k o u} {w g y f v w v w v p} 48 {v r w l e e t d z p} {c s b w k m n k o u} {w g y f v w v w v p}
47 {k d g o u j p z n o} {t g e q l z i g b j} {f i q q j y h b g h} 49 {k d g o u j p z n o} {t g e q l z i g b j} {f i q q j y h b g h}
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 set expected [execsql $q2] 114 set expected [execsql $q2]
113 uplevel [list do_test $tn.2 [list set {} $res] $expected] 115 uplevel [list do_test $tn.2 [list set {} $res] $expected]
114 } 116 }
115 117
116 foreach {tn expr} { 118 foreach {tn expr} {
117 2.1 a 119 2.1 a
118 2.2 b 120 2.2 b
119 2.3 c 121 2.3 c
120 2.4 d 122 2.4 d
121 123
122 2.5 {"m m"}
123 2.6 {e + s}
124
125 3.0 {a AND b} 124 3.0 {a AND b}
126 3.1 {a OR b} 125 3.1 {a OR b}
127 3.2 {b OR c AND d} 126 3.2 {b OR c AND d}
128 3.3 {NEAR(c d)}
129 } { 127 } {
130 do_fts5ag_test $tn $expr 128 do_fts5ag_test $tn $expr
131
132 if {[set_test_counter errors]} break
133 } 129 }
134 130
131 if {[detail_is_full]} {
132 foreach {tn expr} {
133 4.1 {"m m"}
134 4.2 {e + s}
135 4.3 {NEAR(c d)}
136 } {
137 do_fts5ag_test $tn $expr
138 }
139 }
140
141 } ;# foreach_detail_mode
135 142
136 143
137 finish_test 144 finish_test
138 145
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698