Bug 13673: Remove diags

TEST PLAN
---------
1) Apply first two patches
2) $ prove t/db_dependent/Barcodes.t
   -- Diags have been removed, just noisy warnings left.
3) $ git diff -w origin/master
   -- only excess print's and diag's removed.
4) koha qa test tools

Signed-off-by: Indranil Das Gupta <indradg@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Mark Tompsett 2015-05-08 16:42:55 -04:00 committed by Tomas Cohen Arazi
parent 19e0fb4608
commit aefcd68ff7
1 changed files with 0 additions and 10 deletions

View File

@ -17,7 +17,6 @@ my %thash = (
EAN13 => ['0000000695152','892685001928'],
);
print "\n";
my ($obj1,$obj2,$format,$value,$initial,$serial,$re,$next,$previous,$temp);
my @formats = sort keys %thash;
foreach (@formats) {
@ -28,14 +27,11 @@ foreach (@formats) {
ok($_ eq ($format = $obj1->autoBarcode()), "$pre autoBarcode() : " . ($format || 'FAILED') );
ok($initial= $obj1->initial(), "$pre initial() : " . ($initial|| 'FAILED') );
$temp = $obj1->db_max();
diag ". $pre db_max() : " . ($temp || 'Database Empty or No Matches') ;
ok($temp = $obj1->max(), "$pre max() : " . ($temp || 'FAILED') );
ok($value = $obj1->value(), "$pre value() : " . ($value || 'FAILED') );
ok($serial = $obj1->serial(), "$pre serial() : " . ($serial || 'FAILED') );
ok($temp = $obj1->is_max(), "$pre obj1->is_max() [obj1 should currently be max]");
diag "Creating new Barcodes object (obj2) based on the old one (obj1)\n";
ok($obj2 = $obj1->new(), "$pre Barcode Creation : obj2 = obj1->new()");
diag ". $pre obj2->value: " . $obj2->value . "\n";
ok(not($obj1->is_max()), "$pre obj1->is_max() [obj1 should no longer be max]");
ok( $obj2->is_max(), "$pre obj2->is_max() [obj2 should currently be max]");
ok($obj2->serial == $obj1->serial + 1, "$pre obj2->serial() : " . ($obj2->serial || 'FAILED'));
@ -44,23 +40,17 @@ foreach (@formats) {
ok($next->previous()->value() eq $obj1->value(), "$pre Roundtrip, value : " . ($obj1->value || 'FAILED'));
ok($previous->next()->value() eq $obj2->value(), "$pre Roundtrip, value : " . ($obj2->value || 'FAILED'));
}
print "\n";
}
diag "\nTesting with valid inputs:\n";
foreach $format (@formats) {
my $pre = sprintf '(%-12s)', $format;
foreach my $testval (@{$thash{ $format }}) {
ok($obj1 = C4::Barcodes->new($format,$testval), "$pre Barcode Creation : new('$format','$testval')");
if ($format eq 'hbyymmincr') {
diag "\nExtra tests for hbyymmincr\n";
$obj2 = $obj1->new();
my $branch;
ok($branch = $obj1->branch(), "$pre branch() : " . ($branch || 'FAILED') );
ok($branch eq $obj2->branch(), "$pre branch extended to derived object : " . ($obj2->branch || 'FAILED'));
}
print "\n";
}
}
diag "done.\n";