MCPcopy
hub / github.com/paperjs/paper.js / testMove

Function testMove

test/tests/Item_Order.js:63–76  ·  view source on GitHub ↗
(command, indexes)

Source from the content-addressed store, hash-verified

61
62 function testType(ctor) {
63 function testMove(command, indexes) {
64 paper.project.clear();
65 if (ctor !== Layer)
66 new Layer();
67 item0 = new ctor();
68 item1 = new ctor();
69 item2 = new ctor();
70 command();
71 var str = getFunctionMessage(command);
72 var name = item0.className.toLowerCase();
73 equals(item0.index, indexes[0], str + ': ' + name + '0.index');
74 equals(item1.index, indexes[1], str + ': ' + name + '1.index');
75 equals(item2.index, indexes[2], str + ': ' + name + '2.index');
76 }
77
78 testMove(function() { item0.insertBelow(item0); }, [0,1,2]);
79 testMove(function() { item0.insertBelow(item1); }, [0,1,2]);

Callers 1

testTypeFunction · 0.85

Calls 2

getFunctionMessageFunction · 0.85
equalsFunction · 0.85

Tested by

no test coverage detected