Add failing test for Path#reverse.

This commit is contained in:
Jonathan Puckey 2011-04-27 12:13:28 +02:00
parent 0c5595b2a7
commit 30307a0341

View file

@ -88,4 +88,18 @@ test('Is the path deselected after setting a new list of segments?', function()
path.segments = [[0, 10]];
equals(path.selected, false);
equals(doc.selectedItems.length, 0);
});
});
test('Path#reverse', function() {
var doc = new Document();
var path = new Path.Circle([100, 100], 30);
path.reverse();
compareSegmentLists(path.segments, [new Segment(new Point(100, 130),
new Point(-16.568359375, 0), new Point(16.568359375, 0)),
new Segment(new Point(130, 100), new Point(0, 16.568359375),
new Point(0, -16.568359375)), new Segment(new Point(100, 70),
new Point(16.568359375, 0), new Point(-16.568359375, 0)),
new Segment(new Point(70, 100), new Point(0, -16.568359375),
new Point(0, 16.568359375))]);
});