Fix tests.

This commit is contained in:
Jonathan Puckey 2012-03-13 16:01:07 +01:00
parent 08c02a66f1
commit c2ac3cc158
2 changed files with 5 additions and 4 deletions

View file

@ -69,7 +69,7 @@ test('Item#moveAbove(item) / Item#moveBelow(item)', function() {
command();
equals(function() {
return item0.index;
}, indexes[0]);
}, indexes[0], command.toString());
equals(function() {
return item1.index;
}, indexes[1]);
@ -84,13 +84,14 @@ test('Item#moveAbove(item) / Item#moveBelow(item)', function() {
testMove(function() { item1.moveBelow(item0) }, [1,0,2]);
testMove(function() { item1.moveBelow(item1) }, [0,1,2]);
testMove(function() { item1.moveBelow(item2) }, [0,1,2]);
testMove(function() { item2.moveBelow(item0) }, [2,0,1]);
testMove(function() { item2.moveBelow(item0) }, [1,2,0]);
testMove(function() { item2.moveBelow(item1) }, [0,2,1]);
testMove(function() { item2.moveBelow(item2) }, [0,1,2]);
testMove(function() { item0.moveAbove(item0) }, [0,1,2]);
testMove(function() { item0.moveAbove(item1) }, [1,0,2]);
testMove(function() { item0.moveAbove(item2) }, [1,2,0]);
testMove(function() { item0.moveAbove(item2) }, [2,0,1]);
testMove(function() { item1.moveAbove(item0) }, [0,1,2]);
testMove(function() { item1.moveAbove(item1) }, [0,1,2]);
testMove(function() { item1.moveAbove(item2) }, [0,2,1]);

View file

@ -73,7 +73,7 @@ test('insertAbove / insertBelow', function() {
// move the layer above the path, inside the firstLayer:
secondLayer.insertAbove(path);
equals(function() {
return secondLayer.previousSibling == path;
return secondLayer.nextSibling == path;
}, true);
equals(function() {
return secondLayer.parent == firstLayer;