Skip to content

Commit

Permalink
Fix expected result for failing test
Browse files Browse the repository at this point in the history
Expected boxes is actually 1 because
 * Item 3 fits unrotated
 * Item 7s fit next to each other rotated

Box:

+--------------+
|              |
|              | 3
|              | 6
|              | 0
|              |
+--------------+
     675

3  +----+
3  |    +-------+
5  | #3 |  #7   | 2
.  |    +-------+ 5
2  |    |  #7   | 4
8  +----+-------+
    335.28+330.2
      = 665.4

~15mm spare width, ~10mm spare length

The #7s could also fit unrotated (they're narrower than #3 and total depth is less than when rotated)
  • Loading branch information
IBBoard committed Oct 25, 2015
1 parent cefa667 commit 0f8c07a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/PackerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public function testIssue6() {
$packer->addItem(new TestItem('Item 7', 330.2, 127, 101.6, 1));
$packedBoxes = $packer->pack();

self::assertEquals(2, $packedBoxes->count());
self::assertEquals(1, $packedBoxes->count());

}

Expand Down

0 comments on commit 0f8c07a

Please sign in to comment.