Fix wrong assumptions in Path.Constructor tests.

This commit is contained in:
Jürg Lehni 2013-03-03 15:23:33 -08:00
parent 9c5c7997d4
commit 1cb1da0b26

View file

@ -17,10 +17,10 @@ test('new Path.Rectangle([50, 50], [100, 100])', function() {
equals(path.segments.toString(), '{ point: { x: 50, y: 150 } },{ point: { x: 50, y: 50 } },{ point: { x: 150, y: 50 } },{ point: { x: 150, y: 150 } }'); equals(path.segments.toString(), '{ point: { x: 50, y: 150 } },{ point: { x: 50, y: 50 } },{ point: { x: 150, y: 50 } },{ point: { x: 150, y: 150 } }');
}); });
test('new Path.Rectangle({from: [50, 50], to: [100, 100]})', function() { test('new Path.Rectangle({ from: [50, 50], to: [150, 150] })', function() {
var path = new Path.Rectangle({ var path = new Path.Rectangle({
from: [50, 50], from: [50, 50],
to: [100, 100] to: [150, 150]
}); });
equals(path.segments.toString(), '{ point: { x: 50, y: 150 } },{ point: { x: 50, y: 50 } },{ point: { x: 150, y: 50 } },{ point: { x: 150, y: 150 } }'); equals(path.segments.toString(), '{ point: { x: 50, y: 150 } },{ point: { x: 50, y: 50 } },{ point: { x: 150, y: 50 } },{ point: { x: 150, y: 150 } }');
}); });
@ -50,8 +50,8 @@ test('new Path.RoundRectangle(rectangle, radius)', function() {
test('new Path.RoundRectangle({ rectangle: rectangle, radius: radius })', function() { test('new Path.RoundRectangle({ rectangle: rectangle, radius: radius })', function() {
var rect = new Rectangle({ var rect = new Rectangle({
point: [50, 50], point: [50, 50],
size: new Size([200, 100] size: [200, 100]
) }); });
var path = new Path.RoundRectangle({ var path = new Path.RoundRectangle({
rectangle: rect, rectangle: rect,
radius: 20 radius: 20