Permalink
Browse files

Adding tests for ::Generator's piece_count and piece_length API

  • Loading branch information...
1 parent 98672b6 commit 805e50c9a8485e54586ccbb5f98811dfe49d37b3 @sanko committed Sep 17, 2010
@@ -86,7 +86,7 @@ package Net::BitTorrent::Torrent::Generator;
handles => {
_piece_count => sub {
my ($s, $v) = @_;
- int ($s->total_size / $s->piece_length) + 1;
+ int($s->total_size / $s->piece_length) + 1;
},
_set_piece_count => sub {
my ($s, $v) = @_;
@@ -15,7 +15,7 @@ package t::10000_by_class::Net::BitTorrent::Torrent::Generator_piece_length;
't::10000_by_class::Net::BitTorrent::Torrent::Generator_multiple_files';
$|++;
- sub t_020_piece_length : Test( 5 ) {
+ sub t_020_piece_length : Test( 8 ) {
my $s = shift;
is $s->{'torrent'}->piece_length, 262144,
'default piece_length (2**18)';

0 comments on commit 805e50c

Please sign in to comment.