diff --git a/test/tests/Group.js b/test/tests/Group.js index 589fe81b..413d134a 100644 --- a/test/tests/Group.js +++ b/test/tests/Group.js @@ -52,4 +52,22 @@ test('Group bounds', function() { group.rotate(20, new Point(50, 50)); compareRectangles(group.bounds, { x: 39.70692, y: 114.99196, width: 170.00412, height: 180.22401 }, 'rotated group.bounds'); compareRectangles(group.strokeBounds, { x: 37.20692, y: 112.49196, width: 175.00412, height: 185.22401 }, 'rotated group.strokeBounds'); +}); + +test('group.addChildren(otherGroup.children)', function() { + var group = new Group(); + group.addChild(new Path()); + group.addChild(new Path()); + equals(function() { + return group.children.length; + }, 2); + + var secondGroup = new Group(); + secondGroup.addChildren(group.children); + equals(function() { + return secondGroup.children.length; + }, 2); + equals(function() { + return group.children.length; + }, 0); }); \ No newline at end of file