View | Details | Raw Unified | Return to bug 41959
Collapse All | Expand All

(-)a/t/db_dependent/HoldsQueue/TransportCostOptimizations.t (-3 / +20 lines)
Lines 9-15 Link Here
9
9
10
use Modern::Perl;
10
use Modern::Perl;
11
11
12
use Test::More tests => 120;
12
use Test::More tests => 123;
13
use Test::NoWarnings;
13
use Test::NoWarnings;
14
use Test::Warn;
14
use Test::Warn;
15
use Data::Dumper;
15
use Data::Dumper;
Lines 193-199 sub test_allocation { Link Here
193
    if ($expected_allocation) {
193
    if ($expected_allocation) {
194
        my @indices = allocation_indices( $libraries, $holds_queue );
194
        my @indices = allocation_indices( $libraries, $holds_queue );
195
195
196
        is( scalar(@indices), scalar(@$expected_allocation), "$label correct number of allocations" );
196
        is(
197
            scalar(@indices), scalar(@$expected_allocation),
198
            "$label correct number of allocations (" . scalar @$expected_allocation . ")"
199
        );
197
200
198
        # print STDERR Dumper(\@indices);
201
        # print STDERR Dumper(\@indices);
199
202
Lines 349-354 test_allocation( Link Here
349
    2
352
    2
350
);
353
);
351
354
355
test_allocation(
356
    "more holds than items and items cannot fill all holds",
357
    [
358
        [  0,  1,  1, -1,  1 ],
359
        [ -1,  0, -1, -1,  1 ],
360
        [ -1, -1,  0, -1, -1 ],
361
        [ -1, -1, -1,  0, -1 ],
362
        [ -1, -1, -1, -1,  0 ]
363
    ],
364
    [ 1, 0, 0, 0, 0 ],
365
    [ 0, 0, 0, 1, 1 ],
366
    [ [ 0, 4 ] ],
367
    1
368
);
369
352
test_allocation(
370
test_allocation(
353
    "large volume",
371
    "large volume",
354
    [
372
    [
355
- 

Return to bug 41959