mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Change Path#removeSegments(from, to) test to fail and add a todo questioning if its behaviour is correct. Also add a failing Path#removeSegments() test.
This commit is contained in:
parent
e4eb463204
commit
af5aa67c36
1 changed files with 15 additions and 1 deletions
|
@ -70,7 +70,9 @@ test('path.remove()', function() {
|
|||
return path.segments.length;
|
||||
}, 2);
|
||||
|
||||
path.removeSegments(0, 2);
|
||||
// TODO: shouldn't this remove two segments? The segments from index 0 till
|
||||
// index 1?
|
||||
path.removeSegments(0, 1);
|
||||
equals(function() {
|
||||
return path.segments.length;
|
||||
}, 0);
|
||||
|
@ -82,6 +84,18 @@ test('path.remove()', function() {
|
|||
}, 0);
|
||||
});
|
||||
|
||||
test('path.removeSegments()', function() {
|
||||
var path = new Path();
|
||||
path.add(0, 0);
|
||||
path.add(10, 0);
|
||||
path.add(20, 0);
|
||||
path.add(30, 0);
|
||||
|
||||
path.removeSegments();
|
||||
equals(function() {
|
||||
return path.segments.length;
|
||||
}, 0);
|
||||
});
|
||||
|
||||
test('Is the path deselected after setting a new list of segments?', function() {
|
||||
var path = new Path([0, 0]);
|
||||
|
|
Loading…
Reference in a new issue