os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/varint.test
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/varint.test	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,32 @@
     1.4 +# 2001 September 15
     1.5 +#
     1.6 +# The author disclaims copyright to this source code.  In place of
     1.7 +# a legal notice, here is a blessing:
     1.8 +#
     1.9 +#    May you do good and not evil.
    1.10 +#    May you find forgiveness for yourself and forgive others.
    1.11 +#    May you share freely, never taking more than you give.
    1.12 +#
    1.13 +#***********************************************************************
    1.14 +# This file implements regression tests for SQLite library.  The
    1.15 +# focus of this script is variable-length integer encoding scheme.
    1.16 +#
    1.17 +# $Id: varint.test,v 1.1 2004/05/18 15:57:42 drh Exp $
    1.18 +
    1.19 +
    1.20 +set testdir [file dirname $argv0]
    1.21 +source $testdir/tester.tcl
    1.22 +
    1.23 +# Test reading and writing of varints.
    1.24 +#
    1.25 +set cnt 0
    1.26 +foreach start {0 100 10000 1000000 0x10000000} {
    1.27 +  foreach mult {1 0x10 0x100 0x1000 0x10000 0x100000 0x1000000 0x10000000} {
    1.28 +    foreach incr {1 500 10000 50000000} {
    1.29 +      incr cnt
    1.30 +      do_test varint-1.$cnt {
    1.31 +        btree_varint_test $start $mult 5000 $incr
    1.32 +      } {}
    1.33 +    }
    1.34 +  }
    1.35 +}