Add failing test where new Segment(size) creates a Segment with Segment#point: {x: NaN, y: NaN}.

This commit is contained in:
Jonathan Puckey 2011-07-13 12:55:25 +02:00
parent 62453a4212
commit 4947a63bad

View file

@ -40,6 +40,11 @@ test('new Segment(x, y, inX, inY, outX, outY)', function() {
equals(segment.toString(), '{ point: { x: 10, y: 10 }, handleIn: { x: 5, y: 5 }, handleOut: { x: 15, y: 15 } }');
});
test('new Segment(size)', function() {
var segment = new Segment(new Size(10, 10));
equals(segment.toString(), '{ point: { x: 10, y: 10 } }');
});
test('segment.reverse()', function() {
var segment = new Segment(new Point(10, 10), new Point(5, 5), new Point(15, 15));
segment = segment.reverse();