mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Fix wrong assumptions in Path.Constructor tests.
This commit is contained in:
parent
9c5c7997d4
commit
1cb1da0b26
1 changed files with 9 additions and 9 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue