Segment tests: add a test for segment selection.

This commit is contained in:
Jonathan Puckey 2011-04-22 11:42:07 +02:00
parent c1ec991aee
commit 2496f08b17

View file

@ -48,4 +48,14 @@ test('segment.remove()', function() {
var path = new Path([10, 10], [5, 5], [10, 10]);
path.segments[1].remove();
equals(path.segments.length, 2);
});
test('segment.selected', function() {
var doc = new Document();
var path = new Path([10, 20], [50, 100]);
path.segments[0].point.selected = true;
equals(path.segments[0].point.selected, true);
path.segments[0].point.selected = false;
equals(path.segments[0].point.selected, false);
});