Implement failing test for #437.

This commit is contained in:
Jürg Lehni 2014-03-30 13:53:35 +02:00
parent 2b9d069864
commit 0f5e74a08e
2 changed files with 31 additions and 2 deletions

View file

@ -0,0 +1,25 @@
/*
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
* http://scratchdisk.com/ & http://jonathanpuckey.com/
*
* Distributed under the MIT license. See LICENSE file for details.
*
* All rights reserved.
*/
module('CurveLocation');
test('segment.location', function() {
var path = new Path();
path.add(new Point(100, 100));
path.add(new Point(200, 100));
path.add(new Point(300, 100));
path.add(new Point(400, 100));
for (var i = 0; i < 4; i++) {
equals(path.segments[i].location.offset, (i + 1) * 100);
}
});

View file

@ -29,13 +29,17 @@
/*#*/ include('Segment.js');
/*#*/ include('Path.js');
/*#*/ include('Style.js');
/*#*/ include('Curve.js');
/*#*/ include('Path_Shapes.js');
/*#*/ include('Path_Drawing_Commands.js');
/*#*/ include('Path_Curves.js');
/*#*/ include('Path_Bounds.js');
/*#*/ include('Path_Length.js');
/*#*/ include('Curve.js');
/*#*/ include('CurveLocation.js');
/*#*/ include('Style.js');
/*#*/ include('CompoundPath.js');
/*#*/ include('PathItem_Contains.js');