本文整理汇总了TypeScript中vs/workbench/common/editor/diffEditorInput.DiffEditorInput.getModifiedInput方法的典型用法代码示例。如果您正苦于以下问题:TypeScript DiffEditorInput.getModifiedInput方法的具体用法?TypeScript DiffEditorInput.getModifiedInput怎么用?TypeScript DiffEditorInput.getModifiedInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vs/workbench/common/editor/diffEditorInput.DiffEditorInput
的用法示例。
在下文中一共展示了DiffEditorInput.getModifiedInput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test
test("DiffEditorInput", function() {
let counter = 0;
let input = new MyEditorInput();
input.addListener("dispose", function() {
assert(true);
counter++;
});
let otherInput = new MyEditorInput();
otherInput.addListener("dispose", function() {
assert(true);
counter++;
});
let diffInput = new DiffEditorInput("name", "description", input, otherInput);
assert.equal(diffInput.getOriginalInput(), input);
assert.equal(diffInput.getModifiedInput(), otherInput);
assert(diffInput.matches(diffInput));
assert(!diffInput.matches(otherInput));
assert(!diffInput.matches(null));
diffInput.dispose();
assert.equal(counter, 2);
});
示例2: test
test('DiffEditorInput', function () {
let counter = 0;
let input = new MyEditorInput();
input.addListener2('dispose', function () {
assert(true);
counter++;
});
let otherInput = new MyEditorInput();
otherInput.addListener2('dispose', function () {
assert(true);
counter++;
});
let diffInput = new DiffEditorInput('name', 'description', input, otherInput);
assert.equal(diffInput.getOriginalInput(), input);
assert.equal(diffInput.getModifiedInput(), otherInput);
assert(diffInput.matches(diffInput));
assert(!diffInput.matches(otherInput));
assert(!diffInput.matches(null));
diffInput.dispose();
assert.equal(counter, 0);
});