mirror of https://github.com/sqlite/sqlite
Increase test coverage of bitvec.c slightly. Fix the line length on a
comment in bitvec.c. (CVS 6432) FossilOrigin-Name: ca3aa3ba7d751be1c2bcd100a203cd9c794a6cef
This commit is contained in:
parent
2206a2b6ab
commit
64f798dddc
14
manifest
14
manifest
|
@ -1,5 +1,5 @@
|
|||
C Mark\suntestable\sbranches\sof\smemjournal.c\sas\ssuch.\s\sReduce\sthe\ssize\sof\sa\nsingle\sblock\sallocation\sto\sa\spower\sof\stwo.\s\sReenable\sthe\sinmemory_journal\npermutation\stest.\s(CVS\s6431)
|
||||
D 2009-04-01T23:09:44
|
||||
C Increase\stest\scoverage\sof\sbitvec.c\sslightly.\s\sFix\sthe\sline\slength\son\sa\ncomment\sin\sbitvec.c.\s(CVS\s6432)
|
||||
D 2009-04-01T23:49:04
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
|
@ -101,7 +101,7 @@ F src/analyze.c 3585d1a4c480ee85b65cf0a676e05d2c29eb6bdb
|
|||
F src/attach.c d34589d5c85d81e755e4a8fc946d313915a6fa6d
|
||||
F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627
|
||||
F src/backup.c 0082d0e5a63f04e88faee0dff0a7d63d3e92a78d
|
||||
F src/bitvec.c 44f7059ac1f874d364b34af31b9617e52223ba75
|
||||
F src/bitvec.c ef370407e03440b0852d05024fb016b14a471d3d
|
||||
F src/btmutex.c 341502bc496dc0840dcb00cde65680fb0e85c3ab
|
||||
F src/btree.c dcf8157bd4b28a6125d2900f3031a034c1f57720
|
||||
F src/btree.h e302c5747494067cd4f5763000fbe7bca767d816
|
||||
|
@ -243,7 +243,7 @@ F test/bigfile.test b746a34ce0e2039994b45fea8b7fbfa78f594cdf
|
|||
F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747
|
||||
F test/bind.test 455f7e8322a215e245414625eede3ab0e1429c14
|
||||
F test/bindxfer.test d4f573750e06c34ef2309acb95ad57da1d3c983f
|
||||
F test/bitvec.test ecea9aa315f36991e56e326701279b7775cb2bef
|
||||
F test/bitvec.test 75894a880520164d73b1305c1c3f96882615e142
|
||||
F test/blob.test 2a38d867bdf08f9ce081776acec1ac8d4bca66be
|
||||
F test/boundary1.tcl 6421b2d920d8b09539503a8673339d32f7609eb1
|
||||
F test/boundary1.test 66d7f4706ccdb42d58eafdb081de07b0eb42d77b
|
||||
|
@ -714,7 +714,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
|||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P a95b843a9251ca9f9a23e8b67c2126f4c297a534
|
||||
R ba76a4ea435a4c583deb3a28012fe1b7
|
||||
P 05c182a5db9fa96f2d588dd884ce77916b0e60e4
|
||||
R 736fecdc86bd337187f07f38299efc83
|
||||
U drh
|
||||
Z 248166af0729a14ff40d76e777b3eb92
|
||||
Z 0436fb87186a0b07c69c73ce8e383e5b
|
||||
|
|
|
@ -1 +1 @@
|
|||
05c182a5db9fa96f2d588dd884ce77916b0e60e4
|
||||
ca3aa3ba7d751be1c2bcd100a203cd9c794a6cef
|
10
src/bitvec.c
10
src/bitvec.c
|
@ -34,7 +34,7 @@
|
|||
** start of a transaction, and is thus usually less than a few thousand,
|
||||
** but can be as large as 2 billion for a really big database.
|
||||
**
|
||||
** @(#) $Id: bitvec.c,v 1.13 2009/01/20 17:06:27 danielk1977 Exp $
|
||||
** @(#) $Id: bitvec.c,v 1.14 2009/04/01 23:49:04 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
|
@ -94,8 +94,9 @@
|
|||
*/
|
||||
struct Bitvec {
|
||||
u32 iSize; /* Maximum bit index. Max iSize is 4,294,967,296. */
|
||||
u32 nSet; /* Number of bits that are set - only valid for aHash element */
|
||||
/* Max nSet is BITVEC_NINT. For BITVEC_SZ of 512, this would be 125. */
|
||||
u32 nSet; /* Number of bits that are set - only valid for aHash
|
||||
** element. Max is BITVEC_NINT. For BITVEC_SZ of 512,
|
||||
** this would be 125. */
|
||||
u32 iDivisor; /* Number of bits handled by each apSub[] entry. */
|
||||
/* Should >=0 for apSub element. */
|
||||
/* Max iDivisor is max(u32) / BITVEC_NPTR + 1. */
|
||||
|
@ -377,7 +378,8 @@ int sqlite3BitvecBuiltinTest(int sz, int *aOp){
|
|||
** is found.
|
||||
*/
|
||||
rc = sqlite3BitvecTest(0,0) + sqlite3BitvecTest(pBitvec, sz+1)
|
||||
+ sqlite3BitvecTest(pBitvec, 0);
|
||||
+ sqlite3BitvecTest(pBitvec, 0)
|
||||
+ (sqlite3BitvecSize(pBitvec) - sz);
|
||||
for(i=1; i<=sz; i++){
|
||||
if( (TESTBIT(pV,i))!=sqlite3BitvecTest(pBitvec,i) ){
|
||||
rc = i;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# Unit testing of the Bitvec object.
|
||||
#
|
||||
# $Id: bitvec.test,v 1.3 2008/11/19 18:30:35 shane Exp $
|
||||
# $Id: bitvec.test,v 1.4 2009/04/01 23:49:04 drh Exp $
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
|
@ -140,6 +140,14 @@ do_test bitvec-2.5 {
|
|||
do_test bitvec-2.6 {
|
||||
sqlite3BitvecBuiltinTest 50000 {3 60 2 50000 1 1 0}
|
||||
} 0
|
||||
do_test bitvec-2.7 {
|
||||
sqlite3BitvecBuiltinTest 5000 {
|
||||
1 25 121 125
|
||||
1 50 121 125
|
||||
2 25 121 125
|
||||
0
|
||||
}
|
||||
} 0
|
||||
|
||||
# This procedure runs sqlite3BitvecBuiltinTest with argments "n" and
|
||||
# "program". But it also causes a malloc error to occur after the
|
||||
|
|
Loading…
Reference in New Issue