本文整理汇总了TypeScript中vs/editor/test/common/model/editableTextModelTestUtils.testApplyEditsWithSyncedModels函数的典型用法代码示例。如果您正苦于以下问题:TypeScript testApplyEditsWithSyncedModels函数的具体用法?TypeScript testApplyEditsWithSyncedModels怎么用?TypeScript testApplyEditsWithSyncedModels使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了testApplyEditsWithSyncedModels函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test
test('two unrelated edits', () => {
testApplyEditsWithSyncedModels(
[
'My First Line',
'\t\tMy Second Line',
' Third Line',
'',
'123'
],
[
editOp(2, 1, 2, 3, ['\t']),
editOp(3, 1, 3, 5, [''])
],
[
'My First Line',
'\tMy Second Line',
'Third Line',
'',
'123'
]
);
});
示例2: test
test('two edits on one line', () => {
testApplyEditsWithSyncedModels(
[
'\t\tfirst\t ',
'\t\tsecond line',
'\tthird line',
'fourth line',
'\t\t<!@#fifth#@!>\t\t'
],
[
editOp(5, 3, 5, 7, ['']),
editOp(5, 12, 5, 16, [''])
],
[
'\t\tfirst\t ',
'\t\tsecond line',
'\tthird line',
'fourth line',
'\t\tfifth\t\t'
]
);
});
示例3: test
test('auto1', () => {
testApplyEditsWithSyncedModels(
[
'ioe',
'',
'yjct',
'',
'',
],
[
editOp(1, 2, 1, 2, ['b', 'r', 'fq']),
editOp(1, 4, 2, 1, ['', '']),
],
[
'ib',
'r',
'fqoe',
'',
'yjct',
'',
'',
]
);
});
示例4: test
test('auto1', () => {
testApplyEditsWithSyncedModels(
[
"ioe",
"",
"yjct",
"",
"",
],
[
editOp(1, 2, 1, 2, ["b", "r", "fq"]),
editOp(1, 4, 2, 1, ["", ""]),
],
[
"ib",
"r",
"fqoe",
"",
"yjct",
"",
"",
]
);
});
示例5: while
if (GENERATE_TESTS) {
let number = 1;
while(true) {
console.log('------BEGIN NEW TEST: ' + number);
let testModel = new TestModel();
console.log(testModel.print());
console.log('------END NEW TEST: ' + (number++));
try {
testApplyEditsWithSyncedModels(
testModel.initialContent.split('\n'),
testModel.edits,
testModel.resultingContent.split('\n')
);
// throw new Error('a');
} catch(err) {
console.log('bubu');
console.log(testModel.print());
break;
}
// break;
}
}