[BACK]Return to 32 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / regress / include / bitstring / good

File: [cvs.NetBSD.org] / src / regress / include / bitstring / good / Attic / 32 (download)

Revision 1.1, Sat May 22 06:14:45 1993 UTC (29 years, 4 months ago) by cgd
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1, netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, mjf-devfs2-base, mjf-devfs2, minoura-xpg4dl-base, minoura-xpg4dl, matt-premerge-20091211, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, fvdl_fs64_base, cube-autoconf-base, cube-autoconf, comdex-fall-1999-base, comdex-fall-1999, abandoned-netbsd-4-base, abandoned-netbsd-4

add "good output" for bitstring regression tests

Testing with TEST_LENGTH = 32

test _bit_byte, _bit_mask, and bitstr_size
  i   _bit_byte(i)   _bit_mask(i) bitstr_size(i)
  0              0              1              0
  1              0              2              1
  2              0              4              1
  3              0              8              1
  4              0             16              1
  5              0             32              1
  6              0             64              1
  7              0            128              1
  8              1              1              1
  9              1              2              2
 10              1              4              2
 11              1              8              2
 12              1             16              2
 13              1             32              2
 14              1             64              2
 15              1            128              2
 16              2              1              2
 17              2              2              3
 18              2              4              3
 19              2              8              3
 20              2             16              3
 21              2             32              3
 22              2             64              3
 23              2            128              3
 24              3              1              3
 25              3              2              4
 26              3              4              4
 27              3              8              4
 28              3             16              4
 29              3             32              4
 30              3             64              4
 31              3            128              4

test bit_alloc, clearbits, bit_ffc, bit_ffs
be:   0  -1 00000000000000000000000000000000
is:   0  -1 00000000000000000000000000000000

test bit_set
be:   1   0 10010010010010010010010010010010
is:   1   0 10010010010010010010010010010010

test bit_clear
be:   0   3 00010000010000010000010000010000
is:   0   3 00010000010000010000010000010000

test bit_test using previous bitstring
  i    bit_test(i)
  0              0
  1              0
  2              0
  3              8
  4              0
  5              0
  6              0
  7              0
  8              0
  9              2
 10              0
 11              0
 12              0
 13              0
 14              0
 15            128
 16              0
 17              0
 18              0
 19              0
 20              0
 21             32
 22              0
 23              0
 24              0
 25              0
 26              0
 27              8
 28              0
 29              0
 30              0
 31              0

test clearbits
be:   0  -1 00000000000000000000000000000000
is:   0  -1 00000000000000000000000000000000

test bit_nset and bit_nclear
be:   0   1 01111111111111111111111111111110
is:   0   1 01111111111111111111111111111110
be:   0   1 01000000000000000000000000000010
is:   0   1 01000000000000000000000000000010
be:   0  -1 00000000000000000000000000000000
is:   0  -1 00000000000000000000000000000000
be:  31   0 11111111111111111111111111111110
is:  31   0 11111111111111111111111111111110
be:   0  -1 00000000000000000000000000000000
is:   0  -1 00000000000000000000000000000000

first 1 bit should move right 1 position each line
  0  -1   0 11111111111111111111111111111111
  1   0   1 01111111111111111111111111111111
  2   0   2 00111111111111111111111111111111
  3   0   3 00011111111111111111111111111111
  4   0   4 00001111111111111111111111111111
  5   0   5 00000111111111111111111111111111
  6   0   6 00000011111111111111111111111111
  7   0   7 00000001111111111111111111111111
  8   0   8 00000000111111111111111111111111
  9   0   9 00000000011111111111111111111111
 10   0  10 00000000001111111111111111111111
 11   0  11 00000000000111111111111111111111
 12   0  12 00000000000011111111111111111111
 13   0  13 00000000000001111111111111111111
 14   0  14 00000000000000111111111111111111
 15   0  15 00000000000000011111111111111111
 16   0  16 00000000000000001111111111111111
 17   0  17 00000000000000000111111111111111
 18   0  18 00000000000000000011111111111111
 19   0  19 00000000000000000001111111111111
 20   0  20 00000000000000000000111111111111
 21   0  21 00000000000000000000011111111111
 22   0  22 00000000000000000000001111111111
 23   0  23 00000000000000000000000111111111
 24   0  24 00000000000000000000000011111111
 25   0  25 00000000000000000000000001111111
 26   0  26 00000000000000000000000000111111
 27   0  27 00000000000000000000000000011111
 28   0  28 00000000000000000000000000001111
 29   0  29 00000000000000000000000000000111
 30   0  30 00000000000000000000000000000011
 31   0  31 00000000000000000000000000000001

first 0 bit should move right 1 position each line
  0   0  -1 00000000000000000000000000000000
  1   1   0 10000000000000000000000000000000
  2   2   0 11000000000000000000000000000000
  3   3   0 11100000000000000000000000000000
  4   4   0 11110000000000000000000000000000
  5   5   0 11111000000000000000000000000000
  6   6   0 11111100000000000000000000000000
  7   7   0 11111110000000000000000000000000
  8   8   0 11111111000000000000000000000000
  9   9   0 11111111100000000000000000000000
 10  10   0 11111111110000000000000000000000
 11  11   0 11111111111000000000000000000000
 12  12   0 11111111111100000000000000000000
 13  13   0 11111111111110000000000000000000
 14  14   0 11111111111111000000000000000000
 15  15   0 11111111111111100000000000000000
 16  16   0 11111111111111110000000000000000
 17  17   0 11111111111111111000000000000000
 18  18   0 11111111111111111100000000000000
 19  19   0 11111111111111111110000000000000
 20  20   0 11111111111111111111000000000000
 21  21   0 11111111111111111111100000000000
 22  22   0 11111111111111111111110000000000
 23  23   0 11111111111111111111111000000000
 24  24   0 11111111111111111111111100000000
 25  25   0 11111111111111111111111110000000
 26  26   0 11111111111111111111111111000000
 27  27   0 11111111111111111111111111100000
 28  28   0 11111111111111111111111111110000
 29  29   0 11111111111111111111111111111000
 30  30   0 11111111111111111111111111111100
 31  31   0 11111111111111111111111111111110

first 0 bit should move left 1 position each line
  0  -1   0 11111111111111111111111111111111
  1  31   0 11111111111111111111111111111110
  2  30   0 11111111111111111111111111111100
  3  29   0 11111111111111111111111111111000
  4  28   0 11111111111111111111111111110000
  5  27   0 11111111111111111111111111100000
  6  26   0 11111111111111111111111111000000
  7  25   0 11111111111111111111111110000000
  8  24   0 11111111111111111111111100000000
  9  23   0 11111111111111111111111000000000
 10  22   0 11111111111111111111110000000000
 11  21   0 11111111111111111111100000000000
 12  20   0 11111111111111111111000000000000
 13  19   0 11111111111111111110000000000000
 14  18   0 11111111111111111100000000000000
 15  17   0 11111111111111111000000000000000
 16  16   0 11111111111111110000000000000000
 17  15   0 11111111111111100000000000000000
 18  14   0 11111111111111000000000000000000
 19  13   0 11111111111110000000000000000000
 20  12   0 11111111111100000000000000000000
 21  11   0 11111111111000000000000000000000
 22  10   0 11111111110000000000000000000000
 23   9   0 11111111100000000000000000000000
 24   8   0 11111111000000000000000000000000
 25   7   0 11111110000000000000000000000000
 26   6   0 11111100000000000000000000000000
 27   5   0 11111000000000000000000000000000
 28   4   0 11110000000000000000000000000000
 29   3   0 11100000000000000000000000000000
 30   2   0 11000000000000000000000000000000
 31   1   0 10000000000000000000000000000000

first 1 bit should move left 1 position each line
  0   0  -1 00000000000000000000000000000000
  1   0  31 00000000000000000000000000000001
  2   0  30 00000000000000000000000000000011
  3   0  29 00000000000000000000000000000111
  4   0  28 00000000000000000000000000001111
  5   0  27 00000000000000000000000000011111
  6   0  26 00000000000000000000000000111111
  7   0  25 00000000000000000000000001111111
  8   0  24 00000000000000000000000011111111
  9   0  23 00000000000000000000000111111111
 10   0  22 00000000000000000000001111111111
 11   0  21 00000000000000000000011111111111
 12   0  20 00000000000000000000111111111111
 13   0  19 00000000000000000001111111111111
 14   0  18 00000000000000000011111111111111
 15   0  17 00000000000000000111111111111111
 16   0  16 00000000000000001111111111111111
 17   0  15 00000000000000011111111111111111
 18   0  14 00000000000000111111111111111111
 19   0  13 00000000000001111111111111111111
 20   0  12 00000000000011111111111111111111
 21   0  11 00000000000111111111111111111111
 22   0  10 00000000001111111111111111111111
 23   0   9 00000000011111111111111111111111
 24   0   8 00000000111111111111111111111111
 25   0   7 00000001111111111111111111111111
 26   0   6 00000011111111111111111111111111
 27   0   5 00000111111111111111111111111111
 28   0   4 00001111111111111111111111111111
 29   0   3 00011111111111111111111111111111
 30   0   2 00111111111111111111111111111111
 31   0   1 01111111111111111111111111111111

0 bit should move right 1 position each line
  0   0   1 01111111111111111111111111111111
  1   1   0 10111111111111111111111111111111
  2   2   0 11011111111111111111111111111111
  3   3   0 11101111111111111111111111111111
  4   4   0 11110111111111111111111111111111
  5   5   0 11111011111111111111111111111111
  6   6   0 11111101111111111111111111111111
  7   7   0 11111110111111111111111111111111
  8   8   0 11111111011111111111111111111111
  9   9   0 11111111101111111111111111111111
 10  10   0 11111111110111111111111111111111
 11  11   0 11111111111011111111111111111111
 12  12   0 11111111111101111111111111111111
 13  13   0 11111111111110111111111111111111
 14  14   0 11111111111111011111111111111111
 15  15   0 11111111111111101111111111111111
 16  16   0 11111111111111110111111111111111
 17  17   0 11111111111111111011111111111111
 18  18   0 11111111111111111101111111111111
 19  19   0 11111111111111111110111111111111
 20  20   0 11111111111111111111011111111111
 21  21   0 11111111111111111111101111111111
 22  22   0 11111111111111111111110111111111
 23  23   0 11111111111111111111111011111111
 24  24   0 11111111111111111111111101111111
 25  25   0 11111111111111111111111110111111
 26  26   0 11111111111111111111111111011111
 27  27   0 11111111111111111111111111101111
 28  28   0 11111111111111111111111111110111
 29  29   0 11111111111111111111111111111011
 30  30   0 11111111111111111111111111111101
 31  31   0 11111111111111111111111111111110

1 bit should move right 1 position each line
  0   1   0 10000000000000000000000000000000
  1   0   1 01000000000000000000000000000000
  2   0   2 00100000000000000000000000000000
  3   0   3 00010000000000000000000000000000
  4   0   4 00001000000000000000000000000000
  5   0   5 00000100000000000000000000000000
  6   0   6 00000010000000000000000000000000
  7   0   7 00000001000000000000000000000000
  8   0   8 00000000100000000000000000000000
  9   0   9 00000000010000000000000000000000
 10   0  10 00000000001000000000000000000000
 11   0  11 00000000000100000000000000000000
 12   0  12 00000000000010000000000000000000
 13   0  13 00000000000001000000000000000000
 14   0  14 00000000000000100000000000000000
 15   0  15 00000000000000010000000000000000
 16   0  16 00000000000000001000000000000000
 17   0  17 00000000000000000100000000000000
 18   0  18 00000000000000000010000000000000
 19   0  19 00000000000000000001000000000000
 20   0  20 00000000000000000000100000000000
 21   0  21 00000000000000000000010000000000
 22   0  22 00000000000000000000001000000000
 23   0  23 00000000000000000000000100000000
 24   0  24 00000000000000000000000010000000
 25   0  25 00000000000000000000000001000000
 26   0  26 00000000000000000000000000100000
 27   0  27 00000000000000000000000000010000
 28   0  28 00000000000000000000000000001000
 29   0  29 00000000000000000000000000000100
 30   0  30 00000000000000000000000000000010
 31   0  31 00000000000000000000000000000001