00branches.t #1

  • //
  • guest/
  • perforce_software/
  • revml/
  • t/
  • 00branches.t
  • View
  • Commits
  • Open Download .zip Download (631 B)
#!/usr/local/bin/perl -w

=head1 NAME

00branches.t - testing of VCP::Branches

=cut

use strict ;

use Carp ;
use Test ;
use VCP::Branch ;
use VCP::Branches ;

## TODO: Add lots of tests to 00branches.t

my $b ;

my @tests = (
sub { $b = VCP::Branches->new ; ok( ref $b, "VCP::Branches" ) },

sub { ok 0+$b->get, 0 },

sub {
   $b->add( VCP::Branch->new( branch_id => "foo" ) );
   ok 0+$b->get, 1;
},

sub {
   $b->add( VCP::Branch->new( branch_id => "foo" ) );
   ok 0+$b->get, 1;
},

sub {
   $b->add( VCP::Branch->new( branch_id => "bar" ) );
   ok 0+$b->get, 2;
},

) ;

plan tests => scalar( @tests ) ;

$_->() for @tests ;
# Change User Description Committed
#2 4008 Barrie Slaymaker - Remove abandoned code
#1 1998 Barrie Slaymaker Initial, revml and core VCP support for branches