當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript editableTextModelTestUtils.testApplyEditsWithSyncedModels函數代碼示例

本文整理匯總了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'
			]
		);
	});
開發者ID:DonJayamanne,項目名稱:vscode,代碼行數:22,代碼來源:editableTextModel.test.ts

示例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'
			]
		);
	});
開發者ID:AlexxNica,項目名稱:sqlopsstudio,代碼行數:22,代碼來源:editableTextModel.test.ts

示例3: test

	test('auto1', () => {
		testApplyEditsWithSyncedModels(
			[
					'ioe',
					'',
					'yjct',
					'',
					'',
			],
			[
				editOp(1, 2, 1, 2, ['b', 'r', 'fq']),
				editOp(1, 4, 2, 1, ['', '']),
			],
			[
					'ib',
					'r',
					'fqoe',
					'',
					'yjct',
					'',
					'',
			]
		);
	});
開發者ID:ErickWendel,項目名稱:vscode,代碼行數:24,代碼來源:editableTextModelAuto.test.ts

示例4: test

	test('auto1', () => {
		testApplyEditsWithSyncedModels(
			[
					"ioe",
					"",
					"yjct",
					"",
					"",
			],
			[
				editOp(1, 2, 1, 2, ["b", "r", "fq"]),
				editOp(1, 4, 2, 1, ["", ""]),
			],
			[
					"ib",
					"r",
					"fqoe",
					"",
					"yjct",
					"",
					"",
			]
		);
	});
開發者ID:amamut,項目名稱:vscode,代碼行數:24,代碼來源:editableTextModelAuto.test.ts

示例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;
	}

}
開發者ID:ErickWendel,項目名稱:vscode,代碼行數:29,代碼來源:editableTextModelAuto.test.ts


注:本文中的vs/editor/test/common/model/editableTextModelTestUtils.testApplyEditsWithSyncedModels函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。