Algorithm-BitVector
view release on metacpan or search on metacpan
Examples/BitVectorDemo.pl view on Meta::CPAN
#!/usr/bin/perl -w
#use lib '../blib/lib', '../blib/arch';
## BitVectorDemo.pl
use strict;
use Algorithm::BitVector 1.26;
# Construct an EMPTY bitvector (a bitvector of size 0):
print "\nConstructing an EMPTY bitvector (a bitvector of size 0):\n";
my $bv1 = Algorithm::BitVector->new( size => 0 );
print "$bv1\n"; # no output
use Test::Simple tests => 3;
use lib '../blib/lib','../blib/arch';
use Algorithm::BitVector;
# Test 1 (Data generation with intVal option):
my $b = Algorithm::BitVector->new( intVal => 15 );
ok ( int($b) == 15, 'BitVector generation with intVal option works' );
# Test 2 (Data generation with size option):
( run in 0.281 second using v1.01-cache-2.11-cpan-87723dcf8b7 )