/ Check-in [e4766cab]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Adjust the fts3rank.test module so that it works on big-endian systems (hopefully - I don't have a big-endian machine to test the change on.)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:e4766cabdf64d8e998048ae43154466fc9c3fad0b86102a42b65122abfcbbe55
User & Date: drh 2018-01-24 14:39:18
Context
2018-01-24
14:40
Interchange the numeric codes for CURSOR_VALID and CURSOR_INVALID to obtain a small size decrease and performance increase. check-in: e0f192ea user: drh tags: trunk
14:39
Adjust the fts3rank.test module so that it works on big-endian systems (hopefully - I don't have a big-endian machine to test the change on.) check-in: e4766cab user: drh tags: trunk
13:15
Improved error message output when the btreeinfo.c extension is run in a connection that lacks sqlite_dbpage support. check-in: 461b0b81 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to test/fts3rank.test.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
52
53
54
55
56
57
58

59
60
61




62
63
64

#*************************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is testing the FTS3 module.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix fts3expr5

# If SQLITE_ENABLE_FTS3 is defined, omit this file.
ifcapable !fts3 {
  finish_test
  return
}

................................................................................
  SELECT * FROM t1 ORDER BY rank(matchinfo(t1), 1.0, 1.0) DESC, rowid
} {1 {invalid matchinfo blob passed to function rank()}}

do_catchsql_test 1.4 {
  SELECT * FROM t1 ORDER BY rank(x'0000000000000000') DESC, rowid
} {0 {{one two} one {one two} three {one two} two}}


do_catchsql_test 1.5 {
  SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
} {1 {invalid matchinfo blob passed to function rank()}}





finish_test









|







 







>
|
|
|
>
>
>
>
|
<

>
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

68
69
#*************************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is testing the FTS3 module.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix fts3rank

# If SQLITE_ENABLE_FTS3 is defined, omit this file.
ifcapable !fts3 {
  finish_test
  return
}

................................................................................
  SELECT * FROM t1 ORDER BY rank(matchinfo(t1), 1.0, 1.0) DESC, rowid
} {1 {invalid matchinfo blob passed to function rank()}}

do_catchsql_test 1.4 {
  SELECT * FROM t1 ORDER BY rank(x'0000000000000000') DESC, rowid
} {0 {{one two} one {one two} three {one two} two}}

if {$tcl_platform(byteOrder)=="littleEndian"} {
  do_catchsql_test 1.5le {
    SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
  } {1 {invalid matchinfo blob passed to function rank()}}
} else {
  do_catchsql_test 1.5be {
    SELECT * FROM t1 ORDER BY rank(x'0000000100000001') DESC, rowid
  } {1 {invalid matchinfo blob passed to function rank()}}
}


finish_test