diff --git a/test/tests/Rectangle.js b/test/tests/Rectangle.js index e5d8ce7e..91cb4da8 100644 --- a/test/tests/Rectangle.js +++ b/test/tests/Rectangle.js @@ -16,6 +16,11 @@ test('new Rectangle(new Point(10, 20), new Size(30, 40));', function() { equals(rect.toString(), '{ x: 10, y: 20, width: 30, height: 40 }'); }); +test('new Rectangle({ point: [10, 20], size: [30, 40] });', function() { + var rect = new Rectangle({ point: [10, 20], size: [30, 40] }); + equals(rect.toString(), '{ x: 10, y: 20, width: 30, height: 40 }'); +}); + test('new Rectangle({ point: new Point(10, 20), size: new Size(30, 40)});', function() { var rect = new Rectangle({ point: new Point(10, 20), size: new Size(30, 40)}); equals(rect.toString(), '{ x: 10, y: 20, width: 30, height: 40 }');