提交 f5d668e5 编写于 作者: B Benjamin Pasero

fix tests

上级 4edc012c
......@@ -102,12 +102,12 @@ suite('Arrays', () => {
let d = arrays.sortedDiff([1, 2, 4], [], compare);
assert.deepEqual(d, [
{ start: 0, deleteCount: 3, inserted: [] }
{ start: 0, deleteCount: 3, toInsert: [] }
]);
d = arrays.sortedDiff([], [1, 2, 4], compare);
assert.deepEqual(d, [
{ start: 0, deleteCount: 0, inserted: [1, 2, 4] }
{ start: 0, deleteCount: 0, toInsert: [1, 2, 4] }
]);
d = arrays.sortedDiff([1, 2, 4], [1, 2, 4], compare);
......@@ -115,27 +115,27 @@ suite('Arrays', () => {
d = arrays.sortedDiff([1, 2, 4], [2, 3, 4, 5], compare);
assert.deepEqual(d, [
{ start: 0, deleteCount: 1, inserted: [] },
{ start: 2, deleteCount: 0, inserted: [3] },
{ start: 3, deleteCount: 0, inserted: [5] },
{ start: 0, deleteCount: 1, toInsert: [] },
{ start: 2, deleteCount: 0, toInsert: [3] },
{ start: 3, deleteCount: 0, toInsert: [5] },
]);
d = arrays.sortedDiff([2, 3, 4, 5], [1, 2, 4], compare);
assert.deepEqual(d, [
{ start: 0, deleteCount: 0, inserted: [1] },
{ start: 1, deleteCount: 1, inserted: [] },
{ start: 3, deleteCount: 1, inserted: [] },
{ start: 0, deleteCount: 0, toInsert: [1] },
{ start: 1, deleteCount: 1, toInsert: [] },
{ start: 3, deleteCount: 1, toInsert: [] },
]);
d = arrays.sortedDiff([1, 3, 5, 7], [5, 9, 11], compare);
assert.deepEqual(d, [
{ start: 0, deleteCount: 2, inserted: [] },
{ start: 3, deleteCount: 1, inserted: [9, 11] }
{ start: 0, deleteCount: 2, toInsert: [] },
{ start: 3, deleteCount: 1, toInsert: [9, 11] }
]);
d = arrays.sortedDiff([1, 3, 7], [5, 9, 11], compare);
assert.deepEqual(d, [
{ start: 0, deleteCount: 3, inserted: [5, 9, 11] }
{ start: 0, deleteCount: 3, toInsert: [5, 9, 11] }
]);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册