From 00b5f6a6bbc72ba06fc522ff5b684cecb04aff39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 16 May 2011 19:21:44 +0100 Subject: [PATCH] Improve Group tests. --- test/tests/Group.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/tests/Group.js b/test/tests/Group.js index 0ed50c6a..163ceab8 100644 --- a/test/tests/Group.js +++ b/test/tests/Group.js @@ -23,16 +23,17 @@ test('Group bounds', function() { strokeWidth: 5, strokeColor: 'black' }; + var path = new Path.Circle([150, 150], 60); var secondPath = new Path.Circle([175, 175], 85); var group = new Group([path, secondPath]); - compareRectangles(group.bounds, { x: 90, y: 90, width: 170, height: 170 }); - compareRectangles(group.strokeBounds, { x: 87.5, y: 87.5, width: 175, height: 175 }); + compareRectangles(group.bounds, { x: 90, y: 90, width: 170, height: 170 }, 'group.bounds'); + compareRectangles(group.strokeBounds, { x: 87.5, y: 87.5, width: 175, height: 175 }, 'group.strokeBounds'); group.rotate(20); - compareRectangles(group.bounds, { x: 89.97681, y: 82.94095, width: 170.04639, height: 177.08224 }); - compareRectangles(group.strokeBounds, { x: 87.47681, y: 80.44095, width: 175.04639, height: 182.08224 }); + compareRectangles(group.bounds, { x: 89.97681, y: 82.94095, width: 170.04639, height: 177.08224 }, 'group.bounds'); + compareRectangles(group.strokeBounds, { x: 87.47681, y: 80.44095, width: 175.04639, height: 182.08224 }, 'group.strokeBounds'); group.rotate(20, new Point(50, 50)); - compareRectangles(group.bounds, { x: 39.70692, y: 114.99196, width: 170.00412, height: 180.22401 }); - compareRectangles(group.strokeBounds, { x: 37.20692, y: 112.49196, width: 175.00412, height: 185.22401 }); + compareRectangles(group.bounds, { x: 39.70692, y: 114.99196, width: 170.00412, height: 180.22401 }, 'group.bounds'); + compareRectangles(group.strokeBounds, { x: 37.20692, y: 112.49196, width: 175.00412, height: 185.22401 }, 'group.strokeBounds'); }); \ No newline at end of file