3 # May you do good and not evil.
4 # May you find forgiveness for yourself and forgive others.
5 # May you share freely, never taking more than you give.
7 #***********************************************************************
8 # This file runs all tests.
10 # $Id: fts3.test,v 1.2 2008/07/23 18:17:32 drh Exp $
12 set testdir [file dirname $argv0]
13 source $testdir/tester.tcl
14 set testprefix fts3varint
21 proc test_list {list} {
22 foreach n $list { fts3_test_varint $n }
25 proc do_fts3_varint_test {tn list} {
26 uplevel [list do_test $tn [list test_list $list] {}]
29 do_fts3_varint_test 1.0 {
30 1 10 100 1000 10000 100000 1000000
31 10000000 100000000 1000000000 10000000000
32 100000000000 1000000000000 10000000000000
35 do_fts3_varint_test 1.1 {
36 -1 -10 -100 -1000 -10000 -100000 -1000000
37 -10000000 -100000000 -1000000000 -10000000000
38 -100000000000 -1000000000000 -10000000000000
41 do_fts3_varint_test 2.0 { 0 1 2 }
42 do_fts3_varint_test 2.1 { 1 2 3 }
43 do_fts3_varint_test 2.2 { 3 4 5 }
44 do_fts3_varint_test 2.3 { 7 8 9 }
45 do_fts3_varint_test 2.4 { 15 16 17 }
46 do_fts3_varint_test 2.5 { 31 32 33 }
47 do_fts3_varint_test 2.6 { 63 64 65 }
48 do_fts3_varint_test 2.7 { 127 128 129 }
49 do_fts3_varint_test 2.8 { 255 256 257 }
50 do_fts3_varint_test 2.9 { 511 512 513 }
51 do_fts3_varint_test 2.10 { 1023 1024 1025 }
52 do_fts3_varint_test 2.11 { 2047 2048 2049 }
53 do_fts3_varint_test 2.12 { 4095 4096 4097 }
54 do_fts3_varint_test 2.13 { 8191 8192 8193 }
55 do_fts3_varint_test 2.14 { 16383 16384 16385 }
56 do_fts3_varint_test 2.15 { 32767 32768 32769 }
57 do_fts3_varint_test 2.16 { 65535 65536 65537 }
58 do_fts3_varint_test 2.17 { 131071 131072 131073 }
59 do_fts3_varint_test 2.18 { 262143 262144 262145 }
60 do_fts3_varint_test 2.19 { 524287 524288 524289 }
61 do_fts3_varint_test 2.20 { 1048575 1048576 1048577 }
62 do_fts3_varint_test 2.21 { 2097151 2097152 2097153 }
63 do_fts3_varint_test 2.22 { 4194303 4194304 4194305 }
64 do_fts3_varint_test 2.23 { 8388607 8388608 8388609 }
65 do_fts3_varint_test 2.24 { 16777215 16777216 16777217 }
66 do_fts3_varint_test 2.25 { 33554431 33554432 33554433 }
67 do_fts3_varint_test 2.26 { 67108863 67108864 67108865 }
68 do_fts3_varint_test 2.27 { 134217727 134217728 134217729 }
69 do_fts3_varint_test 2.28 { 268435455 268435456 268435457 }
70 do_fts3_varint_test 2.29 { 536870911 536870912 536870913 }
71 do_fts3_varint_test 2.30 { 1073741823 1073741824 1073741825 }
72 do_fts3_varint_test 2.31 { 2147483647 2147483648 2147483649 }
73 do_fts3_varint_test 2.32 { 4294967295 4294967296 4294967297 }
74 do_fts3_varint_test 2.33 { 8589934591 8589934592 8589934593 }
75 do_fts3_varint_test 2.34 { 17179869183 17179869184 17179869185 }
76 do_fts3_varint_test 2.35 { 34359738367 34359738368 34359738369 }
77 do_fts3_varint_test 2.36 { 68719476735 68719476736 68719476737 }
78 do_fts3_varint_test 2.37 { 137438953471 137438953472 137438953473 }
79 do_fts3_varint_test 2.38 { 274877906943 274877906944 274877906945 }
80 do_fts3_varint_test 2.39 { 549755813887 549755813888 549755813889 }
81 do_fts3_varint_test 2.40 { 1099511627775 1099511627776 1099511627777 }
82 do_fts3_varint_test 2.41 { 2199023255551 2199023255552 2199023255553 }
83 do_fts3_varint_test 2.42 { 4398046511103 4398046511104 4398046511105 }
84 do_fts3_varint_test 2.43 { 8796093022207 8796093022208 8796093022209 }
85 do_fts3_varint_test 2.44 { 17592186044415 17592186044416 17592186044417 }
86 do_fts3_varint_test 2.45 { 35184372088831 35184372088832 35184372088833 }
87 do_fts3_varint_test 2.46 { 70368744177663 70368744177664 70368744177665 }
88 do_fts3_varint_test 2.47 { 140737488355327 140737488355328 140737488355329 }
89 do_fts3_varint_test 2.48 { 281474976710655 281474976710656 281474976710657 }
90 do_fts3_varint_test 2.49 { 562949953421311 562949953421312 562949953421313 }
91 do_fts3_varint_test 2.50 { 1125899906842623 1125899906842624 1125899906842625 }
92 do_fts3_varint_test 2.51 { 2251799813685247 2251799813685248 2251799813685249 }
93 do_fts3_varint_test 2.52 { 4503599627370495 4503599627370496 4503599627370497 }
94 do_fts3_varint_test 2.53 { 9007199254740991 9007199254740992 9007199254740993 }
95 do_fts3_varint_test 2.54 {
96 18014398509481983 18014398509481984 18014398509481985 }
97 do_fts3_varint_test 2.55 {
98 36028797018963967 36028797018963968 36028797018963969 }
99 do_fts3_varint_test 2.56 {
100 72057594037927935 72057594037927936 72057594037927937 }
101 do_fts3_varint_test 2.57 {
102 144115188075855871 144115188075855872 144115188075855873 }
103 do_fts3_varint_test 2.58 {
104 288230376151711743 288230376151711744 288230376151711745 }
105 do_fts3_varint_test 2.59 {
106 576460752303423487 576460752303423488 576460752303423489 }
107 do_fts3_varint_test 2.60 {
108 1152921504606846975 1152921504606846976 1152921504606846977 }
109 do_fts3_varint_test 2.61 {
110 2305843009213693951 2305843009213693952 2305843009213693953 }
111 do_fts3_varint_test 2.62 {
112 4611686018427387903 4611686018427387904 4611686018427387905 }
113 do_fts3_varint_test 2.63 {
114 9223372036854775807 9223372036854775808 9223372036854775809 }
116 do_fts3_varint_test 3.0 { 18446744073709551615 -18446744073709551615 }